aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-10-13 07:14:03 +0200
committerLars Ingebrigtsen2019-10-13 07:14:03 +0200
commitf4424ca11f256f4dc7b44b1eddc3f9b0a82e14ce (patch)
tree52e7729b90d94d213fce72719552e5c325962195
parentf0002b2d84d7605d113b0b8124959e23f90d1b08 (diff)
downloademacs-f4424ca11f256f4dc7b44b1eddc3f9b0a82e14ce.tar.gz
emacs-f4424ca11f256f4dc7b44b1eddc3f9b0a82e14ce.zip
Make the previous-matching-history-element prompt clearer
* lisp/simple.el (previous-matching-history-element): Put the default into the prompt (bug#380).
-rw-r--r--lisp/simple.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 44ab8e125d6..4d80c4c1b4d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2002,12 +2002,15 @@ makes the search case-sensitive.
2002See also `minibuffer-history-case-insensitive-variables'." 2002See also `minibuffer-history-case-insensitive-variables'."
2003 (interactive 2003 (interactive
2004 (let* ((enable-recursive-minibuffers t) 2004 (let* ((enable-recursive-minibuffers t)
2005 (regexp (read-from-minibuffer "Previous element matching (regexp): " 2005 (regexp (read-from-minibuffer
2006 nil 2006 (format "Previous element matching regexp%s: "
2007 minibuffer-local-map 2007 (if minibuffer-history-search-history
2008 nil 2008 (format " (default %s)"
2009 'minibuffer-history-search-history 2009 (car minibuffer-history-search-history))
2010 (car minibuffer-history-search-history)))) 2010 ""))
2011 nil minibuffer-local-map nil
2012 'minibuffer-history-search-history
2013 (car minibuffer-history-search-history))))
2011 ;; Use the last regexp specified, by default, if input is empty. 2014 ;; Use the last regexp specified, by default, if input is empty.
2012 (list (if (string= regexp "") 2015 (list (if (string= regexp "")
2013 (if minibuffer-history-search-history 2016 (if minibuffer-history-search-history