(internal-ange-ftp-mode): Use define-derived-mode.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 30 Aug 2009 14:21:34 +0000 (14:21 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 30 Aug 2009 14:21:34 +0000 (14:21 +0000)
lisp/ChangeLog
lisp/net/ange-ftp.el

index 4ae65f7..23e238b 100644 (file)
@@ -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.
 
index 8499a89..94525b5 100644 (file)
@@ -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.