From 6d766abc91070e6e4a5f3e24cb4461e55a58b938 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 6 Sep 1995 18:17:59 +0000 Subject: [PATCH] (ange-ftp-gwp-filter): Go to process buffer before getting text from it. --- lisp/ange-ftp.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.2