unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jeronimo Pellegrini via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 56723@debbugs.gnu.org
Subject: bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1)
Date: Sat, 23 Jul 2022 08:47:56 -0300	[thread overview]
Message-ID: <87czdwhwyb.fsf@socrates.mail-host-address-is-not-set> (raw)

Package: emacs
Version: 29.0.50 -- 9171fa09332df615832240e98c247638019c0211
Severity: minor

Hello!

CHECK_INTEGER, defined in lisp.h, seems to report the wrong predicate,
although it does check the argument correctly:

INLINE void
CHECK_INTEGER (Lisp_Object x)
{
  CHECK_TYPE (INTEGERP (x), Qnumberp, x);
                            ^^^^^^^^

That makes, for example (ash 1.1 1) signal an error with the message
"Wrong type argument: numberp, 1.1" (it should be integerp, not
numberp). The same for logcount, and other functions that require
integers -- they will all complain that "1.1" is not a number.

Perhaps Qnumberp should be changed to Qintegerp in  line 3149 of lisp.h?
That seems to fix it for me.

(I don't include a patch because there were issues in the past with me
trying to contribute to tramp. Nothing serious: my employer, a public
University, is happy to release the code under the GNU GPL, but won't
transfer copyright)

J.





             reply	other threads:[~2022-07-23 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 11:47 Jeronimo Pellegrini via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-07-23 13:12 ` bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1) Mattias Engdegård

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czdwhwyb.fsf@socrates.mail-host-address-is-not-set \
    --to=bug-gnu-emacs@gnu.org \
    --cc=56723@debbugs.gnu.org \
    --cc=j_p@aleph0.info \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).