From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#26650: 26.0.50; Protect *Backtrace* from accidental killing Date: Wed, 26 Apr 2017 12:49:11 +0200 Message-ID: <87d1bz4f6g.fsf@drachen> References: <871ssgvgof.fsf@calancha-pc> <87wpa8ofcc.fsf@users.sourceforge.net> <87shkwodmv.fsf@users.sourceforge.net> <838tmnpjly.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493203950 16707 195.159.176.226 (26 Apr 2017 10:52:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2017 10:52:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 26650@debbugs.gnu.org, npostavs@users.sourceforge.net, tino.calancha@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 26 12:52:26 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3KYb-0004FC-9h for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Apr 2017 12:52:25 +0200 Original-Received: from localhost ([::1]:54232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3KYf-0002cD-T8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Apr 2017 06:52:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3KWN-0000jH-Vh for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 06:50:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3KWI-0007A9-Ec for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 06:50:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42409) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3KWI-0007A0-Ap for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 06:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d3KWH-0006Z2-UL for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 06:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Apr 2017 10:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26650 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 26650-submit@debbugs.gnu.org id=B26650.149320377125149 (code B ref 26650); Wed, 26 Apr 2017 10:50:01 +0000 Original-Received: (at 26650) by debbugs.gnu.org; 26 Apr 2017 10:49:31 +0000 Original-Received: from localhost ([127.0.0.1]:40608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3KVm-0006XY-SI for submit@debbugs.gnu.org; Wed, 26 Apr 2017 06:49:31 -0400 Original-Received: from mout.web.de ([212.227.17.11]:63038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3KVl-0006XD-EX for 26650@debbugs.gnu.org; Wed, 26 Apr 2017 06:49:29 -0400 Original-Received: from drachen.dragon ([88.73.21.103]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MAdst-1dF6jv3x9f-00Bpls; Wed, 26 Apr 2017 12:49:09 +0200 In-Reply-To: <838tmnpjly.fsf@gnu.org> (Eli Zaretskii's message of "W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kxFn5iOKTnQbnVzbB56GWrN6wrM2AjPPwz65yGdQebE7V3kcJGlwT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132006 Archived-At: Eli Zaretskii writes: > > From: npostavs@users.sourceforge.net > > Date: Tue, 25 Apr 2017 08:50:00 -0400 > > Cc: 26650@debbugs.gnu.org > > > > diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el > > index 94b683dcb9..0aef94f1d2 100644 > > --- a/lisp/emacs-lisp/debug.el > > +++ b/lisp/emacs-lisp/debug.el > > @@ -753,6 +753,8 @@ debugger-mode > > \\{debugger-mode-map}" > > (setq truncate-lines t) > > (set-syntax-table emacs-lisp-mode-syntax-table) > > + (add-hook 'kill-buffer-hook > > + (lambda () (if (> (recursion-depth) 0) (top-level))) nil t) > > This will throw to top-level when _any_ buffer is killed, as long as > we are in recursive-edit, no? Is that a good idea? Shouldn't this > hook do that only for *Backtrace*? Did you notice that the lambda is added to the buffer-local binding of the hook? If you did, I don't understand why this would happen. If you didn't, maybe a line break should be added after the lambda expression? Michael.