From 7c7cf3e8c88de6af91b110584f3aa8aff8011409 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 17 Feb 2025 19:30:44 +0100 Subject: 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. --- lisp/emacs-lisp/bytecomp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e48cac6c9b1..88e45ddb868 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3772,7 +3772,7 @@ This assumes the function has the `important-return-value' property." ;; Add missing &optional (or &rest) arguments. (dotimes (_ (- (/ (1+ fmax2) 2) alen)) (byte-compile-push-constant nil))) - ((zerop (logand fmax2 1)) + ((evenp fmax2) (byte-compile-report-error (format "Too many arguments for inlined function %S" form)) (byte-compile-discard (- alen (/ fmax2 2)))) -- cgit v1.2.3