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: Wed, 26 Apr 2017 08:52:26 -0400 Message-ID: <87k267nxf9.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493211141 24080 195.159.176.226 (26 Apr 2017 12:52:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2017 12:52:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 26650@debbugs.gnu.org, Tino Calancha To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 26 14:52:15 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 1d3MQZ-00063v-AD for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Apr 2017 14:52:15 +0200 Original-Received: from localhost ([::1]:55066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3MQc-0004sM-1f for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Apr 2017 08:52:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3MQP-0004qz-Mr for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 08:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3MQM-0004qS-GG for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 08:52:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42491) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3MQM-0004q3-Bs for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d3MQM-0002xW-0M for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2017 08:52: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, 26 Apr 2017 12:52: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.149321106211308 (code B ref 26650); Wed, 26 Apr 2017 12:52:01 +0000 Original-Received: (at 26650) by debbugs.gnu.org; 26 Apr 2017 12:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:40690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3MPO-0002wK-HU for submit@debbugs.gnu.org; Wed, 26 Apr 2017 08:51:02 -0400 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:35148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3MPM-0002vq-Ri for 26650@debbugs.gnu.org; Wed, 26 Apr 2017 08:51:01 -0400 Original-Received: by mail-it0-f67.google.com with SMTP id 70so350468ita.2 for <26650@debbugs.gnu.org>; Wed, 26 Apr 2017 05:51:00 -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=qF19qQ8NI0VIxWu9j3VKbtviqEJEGs3+j2tCddyEKH4=; b=nqvlXnw/WaHxrlePOYe2Nzu7C/oeJKyzEq7nOXrKBZE1DRvJi52pxeR5pwbeXK2Yzk 5xsXvWEswrxG3/x+eFaBi0viZv3W6ju58YUBMX4Vk4k07pSeOS7UVN51imBeoK8NCicm VVKs5bFNIIXVMcThydFHkR2z7Q5WXpNqkqCoNUnJfJBKkCo3rDlwPeECI4X/sy6gT/dV msnJrQY6chceA0mpNzN+88JPtZL/GitTV3RXq8dElzjc+CWtih+oqSQqnC9ECbeD3vnZ yXHQHVffj73Yk5EDZvDJK0BhqWGhzDobha07+Otzw9Hsswkq3d/JgwvJSrftj+205E28 tDRw== 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=qF19qQ8NI0VIxWu9j3VKbtviqEJEGs3+j2tCddyEKH4=; b=Zgiogz0+rYPcehyTRvAj96Jcbzaj+P7VXDCkkTHA8ounrdHUJAyryxEssjvI+JpDrX kiWflUxNBiPD0FQUSX7fziDx3SOgKdsjK2iCL17Or/9pzmH8WCP8sK8ChxnusCYnLXmh OhKL6UwJTaSU/Zk/NUMuObaWBZL2ZZUrAHp2J45Ne0BDX+0l3toTYYBKWXG5aSunGN+F yT6N0fNcD8s6hcaJdGkWlaFDd62aSeN5AmsElv3wUbZi1BMU5wb108xTWtBeIGzJqTSt aEg2+V3Guy40pQyLKgRHWAYD5sruE25OL8cBmbfpcoYpPpkK5qcW30g780mejxLrlthw aTTg== X-Gm-Message-State: AN3rC/7Fw5nisWq/bdZd/wjrGRrxyXzgTBj7M7RFBADkLdnaSvtJ+tGC bDz8InBIBzM2hw== X-Received: by 10.36.152.196 with SMTP id n187mr881814itd.28.1493211055116; Wed, 26 Apr 2017 05:50:55 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 66sm1527691ior.34.2017.04.26.05.50.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Apr 2017 05:50:54 -0700 (PDT) In-Reply-To: <83wpa7o2gn.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Apr 2017 14:03:36 +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:132014 Archived-At: 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? I'm still undecided on the general style question of whether to use t or ' in these cases.