# HG changeset patch # User Glenn Morris # Date 1200471015 0 # Node ID 32dc15103b58219b5b0b60675261f7fc08fe03b9 # Parent aa48f45504392daebd3427a2ba14374450b5444b (comint-regexp-arg): Fix no-input case. diff -r aa48f4550439 -r 32dc15103b58 lisp/comint.el --- a/lisp/comint.el Wed Jan 16 04:17:13 2008 +0000 +++ b/lisp/comint.el Wed Jan 16 08:10:15 2008 +0000 @@ -1021,9 +1021,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))))