>From f28d1b1f9491c95319b7073d29bb67c0f5431145 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 5 Nov 2019 13:43:44 -0800 Subject: [PATCH] Pacify byte-compiler in calculator.el MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/calculator.el (calculator-expt): Open-code cl-evenp to pacify warning “the function ‘cl-evenp’ might not be defined”. Problem reported by Juanma Barranquero in: https://lists.gnu.org/r/emacs-devel/2019-11/msg00118.html --- lisp/calculator.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index fab365d5f2..6c07ee2225 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1620,7 +1620,9 @@ calculator-expt (condition-case nil (expt x y) (overflow-error - (if (or (natnump x) (cl-evenp y)) + ;; X and Y must be integers, as expt silently returns floating-point + ;; infinity on floating-point overflow. + (if (or (natnump x) (zerop (logand x 1))) 1.0e+INF -1.0e+INF)))) -- 2.23.0