mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Prefer oddp/evenp to cl-oddp/cl-evenp
* lisp/calc/calc-ext.el (math-oddp): * lisp/calc/calc-misc.el (math-evenp): * lisp/calendar/todo-mode.el (todo-adjusted-category-label-length, todo-insert-category-line) (todo-update-categories-display): * lisp/emacs-lisp/cl-macs.el (cl-defstruct): * lisp/net/gnutls.el (open-gnutls-stream): * lisp/tab-line.el (tab-line-tab-face-inactive-alternating): * test/lisp/auth-source-tests.el (auth-source-test-macos-keychain-search): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-notany) (cl-extra-test-notevery): * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-adjoin-test): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-collect) (cl-macs-loop-append/nconc, cl-macs-loop-when) (cl-macs-loop-if): * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-remove-test) (cl-remove-if-test, cl-remove-if-not-test, cl-seq-delete-test) (cl-delete-if-test, cl-delete-if-not-test) (cl-seq-substitute-if-test, cl-seq-substitute-if-not-test) (cl-find-if-test, cl-find-if-not-test, cl-position-if-test) (cl-seq-count-test, cl-count-if-test, cl-count-if-not-test) (cl-member-if-test, cl-member-if-not-test, cl-assoc-if-test) (cl-assoc-if-not-test, cl-rassoc-if-test) (cl-rassoc-if-not-test): * test/src/treesit-tests.el (treesit-search-forward-predicate): Prefer oddp/evenp to cl-oddp/cl-evenp where possible. * lisp/calc/calc-ext.el (cl-lib): * lisp/calc/calc-misc.el (cl-lib): Don't require.
This commit is contained in:
parent
667d011410
commit
657f4658a7
12 changed files with 105 additions and 107 deletions
|
|
@ -212,7 +212,7 @@
|
|||
when (symbolp i) collect i)
|
||||
'(bird turtle horse cat)))
|
||||
(should (equal (cl-loop for i from 1 to 10
|
||||
if (cl-oddp i) collect i)
|
||||
if (oddp i) collect i)
|
||||
'(1 3 5 7 9)))
|
||||
(should (equal (cl-loop for i in '(a b c d e f g) by #'cddr
|
||||
collect i into my-list
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
'(a b (c))))
|
||||
(should (equal (cl-loop for i upfrom 0
|
||||
as x in '(a b (c))
|
||||
nconc (if (cl-evenp i) (list x) nil))
|
||||
nconc (if (evenp i) (list x) nil))
|
||||
'(a (c)))))
|
||||
|
||||
(ert-deftest cl-macs-loop-count ()
|
||||
|
|
@ -346,7 +346,7 @@ collection clause."
|
|||
|
||||
(should (equal (cl-loop for elt in '(1 a 2 "a" (3 4) 5 6)
|
||||
when (numberp elt)
|
||||
when (cl-evenp elt) collect elt into even
|
||||
when (evenp elt) collect elt into even
|
||||
else collect elt into odd
|
||||
else
|
||||
when (symbolp elt) collect elt into syms
|
||||
|
|
@ -356,7 +356,7 @@ collection clause."
|
|||
|
||||
(ert-deftest cl-macs-loop-if ()
|
||||
(should (equal (cl-loop for i to 5
|
||||
if (cl-evenp i)
|
||||
if (evenp i)
|
||||
collect i
|
||||
and when (and (= i 2) 'two)
|
||||
collect it
|
||||
|
|
@ -364,7 +364,7 @@ collection clause."
|
|||
collect "low")
|
||||
'(0 2 two "low" 4)))
|
||||
(should (equal (cl-loop for i to 5
|
||||
if (cl-evenp i)
|
||||
if (evenp i)
|
||||
collect i
|
||||
and when (and (= i 2) 'two)
|
||||
collect it
|
||||
|
|
@ -374,7 +374,7 @@ collection clause."
|
|||
'(0 "low" 2 two "low" 4)))
|
||||
(should (equal (cl-loop with funny-numbers = '(6 13 -1)
|
||||
for x below 10
|
||||
if (cl-evenp x)
|
||||
if (evenp x)
|
||||
collect x into evens
|
||||
else
|
||||
collect x into odds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue