[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 932aba6 1/3: Try to improve the read-regexp doc string
From: |
Eli Zaretskii |
Subject: |
emacs-27 932aba6 1/3: Try to improve the read-regexp doc string |
Date: |
Wed, 27 Jan 2021 10:20:02 -0500 (EST) |
branch: emacs-27
commit 932aba674c9a64dfd970d7c2343517c7f4c7a409
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Try to improve the read-regexp doc string
* lisp/replace.el (read-regexp): Attempt to clarify the semantics
(bug#46088).
(cherry picked from commit eded2a7ad7d456a417354a2797c18e9a578414d7)
---
lisp/replace.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lisp/replace.el b/lisp/replace.el
index 0288be8..a769595 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -813,12 +813,14 @@ If DEFAULTS is a list of strings, the first element is the
default return value, but all the elements are accessible
using the history command \\<minibuffer-local-map>\\[next-history-element].
-If DEFAULTS is a non-nil symbol, then if `read-regexp-defaults-function'
-is non-nil, we use that in place of DEFAULTS in the following:
- If DEFAULTS is the symbol `regexp-history-last', we use the first
- element of HISTORY (if specified) or `regexp-history'.
- If DEFAULTS is a function, we call it with no arguments and use
- what it returns, which should be either nil, a string, or a list of strings.
+DEFAULTS can be a symbol. If DEFAULTS is the symbol
+`regexp-history-last', we use the first element of HISTORY (if
+specified) or `regexp-history'. If DEFAULTS is a symbol with a
+function definition, we call it with no arguments and use what it
+returns, which should be either nil, a string, or a list of
+strings. Other symbol values for DEFAULTS are ignored. If
+`read-regexp-defaults-function' is non-nil, its value is used
+instead of DEFAULTS in the two cases described in this paragraph.
We append the standard values from `read-regexp-suggestions' to DEFAULTS
before using it.