diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2025-02-17 19:30:44 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2025-02-17 19:30:44 +0100 |
commit | 7c7cf3e8c88de6af91b110584f3aa8aff8011409 (patch) | |
tree | d33dd28c9cf9fe024c296e61823ccd9e235c22e7 /lisp/emacs-lisp/bytecomp.el | |
parent | 1a8493f0a5fcd45c7e992dbf42cfbb0346edcaff (diff) | |
download | emacs-7c7cf3e8c88de6af91b110584f3aa8aff8011409.tar.gz emacs-7c7cf3e8c88de6af91b110584f3aa8aff8011409.tar.bz2 emacs-7c7cf3e8c88de6af91b110584f3aa8aff8011409.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 |
1 files changed, 1 insertions, 1 deletions
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)))) |