From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Brinkhoff Newsgroups: gmane.emacs.help Subject: Re: Lisp help: debug-on-error not effective twice? Date: 25 Apr 2004 13:43:22 +0200 Organization: nocrew Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <85smes5llx.fsf@junk.nocrew.org> References: <85y8ol6cw3.fsf@junk.nocrew.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082894140 13785 80.91.224.253 (25 Apr 2004 11:55:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Apr 2004 11:55:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 25 13:55:32 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BHiEO-0007PY-00 for ; Sun, 25 Apr 2004 13:55:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BHi6d-0005ZX-BP for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Apr 2004 07:47:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BHi3b-0004O4-R9 for help-gnu-emacs@gnu.org; Sun, 25 Apr 2004 07:44:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BHi32-000402-B7 for help-gnu-emacs@gnu.org; Sun, 25 Apr 2004 07:44:21 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BHi2s-0003g7-2l for help-gnu-emacs@gnu.org; Sun, 25 Apr 2004 07:43:38 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BHi2e-0005NZ-00 for ; Sun, 25 Apr 2004 13:43:24 +0200 Original-Received: from junk.nocrew.org ([213.242.147.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Apr 2004 13:43:24 +0200 Original-Received: from lars by junk.nocrew.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Apr 2004 13:43:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: junk.nocrew.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17976 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17976 Lars Brinkhoff 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: #, 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/