Mercurial > emacs
diff lisp/comint.el @ 87786:4889ff88791b
(comint-regexp-arg): Fix no-input case.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 16 Jan 2008 08:10:54 +0000 |
parents | 107ccd98fa12 |
children | 5d58981e6690 |
line wrap: on
line diff
--- a/lisp/comint.el Wed Jan 16 06:22:59 2008 +0000 +++ b/lisp/comint.el Wed Jan 16 08:10:54 2008 +0000 @@ -1022,9 +1022,11 @@ (last-command last-command) (regexp (read-from-minibuffer prompt nil nil nil 'minibuffer-history-search-history))) + ;; If the user didn't enter anything, nothing is added to m-h-s-h. + ;; Use the previous search regexp, if there is one. (list (if (string-equal regexp "") - (setcar minibuffer-history-search-history - (nth 1 minibuffer-history-search-history)) + (or (car minibuffer-history-search-history) + regexp) regexp) (prefix-numeric-value current-prefix-arg))))