diff options
| author | Richard M. Stallman | 1997-05-10 22:29:42 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-05-10 22:29:42 +0000 |
| commit | 839c87f2e92d7989e81fa7d69dc245257c9a933f (patch) | |
| tree | cfbec5bc23387abb666a701a4fd4e3545740e621 | |
| parent | 89599794182e97ba3777195e7c522aa929ec14a5 (diff) | |
| download | emacs-839c87f2e92d7989e81fa7d69dc245257c9a933f.tar.gz 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.
| -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." | |||
| 1683 | (set-process-filter proc (function ange-ftp-gwp-filter)) | 1683 | (set-process-filter proc (function ange-ftp-gwp-filter)) |
| 1684 | (save-excursion | 1684 | (save-excursion |
| 1685 | (set-buffer (process-buffer proc)) | 1685 | (set-buffer (process-buffer proc)) |
| 1686 | (internal-ange-ftp-mode) | 1686 | (goto-char (point-max)) |
| 1687 | (set-marker (process-mark proc) (point))) | 1687 | (set-marker (process-mark proc) (point))) |
| 1688 | (setq ange-ftp-gwp-running t | 1688 | (setq ange-ftp-gwp-running t |
| 1689 | ange-ftp-gwp-status nil) | 1689 | ange-ftp-gwp-status nil) |
| @@ -1827,7 +1827,11 @@ on the gateway machine to do the ftp instead." | |||
| 1827 | ;; but that doesn't work: ftp never responds. | 1827 | ;; but that doesn't work: ftp never responds. |
| 1828 | ;; Can anyone find a fix for that? | 1828 | ;; Can anyone find a fix for that? |
| 1829 | (let ((process-connection-type t) | 1829 | (let ((process-connection-type t) |
| 1830 | (process-environment process-environment)) | 1830 | (process-environment process-environment) |
| 1831 | (buffer (get-buffer-create name))) | ||
| 1832 | (save-excursion | ||
| 1833 | (set-buffer buffer) | ||
| 1834 | (internal-ange-ftp-mode)) | ||
| 1831 | ;; This tells GNU ftp not to output any fancy escape sequences. | 1835 | ;; This tells GNU ftp not to output any fancy escape sequences. |
| 1832 | (setenv "TERM" "dumb") | 1836 | (setenv "TERM" "dumb") |
| 1833 | (if use-gateway | 1837 | (if use-gateway |
| @@ -1838,10 +1842,11 @@ on the gateway machine to do the ftp instead." | |||
| 1838 | ange-ftp-gateway-host) | 1842 | ange-ftp-gateway-host) |
| 1839 | args)))) | 1843 | args)))) |
| 1840 | (setq proc (apply 'start-process name name args)))) | 1844 | (setq proc (apply 'start-process name name args)))) |
| 1841 | (process-kill-without-query proc) | ||
| 1842 | (save-excursion | 1845 | (save-excursion |
| 1843 | (set-buffer (process-buffer proc)) | 1846 | (set-buffer (process-buffer proc)) |
| 1844 | (internal-ange-ftp-mode)) | 1847 | (goto-char (point-max)) |
| 1848 | (set-marker (process-mark proc) (point))) | ||
| 1849 | (process-kill-without-query proc) | ||
| 1845 | (set-process-sentinel proc (function ange-ftp-process-sentinel)) | 1850 | (set-process-sentinel proc (function ange-ftp-process-sentinel)) |
| 1846 | (set-process-filter proc (function ange-ftp-process-filter)) | 1851 | (set-process-filter proc (function ange-ftp-process-filter)) |
| 1847 | (accept-process-output proc) ;wait for ftp startup message | 1852 | (accept-process-output proc) ;wait for ftp startup message |
| @@ -1858,8 +1863,6 @@ on the gateway machine to do the ftp instead." | |||
| 1858 | (setq major-mode 'internal-ange-ftp-mode) | 1863 | (setq major-mode 'internal-ange-ftp-mode) |
| 1859 | (setq mode-name "Internal Ange-ftp") | 1864 | (setq mode-name "Internal Ange-ftp") |
| 1860 | (let ((proc (get-buffer-process (current-buffer)))) | 1865 | (let ((proc (get-buffer-process (current-buffer)))) |
| 1861 | (goto-char (point-max)) | ||
| 1862 | (set-marker (process-mark proc) (point)) | ||
| 1863 | (make-local-variable 'ange-ftp-process-string) | 1866 | (make-local-variable 'ange-ftp-process-string) |
| 1864 | (setq ange-ftp-process-string "") | 1867 | (setq ange-ftp-process-string "") |
| 1865 | (make-local-variable 'ange-ftp-process-busy) | 1868 | (make-local-variable 'ange-ftp-process-busy) |