From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: BUG REPORT: `kill-buffer-query-functions'
Date: Mon, 03 Mar 2003 13:58:55 -0500 [thread overview]
Message-ID: <E18pv9L-0004kX-00@fencepost.gnu.org> (raw)
In-Reply-To: <b3p893$986$1@main.gmane.org> (message from Le Wang on Fri, 28 Feb 2003 22:08:53 -0500)
Now I understand. Does this fix it?
Thanks.
*** buffer.c.~1.414.~ Wed Feb 26 04:57:11 2003
--- buffer.c Sun Mar 2 15:07:46 2003
***************
*** 150,155 ****
--- 150,156 ----
/* List of functions to call that can query about killing a buffer.
If any of these functions returns nil, we don't kill it. */
Lisp_Object Vkill_buffer_query_functions;
+ Lisp_Object Qkill_buffer_query_functions;
/* List of functions to call before changing an unmodified buffer. */
Lisp_Object Vfirst_change_hook;
***************
*** 1304,1321 ****
{
int count = SPECPDL_INDEX ();
Lisp_Object list;
record_unwind_protect (save_excursion_restore, save_excursion_save ());
set_buffer_internal (b);
/* First run the query functions; if any query is answered no,
don't kill the buffer. */
! for (list = Vkill_buffer_query_functions; CONSP (list); list = XCDR (list))
! {
! tem = call0 (XCAR (list));
! if (NILP (tem))
! return unbind_to (count, Qnil);
! }
/* Then run the hooks. */
Frun_hooks (1, &Qkill_buffer_hook);
--- 1305,1320 ----
{
int count = SPECPDL_INDEX ();
Lisp_Object list;
+ Lisp_Object arglist[1];
record_unwind_protect (save_excursion_restore, save_excursion_save ());
set_buffer_internal (b);
/* First run the query functions; if any query is answered no,
don't kill the buffer. */
! arglist[0] = Qkill_buffer_query_functions;
! if (NILP (Frun_hook_with_args_until_failure (1, arglist)))
! return unbind_to (count, Qnil);
/* Then run the hooks. */
Frun_hooks (1, &Qkill_buffer_hook);
***************
*** 5150,5155 ****
--- 5149,5157 ----
Qafter_change_functions = intern ("after-change-functions");
staticpro (&Qafter_change_functions);
staticpro (&Qucs_set_table_for_input);
+
+ Qkill_buffer_query_functions = intern ("kill-buffer-query-functions");
+ staticpro (&Qkill_buffer_query_functions);
Fput (Qprotected_field, Qerror_conditions,
Fcons (Qprotected_field, Fcons (Qerror, Qnil)));
next prev parent reply other threads:[~2003-03-03 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-27 23:48 BUG REPORT: `kill-buffer-query-functions' Le Wang
2003-03-01 2:26 ` Richard Stallman
2003-03-01 3:08 ` Le Wang
2003-03-03 18:58 ` Richard Stallman [this message]
2003-03-04 0:57 ` Le Wang
2003-03-05 20:48 ` Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E18pv9L-0004kX-00@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).