emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: defadvice protect / (error ...)


From: David Reitter
Subject: Re: defadvice protect / (error ...)
Date: Wed, 13 Jul 2005 13:28:35 +0100

On 12 Jul 2005, at 19:06, Richard M. Stallman wrote:

    (defadvice error (around ring-bell (&rest args) activate protect)
       (let ((ring-bell-function nil))
     (ding)
     ad-do-it))

    lets ring-bell-function set to nil after (error "xxx") is called.

I can't reproduce that. If I have set ring-bell-function to a non- nil value
before, it is still non-nil when I get back to the main loop.

Evaluate these:

--
(setq ring-bell-function (lambda () (print 'ring)))

(defadvice error (around ring-bell (&rest args) activate protect)
  (let ((ring-bell-function nil))
    (ding)
    ad-do-it))


(error "asd")

--
The debugger window should appear.
Then type either C-x 0 or C-x k RET to get rid the window (or the buffer).
Do NOT type q.

Then evalute ring-bell-function.
It's nil.

If you quit the debugger buffer with q, the problem doesn't occur.






reply via email to

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