From 55db25b2579e5d84dfcf3a15957fc7a827abf25f Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 20 Apr 2021 10:14:40 +0000 Subject: Introduce and use minibuffer-mode. This fixes bug #47150 * lisp/minibuffer.el (minibuffer-mode): New derived mode. * src/minibuf.c (syms_of_minibuf): New DEFSYMs Qminibuffer_mode, Qminibuffer_inactive_mode, Qminibuffer_completing_file_name, Qselect_frame_set_input_focus, Qadd_to_history. (read_minibuf, set_minibuffer_mode, read_minibuf_unwind): Use the new DEFSYMs in place of continual interning. (set_minibuffer_mode): Put an active minibuffer into minibuffer-mode rather than fundamental-mode. * doc/emacs/mini.texi (Minibuffer Edit): Mention minibuffer-mode. * doc/lispref/minibuf.texi (Intro to Minibuffers): Add a paragraph about minibuffer-mode. * etc/NEWS (Incompatible Lisp Changes in Emacs 28.1): Add an entry. --- doc/lispref/minibuf.texi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/lispref/minibuf.texi') diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index e922f1836b3..b8618199852 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -97,6 +97,14 @@ to be done. @xref{Text from Minibuffer}, for the non-completion minibuffer local maps. @xref{Completion Commands}, for the minibuffer local maps for completion. +@cindex active minibuffer + An active minibuffer usually has major mode @code{minibuffer-mode}. +This is an Emacs internal mode without any special features. To +customize the setup of minibuffers, we suggest you use +@code{minibuffer-setup-hook} (@pxref{Minibuffer Misc}) rather than +@code{minibuffer-mode-hook}, since the former is run later, after the +minibuffer has been fully initialized. + @cindex inactive minibuffer When a minibuffer is inactive, its major mode is @code{minibuffer-inactive-mode}, with keymap -- cgit v1.2.3