unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.50; catching C-x 3 in yes-or-no-p
@ 2008-01-21  0:14 Lennart Borgman (gmail)
  2008-01-21 20:30 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-21  0:14 UTC (permalink / raw)
  To: emacs-pretest-bug

The error raised when doing C-x 3 when yes-or-no-p is active can not be 
handled.

To see this start from

    emacs -Q

and eval this function in the *scratch* buffer

   (defun protected-yes-or-no-p ()
     (condition-case err
         (yes-or-no-p "Prompt ")
       (error
       (lwarn 'got-error :warning "%s" err))))

and call it. When the prompt is visible type

   C-x 3


In GNU Emacs 23.0.50.1 (i386-mingw-nt5.1.2600)
  of 2008-01-13

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 23.0.50; catching C-x 3 in yes-or-no-p
  2008-01-21  0:14 23.0.50; catching C-x 3 in yes-or-no-p Lennart Borgman (gmail)
@ 2008-01-21 20:30 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2008-01-21 20:30 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug

    and eval this function in the *scratch* buffer

       (defun protected-yes-or-no-p ()
	 (condition-case err
	     (yes-or-no-p "Prompt ")
	   (error
	   (lwarn 'got-error :warning "%s" err))))

    and call it. When the prompt is visible type

       C-x 3

I think I figured out what happened.
I suspect that you called it with M-:, right?
That binds debug-on-error to t.

yes-or-no-p starts a recursive editing loop, and when there are no
handlers _inside_ the recursive editing loop and debug-on-error is t,
errors invoke the debugger.  So this error invokes the debugger.

I think that qualifies as a bug.  Perhaps the right fix is that
recursive editin levels should bind debug-on-error to nil.
Does anyone see a problem in that fix?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-21 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21  0:14 23.0.50; catching C-x 3 in yes-or-no-p Lennart Borgman (gmail)
2008-01-21 20:30 ` Richard Stallman

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).