]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-search): Print the default as part of the prompt.
authorEli Zaretskii <eliz@gnu.org>
Mon, 8 Jan 2001 16:59:54 +0000 (16:59 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 8 Jan 2001 16:59:54 +0000 (16:59 +0000)
lisp/info.el

index 6239b036fd372dd6e4e0803c0a0e7f27d718e2f8..a298607785debbf42ed22d42b897b0acd667a0b7 100644 (file)
@@ -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 "")