emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master f4424ca: Make the previous-matching-history-element


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master f4424ca: Make the previous-matching-history-element prompt clearer
Date: Sun, 13 Oct 2019 01:14:17 -0400 (EDT)

branch: master
commit f4424ca11f256f4dc7b44b1eddc3f9b0a82e14ce
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Make the previous-matching-history-element prompt clearer
    
    * lisp/simple.el (previous-matching-history-element): Put the
    default into the prompt (bug#380).
---
 lisp/simple.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 44ab8e1..4d80c4c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2002,12 +2002,15 @@ makes the search case-sensitive.
 See also `minibuffer-history-case-insensitive-variables'."
   (interactive
    (let* ((enable-recursive-minibuffers t)
-         (regexp (read-from-minibuffer "Previous element matching (regexp): "
-                                       nil
-                                       minibuffer-local-map
-                                       nil
-                                       'minibuffer-history-search-history
-                                       (car 
minibuffer-history-search-history))))
+         (regexp (read-from-minibuffer
+                   (format "Previous element matching regexp%s: "
+                           (if minibuffer-history-search-history
+                               (format " (default %s)"
+                                       (car minibuffer-history-search-history))
+                             ""))
+                  nil minibuffer-local-map nil
+                  'minibuffer-history-search-history
+                  (car minibuffer-history-search-history))))
      ;; Use the last regexp specified, by default, if input is empty.
      (list (if (string= regexp "")
               (if minibuffer-history-search-history



reply via email to

[Prev in Thread] Current Thread [Next in Thread]