From: Gerd Moellmann Date: Fri, 7 Jul 2000 13:01:16 +0000 (+0000) Subject: (Info-last-search): Variable removed. X-Git-Tag: emacs-pretest-21.0.90~2918 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2c80a618708a818bff5125a051246b8bcd6b3532;p=emacs.git (Info-last-search): Variable removed. (Info-search-history): New variable. (Info-search): New Info-search-history. --- diff --git a/lisp/info.el b/lisp/info.el index 2f5d6744496..4ba595ed0da 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1009,16 +1009,17 @@ If FORK is a string, it is the name to use for the new buffer." (setq hl nil)) ;terminate the while at next iter (setq hl (cdr hl))))) -(defvar Info-last-search nil - "Default regexp for \\\\[Info-search] command to search for.") +(defvar Info-search-history nil + "The history list for `Info-search'.") (defun Info-search (regexp) "Search for REGEXP, starting from point, and select node it's found in." - (interactive "sSearch (regexp): ") - (if transient-mark-mode (deactivate-mark)) - (if (equal regexp "") - (setq regexp Info-last-search) - (setq Info-last-search regexp)) + (interactive (list (read-string "Regexp search: " + nil 'Info-search-history))) + (when transient-mark-mode + (deactivate-mark)) + (when (equal regexp "") + (setq regexp (car Info-search-history))) (when regexp (let ((found ()) current (onode Info-current-node)