summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-01-08 16:59:54 +0000
committerEli Zaretskii <eliz@gnu.org>2001-01-08 16:59:54 +0000
commit80372e56de06b211299f2d9faa3579dfe2d6a648 (patch)
treea4d0211ad583e564998d28c9769575a35ab0a6aa /lisp/info.el
parente5db1ac9edc1dde8ab13b000c6478fe5c38fe855 (diff)
downloademacs-80372e56de06b211299f2d9faa3579dfe2d6a648.tar.gz
(Info-search): Print the default as part of the prompt.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 6239b036fd3..a298607785d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1097,8 +1097,12 @@ If FORK is a string, it is the name to use for the new buffer."
(defun Info-search (regexp)
"Search for REGEXP, starting from point, and select node it's found in."
- (interactive (list (read-string "Regexp search: "
- nil 'Info-search-history)))
+ (interactive (list (read-string
+ (if Info-search-history
+ (format "Regexp search (default `%s'): "
+ (car Info-search-history))
+ "Regexp search: ")
+ nil 'Info-search-history)))
(when transient-mark-mode
(deactivate-mark))
(when (equal regexp "")