From e5f10c6755f3e1670e4dc59842be72cdf62d3f91 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=utf8 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 fab365d5f28..6c07ee2225d 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1620,7 +1620,9 @@ To use this, apply a binary operator (evaluate it), then call this." (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.39.5