# HG changeset patch # User Richard M. Stallman # Date 810411479 0 # Node ID 35c7fa31896140a71fa61265d241d6e32e43e273 # Parent 0ed37da6f0f3c4bbac9224f369e799edb7400750 (ange-ftp-gwp-filter): Go to process buffer before getting text from it. diff -r 0ed37da6f0f3 -r 35c7fa318961 lisp/ange-ftp.el --- a/lisp/ange-ftp.el Wed Sep 06 18:04:02 1995 +0000 +++ b/lisp/ange-ftp.el Wed Sep 06 18:17:59 1995 +0000 @@ -1601,8 +1601,10 @@ (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