From: Paul Eggert <eggert@cs.ucla.edu>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: master 3843711 3/3: Simplify calculator-expt
Date: Tue, 5 Nov 2019 13:45:16 -0800 [thread overview]
Message-ID: <17b29b23-6fc5-0e9e-973d-51f20c563bb8@cs.ucla.edu> (raw)
In-Reply-To: <CAAeL0SQEvyKAGtT-QHo_ck_gUpNKHydny7aSJXPVCrjs-3pR0w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
On 11/5/19 3:28 AM, Juanma Barranquero wrote:
> calculator.el:1644:1:Warning: the function `cl-evenp' might not be
> defined at runtime.
Thanks, I installed the attached to pacify the byte-compiler about that.
(Remind me again why cl-lib is not preloaded? :-)
[-- Attachment #2: 0001-Pacify-byte-compiler-in-calculator.el.patch --]
[-- Type: text/x-patch, Size: 1139 bytes --]
From f28d1b1f9491c95319b7073d29bb67c0f5431145 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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
next prev parent reply other threads:[~2019-11-05 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191105073959.21509.71385@vcs0.savannah.gnu.org>
[not found] ` <20191105074004.5063220A3C@vcs0.savannah.gnu.org>
2019-11-05 11:28 ` master 3843711 3/3: Simplify calculator-expt Juanma Barranquero
2019-11-05 21:45 ` Paul Eggert [this message]
2019-11-05 19:29 ` Stefan Monnier
2019-11-05 21:47 ` Paul Eggert
2020-04-16 20:36 jakub-w
2020-04-16 20:56 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17b29b23-6fc5-0e9e-973d-51f20c563bb8@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.