From: Leo Liu Date: Fri, 21 Jun 2013 09:37:04 +0000 (+0800) Subject: * comint.el (comint-redirect-results-list-from-process): Fix X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2016^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aed838b5abc33741f0c6c919c9f4b7d79d3bdb52;p=emacs.git * comint.el (comint-redirect-results-list-from-process): Fix infinite loop. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f258f37f1d6..c79fcbd903f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-06-21 Leo Liu + + * comint.el (comint-redirect-results-list-from-process): Fix + infinite loop. + 2013-06-21 Lars Magne Ingebrigtsen * net/eww.el (eww-update-header-line-format): Quote % characters. diff --git a/lisp/comint.el b/lisp/comint.el index c1a1c56f78a..217bd4e8b6d 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -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)))) ;; Converting process modes to use comint mode ;; ===========================================================================