changeset 30109:310914da7811

(Info-last-search): Variable removed. (Info-search-history): New variable. (Info-search): New Info-search-history.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 07 Jul 2000 13:01:16 +0000
parents d78375eda4e8
children 23cb074f9d88
files lisp/info.el
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Fri Jul 07 13:00:21 2000 +0000
+++ b/lisp/info.el	Fri Jul 07 13:01:16 2000 +0000
@@ -1009,16 +1009,17 @@
 	  (setq hl nil))		;terminate the while at next iter
       (setq hl (cdr hl)))))
 
-(defvar Info-last-search nil
-  "Default regexp for \\<Info-mode-map>\\[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)