From: Michal Nazarewicz <mina86@mina86.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: [PATCHv4 1/4] `kill-buffer' runs query functions before checking buffer modification.
Date: Tue, 25 Jun 2013 00:35:32 +0200 [thread overview]
Message-ID: <xa1tfvw787d7.fsf@mina86.com> (raw)
In-Reply-To: <51C8B2AF.2090409@gmx.at>
[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]
On Mon, Jun 24 2013, martin rudalics wrote:
> Sure. What I meant is that `kill-buffer' should return immediately when
> the buffer is dead after calling the query functions instead of entering
> the do_yes_or_no_p stuff with a dead buffer. Or did I miss something?
Ah, right. Changing the
if (INTERACTIVE && !NILP (BVAR (b, filename))
&& BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
condition to
if (INTERACTIVE && BUFFER_LIVE_P (b) && !NILP (BVAR (b, filename))
&& BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
would solve the issue. Either that or adding
if (!BUFFER_LIVE_P (b))
return unbind_to (count, Qt);
just prior to the whole if statement which has the side effect of not
calling kill-buffer-hook if any of the kill-buffer-query-functions kills
the buffer, which actually may be desired.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2013-06-24 22:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 12:35 [PATCHv4 0/4] Add `remember-notes' function Michal Nazarewicz
2013-06-24 12:35 ` [PATCHv4 1/4] `kill-buffer' runs query functions before checking buffer modification Michal Nazarewicz
2013-06-24 17:05 ` martin rudalics
2013-06-24 18:31 ` Michal Nazarewicz
2013-06-24 20:57 ` martin rudalics
2013-06-24 22:35 ` Michal Nazarewicz [this message]
2013-06-25 6:47 ` martin rudalics
2013-06-24 12:35 ` [PATCHv4 2/4] `remember-append-to-file' appending to buffer bug fix Michal Nazarewicz
2013-06-24 12:35 ` [PATCHv4 3/4] Add `remember-notes' function to store notes across Emacs restarts Michal Nazarewicz
2013-06-24 12:35 ` [PATCHv4 4/4] Simplify conditional expression in `find-file-noselect' Michal Nazarewicz
2013-06-30 22:29 ` [PATCHv4 0/4] Add `remember-notes' function Stefan Monnier
2013-07-04 12:56 ` Michal Nazarewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xa1tfvw787d7.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.