emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs 25.1 RC1: incipient insanity, or can't set debug-on-error.


From: Stephen Berman
Subject: Re: Emacs 25.1 RC1: incipient insanity, or can't set debug-on-error.
Date: Tue, 26 Jul 2016 23:11:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

On Tue, 26 Jul 2016 20:34:50 +0000 Alan Mackenzie <address@hidden> wrote:

> Hello, Emacs.
>
> Start RC1 with emacs -Q.
>
> M-: debug-on-error returns t.
> C-h v debug-on-error states that the variable has value nil.  How can
>   this be?
>
> M-: (setq debug-on-error nil) ; in buffer *scratch*, still.
> M-: debug-on-error returns t.  How can this be?
>
> Why does this variable behave so strangely?  Or am I going mad?  Or,
> even both?  Should I submit a bug report for this?

It's in the definition of eval-expression:

    (let ((old-value (make-symbol "t")) new-value)
      ;; Bind debug-on-error to something unique so that we can
      ;; detect when evalled code changes it.
      (let ((debug-on-error old-value))
        (push (eval (macroexpand-all exp) lexical-binding) values)
        (setq new-value debug-on-error))
      ;; If evalled code has changed the value of debug-on-error,
      ;; propagate that change to the global binding.
      (unless (eq old-value new-value)
        (setq debug-on-error new-value))))

eval-last-sexp does essentially the same thing.

Steve Berman



reply via email to

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