aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorShengHuo ZHU <[email protected]>2002-02-13 17:35:19 +0000
committerShengHuo ZHU <[email protected]>2002-02-13 17:35:19 +0000
commit80b473796a21d013ef78787c89ec3e8dc45d34bb (patch)
tree43e2228eb0680697718890c10c86e23836a72206 /lisp
parentdb54c53aa6b3ec0ae223fc18ba2be9fce58ac67f (diff)
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
From: Stefan Monnier <[email protected]>
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-art.el13
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 95eee15d47..793cfcf8bc 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-13 ShengHuo ZHU <[email protected]>
+
+ * gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
+ From: Stefan Monnier <[email protected]>
+
2002-02-07 ShengHuo ZHU <[email protected]>
* 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 98075c940e..a65414edbe 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.