changeset 11961:b5efbe330c86

(previous-matching-history-element): No longer remove empty string from history. Better error message if history is empty.
author Karl Heuer <kwzh@gnu.org>
date Sat, 27 May 1995 00:40:31 +0000
parents 5d3f2639cf3a
children f9b853c18bb5
files lisp/simple.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat May 27 00:36:36 1995 +0000
+++ b/lisp/simple.el	Sat May 27 00:40:31 1995 +0000
@@ -563,8 +563,9 @@
 					'minibuffer-history-search-history)))
      ;; Use the last regexp specified, by default, if input is empty.
      (list (if (string= regexp "")
-	       (setcar minibuffer-history-search-history
-		       (nth 1 minibuffer-history-search-history))
+	       (if minibuffer-history-search-history
+		   (car minibuffer-history-search-history)
+		 (error "No previous history search regexp"))
 	     regexp)
 	   (prefix-numeric-value current-prefix-arg))))
   (let ((history (symbol-value minibuffer-history-variable))