diff options
| author | Lute Kamstra | 2005-06-14 12:10:55 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-06-14 12:10:55 +0000 |
| commit | ccedb10b8baec10dfaf0d1a513c1fbe6a7c47823 (patch) | |
| tree | 98f11b27838b25f9992fa466bfb99d1f70a0266c | |
| parent | fb33e15372d02bfe3ee9b26f4d234726246746e3 (diff) | |
| download | emacs-ccedb10b8baec10dfaf0d1a513c1fbe6a7c47823.tar.gz emacs-ccedb10b8baec10dfaf0d1a513c1fbe6a7c47823.zip | |
(internal-ange-ftp-mode): Use delay-mode-hooks and run-mode-hooks.
Simplify.
| -rw-r--r-- | lisp/net/ange-ftp.el | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 7fd07ebccfb..277da044c44 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -1964,35 +1964,34 @@ on the gateway machine to do the ftp instead." | |||
| 1964 | 1964 | ||
| 1965 | \\{comint-mode-map}" | 1965 | \\{comint-mode-map}" |
| 1966 | (interactive) | 1966 | (interactive) |
| 1967 | (comint-mode) | 1967 | (delay-mode-hooks (comint-mode)) |
| 1968 | (setq major-mode 'internal-ange-ftp-mode) | 1968 | (setq major-mode 'internal-ange-ftp-mode) |
| 1969 | (setq mode-name "Internal Ange-ftp") | 1969 | (setq mode-name "Internal Ange-ftp") |
| 1970 | (let ((proc (get-buffer-process (current-buffer)))) | 1970 | (make-local-variable 'ange-ftp-process-string) |
| 1971 | (make-local-variable 'ange-ftp-process-string) | 1971 | (setq ange-ftp-process-string "") |
| 1972 | (setq ange-ftp-process-string "") | 1972 | (make-local-variable 'ange-ftp-process-busy) |
| 1973 | (make-local-variable 'ange-ftp-process-busy) | 1973 | (make-local-variable 'ange-ftp-process-result) |
| 1974 | (make-local-variable 'ange-ftp-process-result) | 1974 | (make-local-variable 'ange-ftp-process-msg) |
| 1975 | (make-local-variable 'ange-ftp-process-msg) | 1975 | (make-local-variable 'ange-ftp-process-multi-skip) |
| 1976 | (make-local-variable 'ange-ftp-process-multi-skip) | 1976 | (make-local-variable 'ange-ftp-process-result-line) |
| 1977 | (make-local-variable 'ange-ftp-process-result-line) | 1977 | (make-local-variable 'ange-ftp-process-continue) |
| 1978 | (make-local-variable 'ange-ftp-process-continue) | 1978 | (make-local-variable 'ange-ftp-hash-mark-count) |
| 1979 | (make-local-variable 'ange-ftp-hash-mark-count) | 1979 | (make-local-variable 'ange-ftp-binary-hash-mark-size) |
| 1980 | (make-local-variable 'ange-ftp-binary-hash-mark-size) | 1980 | (make-local-variable 'ange-ftp-ascii-hash-mark-size) |
| 1981 | (make-local-variable 'ange-ftp-ascii-hash-mark-size) | 1981 | (make-local-variable 'ange-ftp-hash-mark-unit) |
| 1982 | (make-local-variable 'ange-ftp-hash-mark-unit) | 1982 | (make-local-variable 'ange-ftp-xfer-size) |
| 1983 | (make-local-variable 'ange-ftp-xfer-size) | 1983 | (make-local-variable 'ange-ftp-last-percent) |
| 1984 | (make-local-variable 'ange-ftp-last-percent) | 1984 | (setq ange-ftp-hash-mark-count 0) |
| 1985 | (setq ange-ftp-hash-mark-count 0) | 1985 | (setq ange-ftp-xfer-size 0) |
| 1986 | (setq ange-ftp-xfer-size 0) | 1986 | (setq ange-ftp-process-result-line "") |
| 1987 | (setq ange-ftp-process-result-line "") | 1987 | (setq comint-prompt-regexp "^ftp> ") |
| 1988 | 1988 | (make-local-variable 'comint-password-prompt-regexp) | |
| 1989 | (setq comint-prompt-regexp "^ftp> ") | 1989 | ;; This is a regexp that can't match anything. |
| 1990 | (make-local-variable 'comint-password-prompt-regexp) | 1990 | ;; ange-ftp has its own ways of handling passwords. |
| 1991 | ;; This is a regexp that can't match anything. | 1991 | (setq comint-password-prompt-regexp "^a\\'z") |
| 1992 | ;; ange-ftp has its own ways of handling passwords. | 1992 | (make-local-variable 'paragraph-start) |
| 1993 | (setq comint-password-prompt-regexp "^a\\'z") | 1993 | (setq paragraph-start comint-prompt-regexp) |
| 1994 | (make-local-variable 'paragraph-start) | 1994 | (run-mode-hooks 'internal-ange-ftp-mode-hook)) |
| 1995 | (setq paragraph-start comint-prompt-regexp))) | ||
| 1996 | 1995 | ||
| 1997 | (defcustom ange-ftp-raw-login nil | 1996 | (defcustom ange-ftp-raw-login nil |
| 1998 | "*Use raw ftp commands for login, if account password is not nil. | 1997 | "*Use raw ftp commands for login, if account password is not nil. |