From: ShengHuo ZHU Date: Wed, 13 Feb 2002 17:35:19 +0000 (+0000) Subject: * gnus-art.el (gnus-article-edit-mode): Use define-derived-mode. X-Git-Tag: ttn-vms-21-2-B4~16701 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=80b473796a21d013ef78787c89ec3e8dc45d34bb;p=emacs.git * gnus-art.el (gnus-article-edit-mode): Use define-derived-mode. From: Stefan Monnier --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 95eee15d47c..793cfcf8bc2 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2002-02-13 ShengHuo ZHU + + * gnus-art.el (gnus-article-edit-mode): Use define-derived-mode. + From: Stefan Monnier + 2002-02-07 ShengHuo ZHU * gnus-art.el (article-wash-html): Bind url-gateway-unplugged. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 98075c940e2..a65414edbe8 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1400,7 +1400,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (width (window-width (get-buffer-window (current-buffer))))) (save-restriction (article-goto-body) - (let ((adaptive-fill-mode nil)) + (let ((adaptive-fill-mode nil)) ;Why? -sm (while (not (eobp)) (end-of-line) (when (>= (current-column) (min fill-column width)) @@ -4137,21 +4137,18 @@ If given a prefix, show the hidden text instead." "\C-c\C-w" gnus-article-edit-mode-map) "f" gnus-article-edit-full-stops)) -(defun gnus-article-edit-mode () +(define-derived-mode gnus-article-edit-mode text-mode "Article Edit" "Major mode for editing articles. This is an extended text-mode. \\{gnus-article-edit-mode-map}" - (interactive) - (setq major-mode 'gnus-article-edit-mode) - (setq mode-name "Article Edit") - (use-local-map gnus-article-edit-mode-map) (make-local-variable 'gnus-article-edit-done-function) (make-local-variable 'gnus-prev-winconf) + (set (make-local-variable 'font-lock-defaults) + '(message-font-lock-keywords t)) (setq buffer-read-only nil) (buffer-enable-undo) - (widen) - (gnus-run-hooks 'text-mode-hook 'gnus-article-edit-mode-hook)) + (widen)) (defun gnus-article-edit (&optional force) "Edit the current article.