(previous-matching-history-element):
authorKarl Heuer <kwzh@gnu.org>
Sat, 27 May 1995 00:40:31 +0000 (00:40 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sat, 27 May 1995 00:40:31 +0000 (00:40 +0000)
No longer remove empty string from history.
Better error message if history is empty.

lisp/simple.el

index 27a7233..7f2e14b 100644 (file)
@@ -563,8 +563,9 @@ If N is negative, find the next or Nth next match."
                                        '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))