[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp help: debug-on-error not effective twice?
From: |
Lars Brinkhoff |
Subject: |
Re: Lisp help: debug-on-error not effective twice? |
Date: |
25 Apr 2004 13:43:22 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Lars Brinkhoff <lars@nocrew.org> writes:
> 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)
> (debugger 'my-debug))
> (catch 'error
> (car))
> (catch 'error
> (car)))
>
> I get one "foo" from my-debug and then the error "Wrong number of
> arguments: #<subr car>, 0". Why isn't my-debug called twice?
It turns out that the debugger won't be calles unless there was an
input event in between two errors. To work around this, I could
insert
(incf num-nonmacro-input-events)
somewhere before the second error is signaled. Would that have any
undesirable side effects?
--
Lars Brinkhoff, Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting http://www.brinkhoff.se/