[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18966: 25.0.50; unhelpful error message from byte compiler
From: |
Lars Ingebrigtsen |
Subject: |
bug#18966: 25.0.50; unhelpful error message from byte compiler |
Date: |
Fri, 21 Aug 2020 13:20:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Aug 20 2020, Lars Ingebrigtsen wrote:
>
>> Like in bug#35186, I'm not able to actually chase down where this error
>> message comes from.
>
> It's just a generic macro expansion error:
>
> ELISP> (macroexpand '(push zzz))
> *** Eval error *** Wrong number of arguments: (2 . 2), 1
> ELISP> (push zzz)
> *** Eval error *** Wrong number of arguments: (2 . 2), 1
Hm... I grepped through *.c for the error, and the place where it seems
to actually trigger in the test case:
./src/emacs -Q --batch -f batch-byte-compile /tmp/t.el
-> /tmp/t.el:3:1: Error: Wrong number of arguments: (2 . 2), 1
Is here:
Lisp_Object
exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args)
{
[...]
if (! (mandatory <= nargs && nargs <= maxargs))
Fsignal (Qwrong_number_of_arguments,
list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)),
make_fixnum (nargs)));
Which seems odd -- you'd expect it to bug out much earlier, in
macroexpand, as Andreas says.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no