1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 00:31:01 -08:00

Prefer '(evenp A)' to '(= 0 (logand A 1))'

* lisp/calc/calc-arith.el (calcFunc-dint):
* lisp/calculator.el (calculator-expt):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
* lisp/emacs-lisp/elint.el (elint-check-defcustom-form):
* lisp/ps-print.el (ps-print-page-p):
(ps-print-sheet-p): Prefer '(evenp A)' to '(= 0 (logand A 1))' and
variations thereof.
This commit is contained in:
Stefan Kangas 2025-02-17 19:30:44 +01:00
parent 1a8493f0a5
commit 7c7cf3e8c8
5 changed files with 6 additions and 6 deletions

View file

@ -833,7 +833,7 @@ CODE can be a lambda expression, a macro, or byte-compiled code."
"Lint the defcustom FORM in ENV."
(if (and (> (length form) 3)
;; even no. of keyword/value args ?
(zerop (logand (length form) 1)))
(evenp (length form)))
(elint-env-add-global-var (elint-form (nth 2 form) env)
(car (cdr form)))
(elint-error "Malformed variable declaration: %s" form)