From 54c548db96cd8247cdb0561ee55701c8dc70490b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 12 Sep 1997 20:55:34 +0000 Subject: [PATCH] (next-history-element): Cope if minibuffer-text-before-history is nil. --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 798a706886e..6bb122646b1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -723,7 +723,7 @@ If N is negative, find the previous or Nth previous match." (cond ((= narg -1) (setq elt minibuffer-default)) ((= narg 0) - (setq elt minibuffer-text-before-history) + (setq elt (or minibuffer-text-before-history "")) (setq minibuffer-text-before-history nil)) (t (setq elt (nth (1- minibuffer-history-position) (symbol-value minibuffer-history-variable))))) -- 2.39.5