unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 67196@debbugs.gnu.org, acm@muc.de, monnier@iro.umontreal.ca
Subject: bug#67196: M-: uses a wrong value of debug-on-error when it is nil.
Date: Sat, 25 Nov 2023 17:36:37 +0000	[thread overview]
Message-ID: <ZWIwpSo950ZrEqo_@ACM> (raw)
In-Reply-To: <ZWIncbvgpPxb2WPq@ACM>

Hello again, Eli.

On Sat, Nov 25, 2023 at 16:57:21 +0000, Alan Mackenzie wrote:
> On Sat, Nov 25, 2023 at 18:46:05 +0200, Eli Zaretskii wrote:
> > > Date: Sat, 25 Nov 2023 16:40:40 +0000
> > > Cc: monnier@iro.umontreal.ca, 67196@debbugs.gnu.org, acm@muc.de
> > > From: Alan Mackenzie <acm@muc.de>

> > > > > Instead, the new internal variable
> > > > > debug-from--eval-expression gets set to e-e-debug-on-error.

> > > > Exactly.  And that value can be non-nil, but also not t.  That is the
> > > > change I see, and your doc string suggests that it is intentional.
> > > > Thus, we have a behavior change wrt to the value that the body of
> > > > eval-expression will see.  And non-nil, non-t values have special
> > > > meaning there.

> > > OK, I'm with you, now.  The non-nil, non-t value in the internal variable
> > > debug-from--e-e won't be seen by any Lisp code.  It can be seen by Lisp
> > > code in eval-expression-debug-on-error.

> > > This is an extension of e-e-debug-on-error to match what debug-on-error
> > > does.  I wouldn't think that d-o-e gets set to a list of conditions very
> > > often, but when it does, it's likely very useful.  It seemed logical to
> > > extend the same facility to e-e-debug-on-error.  Do you think this is a
> > > bad idea?  [Clearly, some entries in NEWS will be needed, as well as
> > > amendments to the Elisp manual.]

> > I don't know yet if it is a good idea, I just wanted to point out that
> > your change is not just a bugfix: it actually changes the behavior of
> > eval-expression.

> OK.  It's a change that would be trivially easy to reverse.

> My guess is that debug-on-error was originally a DEFVAR_BOOL, and at some
> stage it was extended to handle a list of conditions.  But for some
> reason eval-expression-debug-on-error was not extended in the same way.
> Perhaps this was an oversight.  If so, now would be a good time to fix
> this.

> Maybe there is some evidence of what happened in the repository.  I'll
> have a look.

eval-expression-debug-on-error came into existence with this commit:

commit b49df39ddcfc578234530208eba8e288f604db1b
Author: Richard M. Stallman <rms@gnu.org>
Date:   Tue Sep 14 07:00:04 1999 +0000

    (eval-expression-print-level): New variable.
    (eval-expression-print-length): New variable.
    (eval-expression-debug-on-error): New variable.
    (eval-expression): Bind print-level, print-length and
    debug-on-error from those vars.

..  debug-on-error got its list value with this commit:

commit 128c0f667926dd4296411b9189125ee8c5b78b79
Author: Roland McGrath <roland@gnu.org>
Date:   Thu Jun 4 04:33:43 1992 +0000

    *** empty log message ***

..  So debug-on-error had its list of conditions value 7 years before
eval-expression-debug-on-error existed.  It's not clear why this new
variable didn't take over the enhanced semantics from debug-on-error.

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2023-11-25 17:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 13:48 bug#67196: M-: uses a wrong value of debug-on-error when it is nil Alan Mackenzie
2023-11-15 17:19 ` Eli Zaretskii
2023-11-15 17:55   ` Alan Mackenzie
2023-11-19 17:19     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-19 17:33       ` Eli Zaretskii
     [not found]         ` <87a5r9efj0.fsf@dick>
2023-11-19 19:30           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-24 17:10       ` Alan Mackenzie
2023-11-24 18:48         ` Eli Zaretskii
2023-11-24 20:54           ` Alan Mackenzie
2023-11-24 21:25             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-24 22:21               ` Alan Mackenzie
2023-11-25  7:59                 ` Eli Zaretskii
2023-11-25 10:32                   ` Alan Mackenzie
2023-11-25 11:15                     ` Eli Zaretskii
2023-11-25 12:40                       ` Alan Mackenzie
2023-11-25 13:04                         ` Eli Zaretskii
2023-11-25 14:14                           ` Alan Mackenzie
2023-11-25 15:50                             ` Eli Zaretskii
2023-11-25 16:40                               ` Alan Mackenzie
2023-11-25 16:46                                 ` Eli Zaretskii
2023-11-25 16:57                                   ` Alan Mackenzie
2023-11-25 17:36                                     ` Alan Mackenzie [this message]
2023-11-25 18:12                                     ` Andreas Schwab
2023-11-25 14:23                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-17  4:23                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-19  3:54                         ` Richard Stallman
2023-12-19  5:05                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-25  3:41                             ` Richard Stallman
2023-12-26  2:39                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-27  4:54                                 ` Richard Stallman
2023-11-25  7:30             ` Eli Zaretskii
2023-11-24 20:22         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=ZWIwpSo950ZrEqo_@ACM \
    --to=acm@muc.de \
    --cc=67196@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).