Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: replace (eq/equal foo nil) with (null foo) #1884

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -3759,7 +3759,7 @@ Signal an error if the file does not exist."
(let ((completions (cons '(nil) evil-state-properties)))
(when arg
(cond
((eq flag nil)
((null flag)
(try-completion arg completions predicate))
((eq flag t)
(all-completions arg completions predicate))
Expand Down
2 changes: 1 addition & 1 deletion evil-ex.el
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ in case of incomplete or unknown commands."
(defun evil-completion-table-concat (table1 table2)
(lambda (string pred action)
(cond
((eq action nil)
((null action)
(let (matches)
(dolist (table (list table1 table2) (try-completion string matches))
(let ((x (try-completion string table pred)))
Expand Down
2 changes: 1 addition & 1 deletion evil-repeat.el
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Return non-nil if so."
(evil-emacs-state-p) ; ... in Emacs state
(and (evil-mouse-events-p ; ... mouse events
(this-command-keys-vector))
(eq repeat-type nil))
(null repeat-type))
(minibufferp))) ; ... minibuffer activated

(defun evil-repeat-record (info)
Expand Down
8 changes: 4 additions & 4 deletions evil-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -9164,8 +9164,8 @@ parameter set."
'((signed-number (sign . 1) (number . 2))))))
(ert-info ("Lookahead")
(should (equal (parse "foobar" 'expr) '((list "foo"))))
(should (equal (parse "foobaz" 'expr) nil))
(should (equal (parse "xxxyyy" 'expr) nil))
(should (null (parse "foobaz" 'expr)))
(should (null (parse "xxxyyy" 'expr)))
(should (equal (parse "xxxzzz" 'expr) '((list "xxx")))))
(ert-info ("Semantic actions")
(should (equal (parse "1+1" 'expr)
Expand Down Expand Up @@ -9295,7 +9295,7 @@ parameter set."
"Test `evil-filter-list'"
:tags '(evil util)
(ert-info ("Return filtered list")
(should (equal (evil-filter-list #'null '(nil)) nil))
(should (null (evil-filter-list #'null '(nil))))
(should (equal (evil-filter-list #'null '(nil 1)) '(1)))
(should (equal (evil-filter-list #'null '(nil 1 2 nil)) '(1 2)))
(should (equal (evil-filter-list #'null '(nil nil 1)) '(1)))
Expand Down Expand Up @@ -9902,7 +9902,7 @@ main(argc, argv) char **argv; {
(add-hook 'text-mode-hook #'use-german-input-method)
(evil-test-buffer
"[]"
(should (equal evil-input-method nil))
(should (null evil-input-method))
("a\"a" [escape])
"\"[a]"
(text-mode)
Expand Down