Mercurial > emacs
changeset 6742:ef62a96ce830
(Vminibuffer_exit_hook): New variable.
(read_minibuf): Run hook when exiting minibuffer.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 08 Apr 1994 01:38:48 +0000 |
parents | 840862375e93 |
children | 77349221ca81 |
files | src/minibuf.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/minibuf.c Fri Apr 08 01:27:28 1994 +0000 +++ b/src/minibuf.c Fri Apr 08 01:38:48 1994 +0000 @@ -79,9 +79,10 @@ Lisp_Object Qread_file_name_internal; -/* Normal hook for entry to minibuffer. */ +/* Normal hooks for entry to and exit from minibuffer. */ Lisp_Object Qminibuffer_setup_hook, Vminibuffer_setup_hook; +Lisp_Object Qminibuffer_exit_hook, Vminibuffer_exit_hook; /* Nonzero means completion ignores case. */ @@ -266,6 +267,10 @@ /* ??? MCC did redraw_screen here if switching screens. */ recursive_edit_1 (); + if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) + && !NILP (Vrun_hooks)) + call1 (Vrun_hooks, Qminibuffer_exit_hook); + /* If cursor is on the minibuffer line, show the user we have exited by putting it in column 0. */ if ((FRAME_CURSOR_Y (selected_frame) @@ -1589,10 +1594,17 @@ Qminibuffer_setup_hook = intern ("minibuffer-setup-hook"); staticpro (&Qminibuffer_setup_hook); + Qminibuffer_exit_hook = intern ("minibuffer-exit-hook"); + staticpro (&Qminibuffer_exit_hook); + DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook, "Normal hook run just after entry to minibuffer."); Vminibuffer_setup_hook = Qnil; + DEFVAR_LISP ("minibuffer-exit-hook", &Vminibuffer_exit_hook, + "Normal hook run just after exit from minibuffer."); + Vminibuffer_exit_hook = Qnil; + DEFVAR_BOOL ("completion-auto-help", &auto_help, "*Non-nil means automatically provide help for invalid completion input."); auto_help = 1;