From a8e96cea90cc002eeb8933cca52c9518399328a9 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sat, 27 May 1995 00:40:31 +0000 Subject: [PATCH] (previous-matching-history-element): No longer remove empty string from history. Better error message if history is empty. --- lisp/simple.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 27a7233b0cd..7f2e14b3505 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)) -- 2.39.2