From 3461753478c2a8eff47c565d8729bbfd991f2729 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 2 Aug 2022 14:16:54 -0700 Subject: 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 Autosubmit: wpcarro Tested-by: BuildkiteCI --- users/wpcarro/emacs/pkgs/maybe/maybe.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'users') diff --git a/users/wpcarro/emacs/pkgs/maybe/maybe.el b/users/wpcarro/emacs/pkgs/maybe/maybe.el index 3c386b531865..581568d8ccba 100644 --- a/users/wpcarro/emacs/pkgs/maybe/maybe.el +++ b/users/wpcarro/emacs/pkgs/maybe/maybe.el @@ -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." -- cgit 1.4.1