diff options
author | Glenn Morris <rgm@gnu.org> | 2008-01-16 08:11:05 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-01-16 08:11:05 +0000 |
commit | b11a06ccc7ea7e282e435bf4b3e46f4ed3bee9f1 (patch) | |
tree | c011f46d2884a8920e3f8b63d5208333bdb234f0 /lisp/comint.el | |
parent | 28e4e2b434e3574f01b69c585dcccaecde6c940f (diff) | |
download | emacs-b11a06ccc7ea7e282e435bf4b3e46f4ed3bee9f1.tar.gz |
(comint-regexp-arg): Fix no-input case.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 6fb89e28181..70d6f85ff68 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1022,9 +1022,11 @@ See also `comint-read-input-ring'." (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)))) |