From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#26650: 26.0.50; Protect *Backtrace* from accidental killing Date: Tue, 23 May 2017 20:18:08 -0400 Message-ID: <87zie35cqn.fsf@users.sourceforge.net> References: <871ssgvgof.fsf@calancha-pc> <87wpa8ofcc.fsf@users.sourceforge.net> <87shkwodmv.fsf@users.sourceforge.net> <838tmnpjly.fsf@gnu.org> <83wpa7o2gn.fsf@gnu.org> <87k267nxf9.fsf@users.sourceforge.net> <83o9vjnpzn.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495585035 4236 195.159.176.226 (24 May 2017 00:17:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 May 2017 00:17:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 26650@debbugs.gnu.org, tino.calancha@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 24 02:17:10 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 1dDJz9-0000tH-29 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 May 2017 02:17:07 +0200 Original-Received: from localhost ([::1]:52021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDJzE-0008AR-FI for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 May 2017 20:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDJz7-00088u-Mq for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 20:17:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDJz4-0005vb-J8 for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 20:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDJz4-0005vT-Fd for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 20:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dDJz4-0001dk-BH for bug-gnu-emacs@gnu.org; Tue, 23 May 2017 20:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 May 2017 00:17:02 +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.14955849985220 (code B ref 26650); Wed, 24 May 2017 00:17:02 +0000 Original-Received: (at 26650) by debbugs.gnu.org; 24 May 2017 00:16:38 +0000 Original-Received: from localhost ([127.0.0.1]:35251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDJyg-0001Lv-0U for submit@debbugs.gnu.org; Tue, 23 May 2017 20:16:38 -0400 Original-Received: from mail-it0-f53.google.com ([209.85.214.53]:36450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDJye-0001Gl-GT; Tue, 23 May 2017 20:16:36 -0400 Original-Received: by mail-it0-f53.google.com with SMTP id o5so29543213ith.1; Tue, 23 May 2017 17:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=1adRD2tyGtF60N+MfugTQsZnsXfg6HBdQRhC/2F8S4k=; b=SiDH9RGDU5J3rF8G0TvTiGkne1Vl362jNJsObHtrzA6V92urtbtXD2G+czFfQZhSn6 BAMWb6/kktyL2gCzpLWNcGriIkazSWo17sLmQ7KVhHr09Dav0fN80jMcb6E0bonbp90U /LpOTiVhqaQsoaEuw1t1Sfo832givH2/QbgW3sHtRRbsMs6Qv6p2o9lyxlxk075pSXSj 8I94+3mfqOZqAObjZyRQr/K7SnX5NihbtuLdSZFk7MTCtioVqKCQFyOXNVxiZxbnJeIW nunYneVxK87KmlRG1IvyvVsTkTBtW/BWtYnt2HmijNudtmS0RGuzQ7e7tyfsoI5sh3MI Ka2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=1adRD2tyGtF60N+MfugTQsZnsXfg6HBdQRhC/2F8S4k=; b=SzxlKBpgAXotxh5ApDJdlEy9YlEetppJL7V2jpW0Mk23DBEn+9vp+qH4h616YJYy8Z qhxII0T/LQDXRvC+K3FQkOg6FL2XGCh2aP2pwMDgehKwSrC2wqXGTHHgmOeiy7YiuY8z T8zLjtE0qcla8Jh+tXvZpxIt3wRq9DVvs8XAnNuW3j6TOtMEik0gKHxLIr3HqhYlx46W qvr09dPICkg0vBV4Vc9PTp1jX1GBNrxiaEgWRKtjiKQcuWhViOIMg/jF2NdTUWO2Em7o tQkiW/JBWb/GjAT3AfHzDYOZqV1+IcWMmhx2txx1YOzOLE15RFZyut0K7LCQdtYmhRRq 6OzA== X-Gm-Message-State: AODbwcDzQeAD03Ney1OFdhSTjFqw3CoHVWZAfew8HO26fqU+57Rbh87m wgtkEFOJHHTosw== X-Received: by 10.36.213.198 with SMTP id a189mr6049116itg.106.1495584990969; Tue, 23 May 2017 17:16:30 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id h189sm991356ith.6.2017.05.23.17.16.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2017 17:16:30 -0700 (PDT) In-Reply-To: <83o9vjnpzn.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Apr 2017 18:33:00 +0300") 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:132773 Archived-At: tags 26650 fixed close 26650 26.1 quit Eli Zaretskii writes: >> >> >> + (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? >> >> No, because `add-hook' is called with non-nil LOCAL arg. >> > >> > Right, sorry for not paying attention. >> >> Maybe I should have written >> >> (add-hook 'kill-buffer-hook (lambda ...) nil 'local) >> >> to emphasize this? > > It's up to you, but the fact that I didn't see it is not a reason good > enough to change anything, IMO. Coming back to this, I found having the "... nil t)" on the same line as the lambda confusing to read. So I moved them to the next line; I didn't change the "t" to "local" [1: ef9f5c672a]. [1: ef9f5c672a]: 2017-05-23 20:11:23 -0400 Protect *Backtrace* from being killed (Bug#26650) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=ef9f5c672a8e248dd7bd682101c03feb2e527340