From 2e5511c5aafd303e35d54556b312e7f09da67aa5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 7 Sep 2023 11:56:16 +0300 Subject: [PATCH] ; Fix documentation of last change * lisp/minibuffer.el (minibuffer-regexp-prompts): * doc/lispref/minibuf.texi (Minibuffer Misc): Fix docs (bug#50766). --- doc/lispref/minibuf.texi | 23 ++++++++++++----------- lisp/minibuffer.el | 11 +++++++---- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 0b877a25e68..66191243702 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2879,19 +2879,20 @@ if the minibuffer is in a separate frame. @xref{Minibuffers and Frames}. @end deffn @deffn Command minibuffer-regexp-mode -This is a minor mode for editing regular expressions in the minibuffer. -It highlight parens via @code{show-paren-mode} and +This minor mode makes editing regular expressions in the minibuffer +more convenient. It highlight parens via @code{show-paren-mode} and @code{blink-matching-paren} in a user-friendly way, avoids reporting -alleged paren mismatches and makes sexp navigation more intuitive. - -The list of prompts activating this mode in specific minibuffer -interactions is customizable via @code{minibuffer-regexp-prompts}, see -below. +false paren mismatches, and makes sexp navigation more intuitive. @end deffn +By default, only certain minibuffer prompts automatically activate the +convenience features of @code{minibuffer-regexp-mode} when the +minibuffer becomes active. This list of prompts can be customized via +@code{minibuffer-regexp-prompts}. + @defopt minibuffer-regexp-prompts -List of minibuffer prompts that trigger @code{minibuffer-regexp-mode}. -@code{minibuffer-regexp-mode} is activated in a specific minibuffer -interaction if and only if a prompt in this list appears at the -beginning of the minibuffer. +This variable holds the list of regular expressions for activating the +features of @code{minibuffer-regexp-mode} in the minibuffer. The +mode's features will be activated only if the minibuffer prompt +matches one of the regular expressions in the list. @end defopt diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index d43201eb36d..8c642b15a4d 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4759,10 +4759,13 @@ and `blink-matching-paren' more user-friendly." (defcustom minibuffer-regexp-prompts '("Posix search" "RE search" "Search for regexp" "Query replace regexp") - "List of minibuffer prompts that trigger `minibuffer-regexp-mode'. -`minibuffer-regexp-mode' is activated in a specific minibuffer -interaction if and only if a prompt in this list appears at the -beginning of the minibuffer." + "List of regular expressions that trigger `minibuffer-regexp-mode' features. +The features of `minibuffer-regexp-mode' will be activated in a minibuffer +interaction if and only if a prompt matching some regexp in this list +appears at the beginning of the minibuffer. + +Setting this variable directly with `setq' has no effect; instead, +either use \\[customize-option] interactively or use `setopt'." :type '(repeat (string :tag "Prompt")) :set (lambda (sym val) (set-default sym val)