emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accuracy of procedure name in error messages


From: Alex
Subject: Accuracy of procedure name in error messages
Date: Mon, 09 Oct 2017 12:30:48 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

For what brought up this question, see:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-10/msg00261.html

The procedure that's named in error messages seems to be incorrect in
some cases, especially in bytecode.

For example, evaluate:

  (defun outer ()
    (inner))

  (defun inner ()
    (setq global (1+ nil)))

With eval-expression-debug-on-error non-nil, evaluate (outer). The
debugger pops up with "1+(nil)" at the top, but the error message
displayed after continuing is:

setq: Wrong type argument: number-or-marker-p, nil

Shouldn't it say "1+: Wrong type..."?

Now if you byte-compile `outer' and `inner' and evaluate (outer), then
the debugger pops up with "inner()" at the top. The error message
displayed after continuing is:

outer: Wrong type argument: number-or-marker-p, nil

So it seems that the error message is created one frame off, and the
bytecode versions ignore primitives like `setq' and `1+'.

Is this a known limitation, and/or should I file a bug report?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]