aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShengHuo ZHU2002-02-13 17:35:19 +0000
committerShengHuo ZHU2002-02-13 17:35:19 +0000
commit80b473796a21d013ef78787c89ec3e8dc45d34bb (patch)
tree43e2228eb0680697718890c10c86e23836a72206
parentdb54c53aa6b3ec0ae223fc18ba2be9fce58ac67f (diff)
downloademacs-80b473796a21d013ef78787c89ec3e8dc45d34bb.tar.gz
emacs-80b473796a21d013ef78787c89ec3e8dc45d34bb.zip
* gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
From: Stefan Monnier <monnier@cs.yale.edu>
-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 95eee15d47c..793cfcf8bc2 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12002-02-13 ShengHuo ZHU <zsh@cs.rochester.edu>
2
3 * gnus-art.el (gnus-article-edit-mode): Use define-derived-mode.
4 From: Stefan Monnier <monnier@cs.yale.edu>
5
12002-02-07 ShengHuo ZHU <zsh@cs.rochester.edu> 62002-02-07 ShengHuo ZHU <zsh@cs.rochester.edu>
2 7
3 * gnus-art.el (article-wash-html): Bind url-gateway-unplugged. 8 * 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\")."
1400 (width (window-width (get-buffer-window (current-buffer))))) 1400 (width (window-width (get-buffer-window (current-buffer)))))
1401 (save-restriction 1401 (save-restriction
1402 (article-goto-body) 1402 (article-goto-body)
1403 (let ((adaptive-fill-mode nil)) 1403 (let ((adaptive-fill-mode nil)) ;Why? -sm
1404 (while (not (eobp)) 1404 (while (not (eobp))
1405 (end-of-line) 1405 (end-of-line)
1406 (when (>= (current-column) (min fill-column width)) 1406 (when (>= (current-column) (min fill-column width))
@@ -4137,21 +4137,18 @@ If given a prefix, show the hidden text instead."
4137 "\C-c\C-w" gnus-article-edit-mode-map) 4137 "\C-c\C-w" gnus-article-edit-mode-map)
4138 "f" gnus-article-edit-full-stops)) 4138 "f" gnus-article-edit-full-stops))
4139 4139
4140(defun gnus-article-edit-mode () 4140(define-derived-mode gnus-article-edit-mode text-mode "Article Edit"
4141 "Major mode for editing articles. 4141 "Major mode for editing articles.
4142This is an extended text-mode. 4142This is an extended text-mode.
4143 4143
4144\\{gnus-article-edit-mode-map}" 4144\\{gnus-article-edit-mode-map}"
4145 (interactive)
4146 (setq major-mode 'gnus-article-edit-mode)
4147 (setq mode-name "Article Edit")
4148 (use-local-map gnus-article-edit-mode-map)
4149 (make-local-variable 'gnus-article-edit-done-function) 4145 (make-local-variable 'gnus-article-edit-done-function)
4150 (make-local-variable 'gnus-prev-winconf) 4146 (make-local-variable 'gnus-prev-winconf)
4147 (set (make-local-variable 'font-lock-defaults)
4148 '(message-font-lock-keywords t))
4151 (setq buffer-read-only nil) 4149 (setq buffer-read-only nil)
4152 (buffer-enable-undo) 4150 (buffer-enable-undo)
4153 (widen) 4151 (widen))
4154 (gnus-run-hooks 'text-mode-hook 'gnus-article-edit-mode-hook))
4155 4152
4156(defun gnus-article-edit (&optional force) 4153(defun gnus-article-edit (&optional force)
4157 "Edit the current article. 4154 "Edit the current article.