refactor(wpcarro/emacs): Prefer (null foo) to (eq nil foo)
TIL `null` exists Change-Id: I48ef783cf5762e8770fbc6abf0d79c051e34090e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6034 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									7e7ed4649b
								
							
						
					
					
						commit
						3461753478
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -25,9 +25,6 @@
 | 
			
		|||
;; Nil     | Set
 | 
			
		||||
;;
 | 
			
		||||
;; NOTE: In Elisp, values like '() (i.e. the empty list) are aliases for nil.
 | 
			
		||||
;; What else in Elisp is an alias in this way?
 | 
			
		||||
;; Examples:
 | 
			
		||||
;; TODO: Provide examples of other nil types in Elisp.
 | 
			
		||||
 | 
			
		||||
;;; Code:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -37,7 +34,7 @@
 | 
			
		|||
 | 
			
		||||
(defun maybe-nil? (x)
 | 
			
		||||
  "Return t if X is nil."
 | 
			
		||||
  (eq nil x))
 | 
			
		||||
  (null x))
 | 
			
		||||
 | 
			
		||||
(defun maybe-some? (x)
 | 
			
		||||
  "Return t when X is non-nil."
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue