summaryrefslogtreecommitdiff
path: root/lisp/ange-ftp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-09-06 18:17:59 +0000
committerRichard M. Stallman <rms@gnu.org>1995-09-06 18:17:59 +0000
commitfbd0aa2a0f702187fad5dc5796f1c1628d56eb46 (patch)
treed8005d7f6368351c8bf282a715a1275bd6e3ffba /lisp/ange-ftp.el
parent183d2ef6105e22c13bb36cdf844192c41838a4fe (diff)
downloademacs-fbd0aa2a0f702187fad5dc5796f1c1628d56eb46.tar.gz
(ange-ftp-gwp-filter): Go to process buffer before getting text from it.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r--lisp/ange-ftp.el6
1 files 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