unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1)
@ 2022-07-23 11:47 Jeronimo Pellegrini via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-07-23 13:12 ` Mattias Engdegård
  0 siblings, 1 reply; 2+ messages in thread
From: Jeronimo Pellegrini via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-23 11:47 UTC (permalink / raw)
  To: 56723

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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1)
  2022-07-23 11:47 bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1) Jeronimo Pellegrini via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-23 13:12 ` Mattias Engdegård
  0 siblings, 0 replies; 2+ messages in thread
From: Mattias Engdegård @ 2022-07-23 13:12 UTC (permalink / raw)
  To: Jeronimo Pellegrini; +Cc: 56723-done

Now fixed on master. Thank you!






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-23 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-23 11:47 bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1) Jeronimo Pellegrini via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-23 13:12 ` Mattias Engdegård

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).