aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2025-02-17 05:10:33 +0100
committerStefan Kangas2025-02-17 05:37:10 +0100
commit89bdb57f24e0bdc1a3d33d7124d93c9a1b45fa1d (patch)
tree29d2630e32a5bdda3cfdce44ba0a682c8cea3da2
parente373a6e0d30c28045a0f33e662933c2c2660a220 (diff)
downloademacs-evenp-oddp.tar.gz
emacs-evenp-oddp.zip
Prefer '(evenp A)' to '(= 0 (% A 2))'evenp-oddp
* lisp/calc/calc-comb.el (math-prime-test): * lisp/calc/calc-keypd.el (calc-keypad-press): * lisp/calc/calc-math.el (math-sqrt): (math-sqrt-raw): * lisp/calc/calc-misc.el (math-iipow): (math-iipow-show): * lisp/calc/calc-stat.el (calcFunc-vmedian): * lisp/calendar/cal-tex.el (cal-tex-cursor-filofax-2week): (cal-tex-cursor-filofax-daily): * lisp/elec-pair.el (electric-pair-post-self-insert-function): * lisp/emacs-lisp/checkdoc.el (checkdoc-in-example-string-p): * lisp/emacs-lisp/eieio.el (defclass): * lisp/emacs-lisp/ert-x.el (ert-propertized-string): * lisp/emacs-lisp/ert.el (ert--significant-plist-keys): (ert--plist-difference-explanation): * lisp/emacs-lisp/helper.el (Helper-help-scroller): * lisp/emacs-lisp/pcase.el (pcase-setq): * lisp/files-x.el (setq-connection-local): * lisp/gnus/gnus-uu.el (gnus-uu-post-encoded): * lisp/gnus/message.el (message-make-in-reply-to): * lisp/gnus/nndiary.el (nndiary-last-occurrence): (nndiary-next-occurrence): * lisp/mail/rfc2047.el (rfc2047-decode-region): * lisp/play/5x5.el (5x5-draw-grid): * lisp/play/gametree.el (gametree-compute-reduced-score): (gametree-insert-new-leaf): (gametree-break-line-here): * lisp/play/zone.el (zone-fret): * lisp/vc/ediff-ptch.el (ediff-get-patch-buffer): * lisp/yank-media.el (yank-media--utf-16-p): Prefer '(evenp A)' to '(= 0 (% A 2))' and variations thereof.
-rw-r--r--lisp/calc/calc-comb.el4
-rw-r--r--lisp/calc/calc-keypd.el2
-rw-r--r--lisp/calc/calc-math.el4
-rw-r--r--lisp/calc/calc-misc.el4
-rw-r--r--lisp/calc/calc-stat.el2
-rw-r--r--lisp/calendar/cal-tex.el6
-rw-r--r--lisp/elec-pair.el2
-rw-r--r--lisp/emacs-lisp/checkdoc.el2
-rw-r--r--lisp/emacs-lisp/eieio.el2
-rw-r--r--lisp/emacs-lisp/ert-x.el2
-rw-r--r--lisp/emacs-lisp/ert.el6
-rw-r--r--lisp/emacs-lisp/helper.el2
-rw-r--r--lisp/emacs-lisp/pcase.el2
-rw-r--r--lisp/files-x.el2
-rw-r--r--lisp/gnus/gnus-uu.el2
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/nndiary.el8
-rw-r--r--lisp/mail/rfc2047.el2
-rw-r--r--lisp/play/5x5.el2
-rw-r--r--lisp/play/gametree.el6
-rw-r--r--lisp/play/zone.el2
-rw-r--r--lisp/vc/ediff-ptch.el2
-rw-r--r--lisp/yank-media.el2
23 files changed, 35 insertions, 35 deletions
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index 1ac3347b758..6e2fc08fece 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -826,8 +826,8 @@
826 '(t)))) 826 '(t))))
827 ((not (equal n (car math-prime-test-cache))) 827 ((not (equal n (car math-prime-test-cache)))
828 (cond ((if (consp n) 828 (cond ((if (consp n)
829 (= (% (nth 1 n) 2) 0) 829 (evenp (nth 1 n))
830 (= (% n 2) 0)) 830 (evenp n))
831 '(nil 2)) 831 '(nil 2))
832 ((if (consp n) 832 ((if (consp n)
833 (= (% (nth 1 n) 5) 0) 833 (= (% (nth 1 n) 5) 0)
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el
index 2a9c8e75214..ad2b1741181 100644
--- a/lisp/calc/calc-keypd.el
+++ b/lisp/calc/calc-keypd.el
@@ -411,7 +411,7 @@
411 (if invhyp (calc-wrapper)) ; clear Inv and Hyp flags 411 (if invhyp (calc-wrapper)) ; clear Inv and Hyp flags
412 (unwind-protect 412 (unwind-protect
413 (cond ((or (null cmd) 413 (cond ((or (null cmd)
414 (= (% row 2) 0)) 414 (evenp row))
415 (beep)) 415 (beep))
416 ((and (> (minibuffer-depth) 0)) 416 ((and (> (minibuffer-depth) 0))
417 (cond (isstring 417 (cond (isstring
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el
index 53e5df30fad..49a64008e0a 100644
--- a/lisp/calc/calc-math.el
+++ b/lisp/calc/calc-math.el
@@ -402,7 +402,7 @@ If this can't be done, return NIL."
402 (math-div (math-float num-sqrt) den-sqrt)))))) 402 (math-div (math-float num-sqrt) den-sqrt))))))
403 (and (eq (car-safe a) 'float) 403 (and (eq (car-safe a) 'float)
404 (if calc-symbolic-mode 404 (if calc-symbolic-mode
405 (if (= (% (nth 2 a) 2) 0) 405 (if (evenp (nth 2 a))
406 (let ((res (cl-isqrt (nth 1 a)))) 406 (let ((res (cl-isqrt (nth 1 a))))
407 (if (= (* res res) (nth 1 a)) 407 (if (= (* res res) (nth 1 a))
408 (math-make-float res (/ (nth 2 a) 2)) 408 (math-make-float res (/ (nth 2 a) 2))
@@ -468,7 +468,7 @@ If this can't be done, return NIL."
468 (t 468 (t
469 (if (null guess) 469 (if (null guess)
470 (let ((ldiff (- (math-numdigs (nth 1 a)) 6))) 470 (let ((ldiff (- (math-numdigs (nth 1 a)) 6)))
471 (or (= (% (+ (nth 2 a) ldiff) 2) 0) (setq ldiff (1+ ldiff))) 471 (or (evenp (+ (nth 2 a) ldiff)) (setq ldiff (1+ ldiff)))
472 (setq guess (math-make-float (cl-isqrt 472 (setq guess (math-make-float (cl-isqrt
473 (math-scale-int (nth 1 a) (- ldiff))) 473 (math-scale-int (nth 1 a) (- ldiff)))
474 (/ (+ (nth 2 a) ldiff) 2))))) 474 (/ (+ (nth 2 a) ldiff) 2)))))
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 0772b76409a..564cbfc6537 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -898,7 +898,7 @@ loaded and the keystroke automatically re-typed."
898(defun math-iipow (a n) ; [O O S] 898(defun math-iipow (a n) ; [O O S]
899 (cond ((= n 0) 1) 899 (cond ((= n 0) 1)
900 ((= n 1) a) 900 ((= n 1) a)
901 ((= (% n 2) 0) (math-iipow (math-mul a a) (/ n 2))) 901 ((evenp n) (math-iipow (math-mul a a) (/ n 2)))
902 (t (math-mul a (math-iipow (math-mul a a) (/ n 2)))))) 902 (t (math-mul a (math-iipow (math-mul a a) (/ n 2))))))
903 903
904(defun math-iipow-show (a n) ; [O O S] 904(defun math-iipow-show (a n) ; [O O S]
@@ -906,7 +906,7 @@ loaded and the keystroke automatically re-typed."
906 (let ((val (cond 906 (let ((val (cond
907 ((= n 0) 1) 907 ((= n 0) 1)
908 ((= n 1) a) 908 ((= n 1) a)
909 ((= (% n 2) 0) (math-iipow-show (math-mul a a) (/ n 2))) 909 ((evenp n) (math-iipow-show (math-mul a a) (/ n 2)))
910 (t (math-mul a (math-iipow-show (math-mul a a) (/ n 2))))))) 910 (t (math-mul a (math-iipow-show (math-mul a a) (/ n 2)))))))
911 (math-working "pow" val) 911 (math-working "pow" val)
912 val)) 912 val))
diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el
index 57f42645e34..cbf85c51ab4 100644
--- a/lisp/calc/calc-stat.el
+++ b/lisp/calc/calc-stat.el
@@ -390,7 +390,7 @@
390 (math-reject-arg (car p) 'anglep)) 390 (math-reject-arg (car p) 'anglep))
391 (setq p (cdr p))) 391 (setq p (cdr p)))
392 (setq flat (sort flat 'math-lessp)) 392 (setq flat (sort flat 'math-lessp))
393 (if (= (% len 2) 0) 393 (if (evenp len)
394 (math-div (math-add (nth (1- hlen) flat) (nth hlen flat)) 2) 394 (math-div (math-add (nth (1- hlen) flat) (nth hlen flat)) 2)
395 (nth hlen flat)))))) 395 (nth hlen flat))))))
396 396
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index c0bb9760810..f5bdfb970cc 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -1295,7 +1295,7 @@ Optional EVENT indicates a buffer position to use instead of point."
1295 (cal-tex-b-document) 1295 (cal-tex-b-document)
1296 (cal-tex-cmd "\\pagestyle" "empty") 1296 (cal-tex-cmd "\\pagestyle" "empty")
1297 (dotimes (i n) 1297 (dotimes (i n)
1298 (if (zerop (mod i 2)) 1298 (if (evenp i)
1299 (insert "\\righthead") 1299 (insert "\\righthead")
1300 (insert "\\lefthead")) 1300 (insert "\\lefthead"))
1301 (cal-tex-arg 1301 (cal-tex-arg
@@ -1318,7 +1318,7 @@ Optional EVENT indicates a buffer position to use instead of point."
1318 (calendar-extract-year d)))))) 1318 (calendar-extract-year d))))))
1319 (insert "%\n") 1319 (insert "%\n")
1320 (dotimes (_jdummy 7) 1320 (dotimes (_jdummy 7)
1321 (if (zerop (mod i 2)) 1321 (if (evenp i)
1322 (insert "\\rightday") 1322 (insert "\\rightday")
1323 (insert "\\leftday")) 1323 (insert "\\leftday"))
1324 (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) 1324 (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
@@ -1388,7 +1388,7 @@ Optional EVENT indicates a buffer position to use instead of point."
1388 (cal-tex-cmd "\\pagestyle" "empty") 1388 (cal-tex-cmd "\\pagestyle" "empty")
1389 (dotimes (i n) 1389 (dotimes (i n)
1390 (dotimes (j 4) 1390 (dotimes (j 4)
1391 (let ((even (zerop (% j 2)))) 1391 (let ((even (evenp j)))
1392 (insert (if even 1392 (insert (if even
1393 "\\righthead" 1393 "\\righthead"
1394 "\\lefthead")) 1394 "\\lefthead"))
diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index 10c14e55eae..aa2577300fd 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -558,7 +558,7 @@ The decision is taken by order of preference:
558 ;; Backslash-escaped: no pairing, no skipping. 558 ;; Backslash-escaped: no pairing, no skipping.
559 ((save-excursion 559 ((save-excursion
560 (goto-char beg) 560 (goto-char beg)
561 (not (zerop (% (skip-syntax-backward "\\") 2)))) 561 (not (evenp (skip-syntax-backward "\\"))))
562 (let ((current-prefix-arg (1- num))) 562 (let ((current-prefix-arg (1- num)))
563 (electric-pair-post-self-insert-function))) 563 (electric-pair-post-self-insert-function)))
564 ;; Skip self. 564 ;; Skip self.
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index dd3da9ae8c0..3541e3d0a57 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2109,7 +2109,7 @@ The text checked is between START and LIMIT."
2109 (goto-char start) 2109 (goto-char start)
2110 (while (and (< (point) p) (re-search-forward "\\\\\"" limit t)) 2110 (while (and (< (point) p) (re-search-forward "\\\\\"" limit t))
2111 (setq c (1+ c))) 2111 (setq c (1+ c)))
2112 (and (< 0 c) (= (% c 2) 0)))))) 2112 (and (< 0 c) (evenp c))))))
2113 2113
2114(defun checkdoc-in-abbreviation-p (begin) 2114(defun checkdoc-in-abbreviation-p (begin)
2115 "Return non-nil if point is at an abbreviation. 2115 "Return non-nil if point is at an abbreviation.
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 8665934ebfd..0f029813f80 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -115,7 +115,7 @@ and reference them using the function `class-option'."
115 (cl-check-type superclasses list) 115 (cl-check-type superclasses list)
116 116
117 (cond ((and (stringp (car options-and-doc)) 117 (cond ((and (stringp (car options-and-doc))
118 (/= 1 (% (length options-and-doc) 2))) 118 (evenp (length options-and-doc)))
119 (error "Too many arguments to `defclass'")) 119 (error "Too many arguments to `defclass'"))
120 ((and (symbolp (car options-and-doc)) 120 ((and (symbolp (car options-and-doc))
121 (oddp (length options-and-doc))) 121 (oddp (length options-and-doc)))
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index 147787d3d38..0dacec130a0 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -260,7 +260,7 @@ structure with the plists in ARGS."
260 (string (let ((begin (point))) 260 (string (let ((begin (point)))
261 (insert x) 261 (insert x)
262 (set-text-properties begin (point) current-plist))) 262 (set-text-properties begin (point) current-plist)))
263 (list (unless (zerop (mod (length x) 2)) 263 (list (unless (evenp (length x))
264 (error "Odd number of args in plist: %S" x)) 264 (error "Odd number of args in plist: %S" x))
265 (setq current-plist x)))) 265 (setq current-plist x))))
266 (buffer-string))) 266 (buffer-string)))
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 5d1b9f2acbb..e8012326eb3 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -576,7 +576,7 @@ Return nil if they are."
576 576
577(defun ert--significant-plist-keys (plist) 577(defun ert--significant-plist-keys (plist)
578 "Return the keys of PLIST that have non-null values, in order." 578 "Return the keys of PLIST that have non-null values, in order."
579 (cl-assert (zerop (mod (length plist) 2)) t) 579 (cl-assert (evenp (length plist)) t)
580 (cl-loop for (key value . rest) on plist by #'cddr 580 (cl-loop for (key value . rest) on plist by #'cddr
581 unless (or (null value) (memq key accu)) collect key into accu 581 unless (or (null value) (memq key accu)) collect key into accu
582 finally (cl-return accu))) 582 finally (cl-return accu)))
@@ -587,8 +587,8 @@ Return nil if they are."
587Returns nil if they are equivalent, i.e., have the same value for 587Returns nil if they are equivalent, i.e., have the same value for
588each key, where absent values are treated as nil. The order of 588each key, where absent values are treated as nil. The order of
589key/value pairs in each list does not matter." 589key/value pairs in each list does not matter."
590 (cl-assert (zerop (mod (length a) 2)) t) 590 (cl-assert (evenp (length a)) t)
591 (cl-assert (zerop (mod (length b) 2)) t) 591 (cl-assert (evenp (length b)) t)
592 ;; Normalizing the plists would be another way to do this but it 592 ;; Normalizing the plists would be another way to do this but it
593 ;; requires a total ordering on all lisp objects (since any object 593 ;; requires a total ordering on all lisp objects (since any object
594 ;; is valid as a text property key). Perhaps defining such an 594 ;; is valid as a text property key). Perhaps defining such an
diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el
index d8f758d2fe5..8a173219545 100644
--- a/lisp/emacs-lisp/helper.el
+++ b/lisp/emacs-lisp/helper.el
@@ -80,7 +80,7 @@
80 (recenter)) 80 (recenter))
81 ((and (or (eq continue 'backspace) 81 ((and (or (eq continue 'backspace)
82 (eq continue ?\177)) 82 (eq continue ?\177))
83 (zerop (% state 2))) 83 (evenp state))
84 (scroll-down)) 84 (scroll-down))
85 (t (setq continue nil)))))))) 85 (t (setq continue nil))))))))
86 86
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index a6a4751f49a..c68b8961ee3 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -370,7 +370,7 @@ undetected, binding variables to arbitrary values, such as nil.
370 (cond 370 (cond
371 (args 371 (args
372 (let ((arg-length (length args))) 372 (let ((arg-length (length args)))
373 (unless (= 0 (mod arg-length 2)) 373 (unless (evenp arg-length)
374 (signal 'wrong-number-of-arguments 374 (signal 'wrong-number-of-arguments
375 (list 'pcase-setq (+ 2 arg-length))))) 375 (list 'pcase-setq (+ 2 arg-length)))))
376 (let ((result)) 376 (let ((result))
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 0e8b99c1e4f..3f57321eb53 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -914,7 +914,7 @@ earlier in the `setq-connection-local'. The return value of the
914 914
915\(fn [VARIABLE VALUE]...)" 915\(fn [VARIABLE VALUE]...)"
916 (declare (debug setq)) 916 (declare (debug setq))
917 (unless (zerop (mod (length pairs) 2)) 917 (unless (evenp (length pairs))
918 (error "PAIRS must have an even number of variable/value members")) 918 (error "PAIRS must have an even number of variable/value members"))
919 (let ((set-expr nil) 919 (let ((set-expr nil)
920 (profile-vars nil)) 920 (profile-vars nil))
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index 4372fd58669..bf745be0f6e 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -2098,7 +2098,7 @@ If no file has been included, the user will be asked for a file."
2098 (make-string minlen ?-) 2098 (make-string minlen ?-)
2099 file-name i parts 2099 file-name i parts
2100 (make-string 2100 (make-string
2101 (if (= 0 (% whole-len 2)) (1- minlen) minlen) ?-))) 2101 (if (evenp whole-len) (1- minlen) minlen) ?-)))
2102 2102
2103 (goto-char (point-min)) 2103 (goto-char (point-min))
2104 (when (re-search-forward "^Subject: " nil t) 2104 (when (re-search-forward "^Subject: " nil t)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index dede5520d66..46c3550418f 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6035,7 +6035,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
6035 (while (search-forward "\"" nil t) 6035 (while (search-forward "\"" nil t)
6036 (when (prog2 6036 (when (prog2
6037 (backward-char) 6037 (backward-char)
6038 (zerop (% (skip-chars-backward "\\\\") 2)) 6038 (evenp (skip-chars-backward "\\\\"))
6039 (goto-char (match-beginning 0))) 6039 (goto-char (match-beginning 0)))
6040 (insert "\\")) 6040 (insert "\\"))
6041 (forward-char)) 6041 (forward-char))
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index de051745f92..7bc46fa88f8 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -1353,9 +1353,9 @@ all. This may very well take some time.")
1353 (max (cond ((= month 2) 1353 (max (cond ((= month 2)
1354 (if (date-leap-year-p year) 29 28)) 1354 (if (date-leap-year-p year) 29 28))
1355 ((<= month 7) 1355 ((<= month 7)
1356 (if (zerop (% month 2)) 30 31)) 1356 (if (evenp month) 30 31))
1357 (t 1357 (t
1358 (if (zerop (% month 2)) 31 30)))) 1358 (if (evenp month) 31 30))))
1359 (doms dom-list) 1359 (doms dom-list)
1360 (dows dow-list) 1360 (dows dow-list)
1361 day days) 1361 day days)
@@ -1456,9 +1456,9 @@ all. This may very well take some time.")
1456 (max (cond ((= month 2) 1456 (max (cond ((= month 2)
1457 (if (date-leap-year-p year) 29 28)) 1457 (if (date-leap-year-p year) 29 28))
1458 ((<= month 7) 1458 ((<= month 7)
1459 (if (zerop (% month 2)) 30 31)) 1459 (if (evenp month) 30 31))
1460 (t 1460 (t
1461 (if (zerop (% month 2)) 31 30)))) 1461 (if (evenp month) 31 30))))
1462 (doms dom-list) 1462 (doms dom-list)
1463 (dows dow-list) 1463 (dows dow-list)
1464 day days) 1464 day days)
diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el
index 38b924851fc..13d1ac320b0 100644
--- a/lisp/mail/rfc2047.el
+++ b/lisp/mail/rfc2047.el
@@ -1076,7 +1076,7 @@ other than `\"' and `\\' in quoted strings."
1076 (while (search-forward "\"" end t) 1076 (while (search-forward "\"" end t)
1077 (when (prog2 1077 (when (prog2
1078 (backward-char) 1078 (backward-char)
1079 (zerop (% (skip-chars-backward "\\\\") 2)) 1079 (evenp (skip-chars-backward "\\\\"))
1080 (goto-char (match-beginning 0))) 1080 (goto-char (match-beginning 0)))
1081 (insert "\\")) 1081 (insert "\\"))
1082 (forward-char)) 1082 (forward-char))
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index 3c5a3601927..e7638ef0f59 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -312,7 +312,7 @@ Quit current game \\[5x5-quit-game]"
312 (forward-char (+ 1 (/ (1+ 5x5-x-scale) 2))) 312 (forward-char (+ 1 (/ (1+ 5x5-x-scale) 2)))
313 (dotimes (x 5x5-grid-size) 313 (dotimes (x 5x5-grid-size)
314 (when (5x5-cell solution-grid y x) 314 (when (5x5-cell solution-grid y x)
315 (if (= 0 (mod 5x5-x-scale 2)) 315 (if (evenp 5x5-x-scale)
316 (progn 316 (progn
317 (insert "()") 317 (insert "()")
318 (delete-region (point) (+ (point) 2)) 318 (delete-region (point) (+ (point) 2))
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index c0d43944e67..8ffddfc7275 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -347,7 +347,7 @@ Subnodes which have been manually scored are honored."
347 ;; be either a leaf child, or a subheading. 347 ;; be either a leaf child, or a subheading.
348 (let ((running gametree-default-score) 348 (let ((running gametree-default-score)
349 (minmax 349 (minmax
350 (if (= 0 (mod (gametree-current-branch-ply) 2)) 350 (if (evenp (gametree-current-branch-ply))
351 'max 'min))) 351 'max 'min)))
352 (while (and (not (eobp)) 352 (while (and (not (eobp))
353 (= 0 (gametree-current-branch-depth))) ;handle leaves 353 (= 0 (gametree-current-branch-depth))) ;handle leaves
@@ -395,7 +395,7 @@ depth AT-DEPTH or smaller is found."
395 (gametree-current-branch-ply))))) 395 (gametree-current-branch-ply)))))
396 (goto-char (1- (point))) 396 (goto-char (1- (point)))
397 (insert "\n") 397 (insert "\n")
398 (insert (format (if (= 0 (mod starting-plies 2)) 398 (insert (format (if (evenp starting-plies)
399 gametree-full-ply-format 399 gametree-full-ply-format
400 gametree-half-ply-format) 400 gametree-half-ply-format)
401 (/ starting-plies 2)))))) 401 (/ starting-plies 2))))))
@@ -450,7 +450,7 @@ only work of Black's moves are explicitly numbered, for instance
450 gametree-full-ply-regexp "\\|" 450 gametree-full-ply-regexp "\\|"
451 gametree-half-ply-regexp "\\)"))) 451 gametree-half-ply-regexp "\\)")))
452 (progn 452 (progn
453 (insert (format (if (= 0 (mod (gametree-looking-at-ply) 2)) 453 (insert (format (if (evenp (gametree-looking-at-ply))
454 gametree-full-ply-format 454 gametree-full-ply-format
455 gametree-half-ply-format) 455 gametree-half-ply-format)
456 (/ (gametree-looking-at-ply) 2))) 456 (/ (gametree-looking-at-ply) 2)))
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index b294dd6af67..39a33f1e2a0 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -454,7 +454,7 @@ run a specific program. The program must be a member of
454 (dotimes (i 20) 454 (dotimes (i 20)
455 (goto-char pos) 455 (goto-char pos)
456 (delete-char 1) 456 (delete-char 1)
457 (insert (if (= 0 (% i 2)) hmm c-string)) 457 (insert (if (evenp i) hmm c-string))
458 (zone-park/sit-for wbeg (setq wait (* wait 0.8)))) 458 (zone-park/sit-for wbeg (setq wait (* wait 0.8))))
459 (delete-char -1) (insert c-string))) 459 (delete-char -1) (insert c-string)))
460 460
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index 42b0d6850ef..1e66a016375 100644
--- a/lisp/vc/ediff-ptch.el
+++ b/lisp/vc/ediff-ptch.el
@@ -549,7 +549,7 @@ an optional argument, then use it."
549 549
550 (cond ((ediff-buffer-live-p patch-buf)) 550 (cond ((ediff-buffer-live-p patch-buf))
551 ;; even prefix arg: patch in buffer 551 ;; even prefix arg: patch in buffer
552 ((and (integerp arg) (eq 0 (mod arg 2))) 552 ((and (integerp arg) (evenp arg))
553 (setq patch-buf (ediff-prompt-for-patch-buffer))) 553 (setq patch-buf (ediff-prompt-for-patch-buffer)))
554 ;; odd prefix arg: get patch from a file 554 ;; odd prefix arg: get patch from a file
555 ((and (integerp arg) (oddp arg)) 555 ((and (integerp arg) (oddp arg))
diff --git a/lisp/yank-media.el b/lisp/yank-media.el
index 600cc0ffaf5..bb62ba272d3 100644
--- a/lisp/yank-media.el
+++ b/lisp/yank-media.el
@@ -172,7 +172,7 @@ non-supported selection data types."
172 data))) 172 data)))
173 173
174(defun yank-media--utf-16-p (data) 174(defun yank-media--utf-16-p (data)
175 (and (zerop (mod (length data) 2)) 175 (and (evenp (length data))
176 (let ((stats (vector 0 0))) 176 (let ((stats (vector 0 0)))
177 (dotimes (i (length data)) 177 (dotimes (i (length data))
178 (when (zerop (elt data i)) 178 (when (zerop (elt data i))