Commit 5c781212 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Qminibuffer_setup_hook, Vminibuffer_setup_hook): New vars.

(syms_of_minibuf): Set them up.
(read_minibuffer): Run the hook, if not empty.
parent 0b7f4d1b
......@@ -75,6 +75,10 @@ Lisp_Object Vminibuffer_history_position;
Lisp_Object Qminibuffer_history;
/* Normal hook for entry to minibuffer. */
Lisp_Object Qminibuffer_setup_hook, Vminibuffer_setup_hook;
/* Nonzero means completion ignores case. */
int completion_ignore_case;
......@@ -223,6 +227,12 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
Vminibuffer_history_position = histpos;
Vminibuffer_history_variable = histvar;
/* Run our hook, but not if it is empty.
(run-hooks would do nothing if it is empty,
but it's important to save time here in the usual case. */
if (!NILP (Vminibuffer_setup_hook) && !EQ (Vminibuffer_setup_hook, Qunbound))
call1 (Vrun_hooks, Qminibuffer_setup_hook);
/* ??? MCC did redraw_screen here if switching screens. */
recursive_edit_1 ();
......@@ -1397,6 +1407,13 @@ syms_of_minibuf ()
Qminibuffer_history = intern ("minibuffer-history");
staticpro (&Qminibuffer_history);
Qminibuffer_setup_hook = intern ("minibuffer-setup-hook");
staticpro (&Qminibuffer_setup_hook);
DEFVAR_LISP ("minibuffer-setup-hook", &Vminibuffer_setup_hook,
"Normal hook run just after entry to minibuffer.");
Vminibuffer_setup_hook = Qnil;
DEFVAR_BOOL ("completion-auto-help", &auto_help,
"*Non-nil means automatically provide help for invalid completion input.");
auto_help = 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment