[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHv4 1/4] `kill-buffer' runs query functions before checking buf
From: |
Michal Nazarewicz |
Subject: |
Re: [PATCHv4 1/4] `kill-buffer' runs query functions before checking buffer modification. |
Date: |
Mon, 24 Jun 2013 20:31:46 +0200 |
User-agent: |
Notmuch/0.15.2+55~geb6e9d8 (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu) |
On Mon, Jun 24 2013, martin rudalics wrote:
> > * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
> > before checking whether buffer is modified. This lets
> > `kill-buffer-query-functions' cancel killing of the buffer or save
> > its content before `kill-buffer' asks user the "Buffer %s
> > modified; kill anyway?" question.
>
> We probably should guard against the case that the query functions
> manage to kill the buffer prematurely.
Except this would exactly defeat the purposes of this change. Unless
I don't understand what you mean by “prematurely”. I'm assuming you
want to prevent a function from doing:
(set-buffer-modified-p nil)
(let (kill-buffer-query-functions)
(kill-buffer (current-buffer)))
or just that part without let. But (set-buffer-modified-p nil) is
exactly what remember-notes--kill-buffer-query wants to do (admittedly
saving the contents prior).
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: address@hidden>--------------ooO--(_)--Ooo--
signature.asc
Description: PGP signature
[PATCHv4 3/4] Add `remember-notes' function to store notes across Emacs restarts., Michal Nazarewicz, 2013/06/24
[PATCHv4 4/4] Simplify conditional expression in `find-file-noselect'., Michal Nazarewicz, 2013/06/24
Re: [PATCHv4 0/4] Add `remember-notes' function, Stefan Monnier, 2013/06/30