[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26650: 26.0.50; Protect *Backtrace* from accidental killing
From: |
npostavs |
Subject: |
bug#26650: 26.0.50; Protect *Backtrace* from accidental killing |
Date: |
Tue, 23 May 2017 20:18:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
tags 26650 fixed
close 26650 26.1
quit
Eli Zaretskii <eliz@gnu.org> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#26650: 26.0.50; Protect *Backtrace* from accidental killing,
npostavs <=