Mercurial > emacs
changeset 104733:9902de48eab4
(internal-ange-ftp-mode): Use define-derived-mode.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 30 Aug 2009 14:21:34 +0000 |
parents | 9792b61a3641 |
children | 714ab1b8092b |
files | lisp/ChangeLog lisp/net/ange-ftp.el |
diffstat | 2 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Aug 30 14:20:43 2009 +0000 +++ b/lisp/ChangeLog Sun Aug 30 14:21:34 2009 +0000 @@ -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.
--- a/lisp/net/ange-ftp.el Sun Aug 30 14:20:43 2009 +0000 +++ b/lisp/net/ange-ftp.el Sun Aug 30 14:21:34 2009 +0000 @@ -1968,16 +1968,10 @@ (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 @@ ;; 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.