unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Lisp help: debug-on-error not effective twice?
@ 2004-04-24  7:41 Lars Brinkhoff
  2004-04-25 11:43 ` Lars Brinkhoff
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Brinkhoff @ 2004-04-24  7:41 UTC (permalink / raw)


If I run this (in *scratch*) in GNU Emacs 21.3:

    (defun my-debug (&rest args)
      (print "foo")
      (throw 'error nil))

    (let ((debug-on-error t)
          (debug-on-quit t)
          (debug-on-signal t)
          (debug-ignored-errors nil)
          (debugger 'my-debug))
      (catch 'error
        (car))
      ;;(debug)
      (print (format "debug-on-error = %s" debug-on-error))
      (catch 'error
        (car)))

I get one "foo" from my-debug, then "debug-on-error = t", and then the
error "Wrong number of arguments: #<subr car>, 0".

Why isn't my-debug called twice?

If I uncomment (debug) and enter 'c' in the debugger to contine,
my-debug does get called twice.  Is debug doing something magic?

-- 
Lars Brinkhoff,         Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting    http://www.brinkhoff.se/

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

end of thread, other threads:[~2004-04-25 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1357.1082792547.1061.help-gnu-emacs@gnu.org>
2004-04-25  1:12 ` Lisp help: debug-on-error not effective twice? Jesper Harder
2004-04-24  7:41 Lars Brinkhoff
2004-04-25 11:43 ` Lars Brinkhoff

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