Minibuffer Miscellany
- Function: minibufferp &optional buffer-or-name live
This function returns non-
nilif buffer-or-name is a minibuffer. If buffer-or-name is omitted ornil, it tests the current buffer. When live is non-nil, the function returns non-nilonly when buffer-or-name is an active minibuffer.
- Variable: minibuffer-setup-hook
This is a normal hook that is run whenever a minibuffer is entered. See Hooks.
- Macro: minibuffer-with-setup-hook function &rest body
-
This macro executes body after arranging for the specified function to be called via
minibuffer-setup-hook. By default, function is called before the other functions in theminibuffer-setup-hooklist, but if function is of the form(:append func), func will be called after the other hook functions.The body forms should not use the minibuffer more than once. If the minibuffer is re-entered recursively, function will only be called once, for the outermost use of the minibuffer.
- Variable: minibuffer-exit-hook
This is a normal hook that is run whenever a minibuffer is exited. See Hooks.
- Variable: minibuffer-help-form
-
The current value of this variable is used to rebind
help-formlocally inside the minibuffer (see Help Functions).
- Variable: minibuffer-scroll-window
-
If the value of this variable is non-
nil, it should be a window object. When the functionscroll-other-windowis called in the minibuffer, it scrolls this window (see Textual Scrolling).
- Function: minibuffer-selected-window
This function returns the window that was selected just before the minibuffer window was selected. If the selected window is not a minibuffer window, it returns
nil.
- Function: minibuffer-message string &rest args
-
This function is like
message(see Displaying Messages in the Echo Area), but it displays the messages specially when the user types in the minibuffer, typically because Emacs prompted the user for some input. When the minibuffer is the current buffer, this function displays the message specified by string temporarily at the end of the minibuffer text, and thus avoids hiding the minibuffer text by the echo-area display of the message. It leaves the message on display for a few seconds, or until the next input event arrives, whichever comes first. The variableminibuffer-message-timeoutspecifies the number of seconds to wait in the absence of input. It defaults to 2. If args is non-nil, the actual message is obtained by passing string and args throughformat-message. See Formatting Strings.If called when the minibuffer is not the current buffer, this function just calls
message, and thus string will be shown in the echo-area.
- Command: minibuffer-inactive-mode
This is the major mode used in inactive minibuffers. It uses keymap
minibuffer-inactive-mode-map. This can be useful if the minibuffer is in a separate frame. See Minibuffers and Frames.
- Command: minibuffer-regexp-mode
This minor mode makes editing regular expressions in the minibuffer more convenient. It highlight parens via
show-paren-modeandblink-matching-parenin a user-friendly way, avoids reporting false paren mismatches, and makes sexp navigation more intuitive.
By default, only certain minibuffer prompts automatically activate the convenience features of minibuffer-regexp-mode when the minibuffer becomes active. This list of prompts can be customized via minibuffer-regexp-prompts.
- User Option: minibuffer-regexp-prompts
This variable holds the list of regular expressions for activating the features of
minibuffer-regexp-modein the minibuffer. The mode’s features will be activated only if the minibuffer prompt matches one of the regular expressions in the list.
Copyright © 1990-1996, 1998-2026 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Misc.html