diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-05-10 22:29:42 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-05-10 22:29:42 +0000 |
commit | 839c87f2e92d7989e81fa7d69dc245257c9a933f (patch) | |
tree | cfbec5bc23387abb666a701a4fd4e3545740e621 /lisp | |
parent | 89599794182e97ba3777195e7c522aa929ec14a5 (diff) | |
download | emacs-839c87f2e92d7989e81fa7d69dc245257c9a933f.tar.gz emacs-839c87f2e92d7989e81fa7d69dc245257c9a933f.tar.bz2 emacs-839c87f2e92d7989e81fa7d69dc245257c9a933f.zip |
(ange-ftp-start-process): Create the buffer
and set its mode, before starting the process.
Set point in that buffer, and the process mark,
(ange-ftp-gwp-start): Don't set the mode here.
Move point to end of buffer.
(internal-ange-ftp-mode): Don't move process-mark here.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ange-ftp.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 74c080ba98c..8ad412f3331 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -1683,7 +1683,7 @@ good, skip, fatal, or unknown." (set-process-filter proc (function ange-ftp-gwp-filter)) (save-excursion (set-buffer (process-buffer proc)) - (internal-ange-ftp-mode) + (goto-char (point-max)) (set-marker (process-mark proc) (point))) (setq ange-ftp-gwp-running t ange-ftp-gwp-status nil) @@ -1827,7 +1827,11 @@ on the gateway machine to do the ftp instead." ;; but that doesn't work: ftp never responds. ;; Can anyone find a fix for that? (let ((process-connection-type t) - (process-environment process-environment)) + (process-environment process-environment) + (buffer (get-buffer-create name))) + (save-excursion + (set-buffer buffer) + (internal-ange-ftp-mode)) ;; This tells GNU ftp not to output any fancy escape sequences. (setenv "TERM" "dumb") (if use-gateway @@ -1838,10 +1842,11 @@ on the gateway machine to do the ftp instead." ange-ftp-gateway-host) args)))) (setq proc (apply 'start-process name name args)))) - (process-kill-without-query proc) (save-excursion (set-buffer (process-buffer proc)) - (internal-ange-ftp-mode)) + (goto-char (point-max)) + (set-marker (process-mark proc) (point))) + (process-kill-without-query proc) (set-process-sentinel proc (function ange-ftp-process-sentinel)) (set-process-filter proc (function ange-ftp-process-filter)) (accept-process-output proc) ;wait for ftp startup message @@ -1858,8 +1863,6 @@ on the gateway machine to do the ftp instead." (setq major-mode 'internal-ange-ftp-mode) (setq mode-name "Internal Ange-ftp") (let ((proc (get-buffer-process (current-buffer)))) - (goto-char (point-max)) - (set-marker (process-mark proc) (point)) (make-local-variable 'ange-ftp-process-string) (setq ange-ftp-process-string "") (make-local-variable 'ange-ftp-process-busy) |