]> code.delx.au - gnu-emacs/commitdiff
* comint.el (comint-redirect-results-list-from-process): Fix
authorLeo Liu <sdl.web@gmail.com>
Fri, 21 Jun 2013 09:37:04 +0000 (17:37 +0800)
committerLeo Liu <sdl.web@gmail.com>
Fri, 21 Jun 2013 09:37:04 +0000 (17:37 +0800)
infinite loop.

lisp/ChangeLog
lisp/comint.el

index f258f37f1d679bf6f4bec02b9c18fd01aa7aa09d..c79fcbd903f4f563cfb4e76635f448f42dab7872 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-21  Leo Liu  <sdl.web@gmail.com>
+
+       * comint.el (comint-redirect-results-list-from-process): Fix
+       infinite loop.
+
 2013-06-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * net/eww.el (eww-update-header-line-format): Quote % characters.
index c1a1c56f78a357818f8b83ce2f89847425b1e2ab..217bd4e8b6d4b106dbdf5f01ff3a48f24329fc8f 100644 (file)
@@ -3733,12 +3733,13 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
       ;; Skip past the command, if it was echoed
       (and (looking-at command)
           (forward-line))
-      (while (re-search-forward regexp nil t)
+      (while (and (not (eobp))
+                 (re-search-forward regexp nil t))
        (push (buffer-substring-no-properties
                (match-beginning regexp-group)
                (match-end regexp-group))
               results))
-      results)))
+      (nreverse results))))
 \f
 ;; Converting process modes to use comint mode
 ;; ===========================================================================