Mercurial > emacs
comparison src/minibuf.c @ 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 | 9ecffdca3b7a |
children | 5c7386328308 |
comparison
equal
deleted
inserted
replaced
6741:840862375e93 | 6742:ef62a96ce830 |
---|---|
77 | 77 |
78 Lisp_Object Qminibuffer_history; | 78 Lisp_Object Qminibuffer_history; |
79 | 79 |
80 Lisp_Object Qread_file_name_internal; | 80 Lisp_Object Qread_file_name_internal; |
81 | 81 |
82 /* Normal hook for entry to minibuffer. */ | 82 /* Normal hooks for entry to and exit from minibuffer. */ |
83 | 83 |
84 Lisp_Object Qminibuffer_setup_hook, Vminibuffer_setup_hook; | 84 Lisp_Object Qminibuffer_setup_hook, Vminibuffer_setup_hook; |
85 Lisp_Object Qminibuffer_exit_hook, Vminibuffer_exit_hook; | |
85 | 86 |
86 /* Nonzero means completion ignores case. */ | 87 /* Nonzero means completion ignores case. */ |
87 | 88 |
88 int completion_ignore_case; | 89 int completion_ignore_case; |
89 | 90 |
263 && !NILP (Vrun_hooks)) | 264 && !NILP (Vrun_hooks)) |
264 call1 (Vrun_hooks, Qminibuffer_setup_hook); | 265 call1 (Vrun_hooks, Qminibuffer_setup_hook); |
265 | 266 |
266 /* ??? MCC did redraw_screen here if switching screens. */ | 267 /* ??? MCC did redraw_screen here if switching screens. */ |
267 recursive_edit_1 (); | 268 recursive_edit_1 (); |
269 | |
270 if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) | |
271 && !NILP (Vrun_hooks)) | |
272 call1 (Vrun_hooks, Qminibuffer_exit_hook); | |
268 | 273 |
269 /* If cursor is on the minibuffer line, | 274 /* If cursor is on the minibuffer line, |
270 show the user we have exited by putting it in column 0. */ | 275 show the user we have exited by putting it in column 0. */ |
271 if ((FRAME_CURSOR_Y (selected_frame) | 276 if ((FRAME_CURSOR_Y (selected_frame) |
272 >= XFASTINT (XWINDOW (minibuf_window)->top)) | 277 >= XFASTINT (XWINDOW (minibuf_window)->top)) |
1587 staticpro (&Qminibuffer_history); | 1592 staticpro (&Qminibuffer_history); |
1588 | 1593 |
1589 Qminibuffer_setup_hook = intern ("minibuffer-setup-hook"); | 1594 Qminibuffer_setup_hook = intern ("minibuffer-setup-hook"); |
1590 staticpro (&Qminibuffer_setup_hook); | 1595 staticpro (&Qminibuffer_setup_hook); |
1591 | 1596 |
1597 Qminibuffer_exit_hook = intern ("minibuffer-exit-hook"); | |
1598 staticpro (&Qminibuffer_exit_hook); | |
1599 | |
1592 DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook, | 1600 DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook, |
1593 "Normal hook run just after entry to minibuffer."); | 1601 "Normal hook run just after entry to minibuffer."); |
1594 Vminibuffer_setup_hook = Qnil; | 1602 Vminibuffer_setup_hook = Qnil; |
1603 | |
1604 DEFVAR_LISP ("minibuffer-exit-hook", &Vminibuffer_exit_hook, | |
1605 "Normal hook run just after exit from minibuffer."); | |
1606 Vminibuffer_exit_hook = Qnil; | |
1595 | 1607 |
1596 DEFVAR_BOOL ("completion-auto-help", &auto_help, | 1608 DEFVAR_BOOL ("completion-auto-help", &auto_help, |
1597 "*Non-nil means automatically provide help for invalid completion input."); | 1609 "*Non-nil means automatically provide help for invalid completion input."); |
1598 auto_help = 1; | 1610 auto_help = 1; |
1599 | 1611 |