GNU bug report logs - #53227
master: Wrong error message with M-: (funcall).

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Thu, 13 Jan 2022 07:40:02 UTC

Severity: minor

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 53227 <at> debbugs.gnu.org
Subject: bug#53227: master: Wrong error message with M-: (funcall).
Date: Thu, 13 Jan 2022 10:13:45 +0100
>>>>> On Thu, 13 Jan 2022 07:39:05 +0000, Alan Mackenzie <acm <at> muc.de> said:

    Alan> Hello, Emacs.
    Alan> In the master branch, with emacs -Q, do

    Alan>     M-: (funcall) RET

    Alan> ..  The error message one sees is

    Alan>     (void-function nil)

    Alan> ..  This is wrong.  There is no function, nil or otherwise, supplied to
    Alan> funcall.  The error message ought to be "Too few arguments", or
    Alan> something like that.

    Alan> The cause of the bug lies in Ffuncall in .../src/eval.c.  There, the
    Alan> code uses args[0] without first checking that nargs > 0.

Itʼs not Ffuncall's responsibility to check that, itʼs 'eval' that
should be doing it. Compare with eg M-: (format), which correctly
signals 'wrong-number-of-arguments.

Robert
-- 




This bug report was last modified 3 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.