From: Richard M. Stallman Date: Wed, 6 Sep 1995 18:17:59 +0000 (+0000) Subject: (ange-ftp-gwp-filter): Go to process buffer before getting text from it. X-Git-Tag: emacs-19.34~2855 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d766abc91070e6e4a5f3e24cb4461e55a58b938;p=emacs.git (ange-ftp-gwp-filter): Go to process buffer before getting text from it. --- diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 87af1adedaa..b2824d02bd2 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -1601,8 +1601,10 @@ good, skip, fatal, or unknown." (defun ange-ftp-gwp-filter (proc str) (comint-output-filter proc str) - ;; Replace STR by the result of the comint processing. - (setq str (buffer-substring comint-last-output-start (process-mark proc))) + (save-excursion + (set-buffer (process-buffer proc)) + ;; Replace STR by the result of the comint processing. + (setq str (buffer-substring comint-last-output-start (process-mark proc)))) (cond ((string-match "login: *$" str) (send-string proc (concat