From: Karl Heuer Date: Sat, 27 May 1995 00:40:31 +0000 (+0000) Subject: (previous-matching-history-element): X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/a8e96cea90cc002eeb8933cca52c9518399328a9?hp=dfb7d19560644a039e2f4d302782977f5e6c6b89 (previous-matching-history-element): No longer remove empty string from history. Better error message if history is empty. --- diff --git a/lisp/simple.el b/lisp/simple.el index 27a7233b0c..7f2e14b350 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))