]> git.eshelyaron.com Git - emacs.git/commitdiff
(comint-regexp-arg): Fix no-input case.
authorGlenn Morris <rgm@gnu.org>
Wed, 16 Jan 2008 08:10:36 +0000 (08:10 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 16 Jan 2008 08:10:36 +0000 (08:10 +0000)
lisp/ChangeLog
lisp/comint.el

index a9e8fa4fbfbeeec7b6a947eff23476608035dce7..126219599923051a346d607cb1cb6ce0e9c97d4f 100644 (file)
@@ -1,3 +1,7 @@
+2008-01-16  Glenn Morris  <rgm@gnu.org>
+
+       * comint.el (comint-regexp-arg): Fix no-input case.
+
 2008-01-16  Ulf Jasper  <ulf.jasper@web.de>
 
        * calendar/icalendar.el (icalendar-export-file)
index 0a22cdba5c98a1f38b12746d8d21d239c7ae12bd..f8a47152976dd8d2e98c245c01cf9852580d4912 100644 (file)
@@ -1021,9 +1021,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))))