summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/net/ange-ftp.el11
2 files changed, 4 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4ae65f7feed..23e238b88b8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2009-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
+ * net/ange-ftp.el (internal-ange-ftp-mode): Use define-derived-mode.
+
* emacs-lisp/easy-mmode.el (define-minor-mode): Don't use symbol-value
with constant argument.
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 8499a896db6..94525b540b8 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1968,16 +1968,10 @@ on the gateway machine to do the FTP instead."
(accept-process-output proc) ;wait for ftp startup message
proc))
-(put 'internal-ange-ftp-mode 'mode-class 'special)
-
-(defun internal-ange-ftp-mode ()
+(define-derived-mode internal-ange-ftp-mode comint-mode "Internal Ange-ftp"
"Major mode for interacting with the FTP process.
\\{comint-mode-map}"
- (interactive)
- (delay-mode-hooks (comint-mode))
- (setq major-mode 'internal-ange-ftp-mode)
- (setq mode-name "Internal Ange-ftp")
(make-local-variable 'ange-ftp-process-string)
(setq ange-ftp-process-string "")
(make-local-variable 'ange-ftp-process-busy)
@@ -2001,8 +1995,7 @@ on the gateway machine to do the FTP instead."
;; ange-ftp has its own ways of handling passwords.
(setq comint-password-prompt-regexp "\\`a\\`")
(make-local-variable 'paragraph-start)
- (setq paragraph-start comint-prompt-regexp)
- (run-mode-hooks 'internal-ange-ftp-mode-hook))
+ (setq paragraph-start comint-prompt-regexp))
(defcustom ange-ftp-raw-login nil
"Use raw FTP commands for login, if account password is not nil.