[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/minibuf.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/minibuf.c |
Date: |
Fri, 28 May 2004 22:58:13 -0400 |
Index: emacs/src/minibuf.c
diff -c emacs/src/minibuf.c:1.266 emacs/src/minibuf.c:1.267
*** emacs/src/minibuf.c:1.266 Fri Feb 6 04:49:55 2004
--- emacs/src/minibuf.c Fri May 28 20:52:05 2004
***************
*** 1,5 ****
/* Minibuffer input and completion.
! Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03
Free Software Foundation, Inc.
This file is part of GNU Emacs.
--- 1,5 ----
/* Minibuffer input and completion.
! Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03,04
Free Software Foundation, Inc.
This file is part of GNU Emacs.
***************
*** 209,214 ****
--- 209,215 ----
/* Actual minibuffer invocation. */
static Lisp_Object read_minibuf_unwind P_ ((Lisp_Object));
+ static Lisp_Object run_exit_minibuf_hook P_ ((Lisp_Object));
static Lisp_Object read_minibuf P_ ((Lisp_Object, Lisp_Object,
Lisp_Object, Lisp_Object,
int, Lisp_Object,
***************
*** 563,568 ****
--- 564,575 ----
record_unwind_protect (read_minibuf_unwind, Qnil);
minibuf_level++;
+ /* We are exiting the minibuffer one way or the other, so run the hook.
+ It should be run before unwinding the minibuf settings. Do it
+ separately from read_minibuf_unwind because we need to make sure that
+ read_minibuf_unwind is fully executed even if exit-minibuffer-hook
+ signals an error. --Stef */
+ record_unwind_protect (run_exit_minibuf_hook, Qnil);
/* Now that we can restore all those variables, start changing them. */
***************
*** 822,827 ****
--- 829,845 ----
return buf;
}
+ static Lisp_Object
+ run_exit_minibuf_hook (data)
+ Lisp_Object data;
+ {
+ if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound)
+ && !NILP (Vrun_hooks))
+ safe_run_hooks (Qminibuffer_exit_hook);
+
+ return Qnil;
+ }
+
/* This function is called on exiting minibuffer, whether normally or
not, and it restores the current window, buffer, etc. */
***************
*** 831,842 ****
{
Lisp_Object old_deactivate_mark;
Lisp_Object window;
-
- /* We are exiting the minibuffer one way or the other,
- so run the hook. */
- if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound)
- && !NILP (Vrun_hooks))
- safe_run_hooks (Qminibuffer_exit_hook);
/* If this was a recursive minibuffer,
tie the minibuffer window back to the outer level minibuffer buffer. */
--- 849,854 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/minibuf.c,
Stefan Monnier <=