1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-14 16:50:58 +00:00

(Info-search): Print the default as part of the prompt.

This commit is contained in:
Eli Zaretskii 2001-01-08 16:59:54 +00:00
parent 56f24bc188
commit bbc96600a7

View 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 "")