From 89bdb57f24e0bdc1a3d33d7124d93c9a1b45fa1d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 17 Feb 2025 05:10:33 +0100 Subject: Prefer '(evenp A)' to '(= 0 (% A 2))' * 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. --- lisp/emacs-lisp/checkdoc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/checkdoc.el') 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." (goto-char start) (while (and (< (point) p) (re-search-forward "\\\\\"" limit t)) (setq c (1+ c))) - (and (< 0 c) (= (% c 2) 0)))))) + (and (< 0 c) (evenp c)))))) (defun checkdoc-in-abbreviation-p (begin) "Return non-nil if point is at an abbreviation. -- cgit v1.2.3