From 129e45816b1d14e9a45dc182c99df0877e0f8455 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Sat, 31 Mar 2007 14:14:50 +0000 Subject: [PATCH] (message-fill-column): New variable. (message-mode): Use it. Add comment on a possible new hook. --- lisp/ChangeLog | 3 +++ lisp/message.el | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a91af9301..5aaf4754c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-03-31 Reiner Steib + * message.el (message-fill-column): New variable. + (message-mode): Use it. Add comment on a possible new hook. + * nnmail.el (nnmail-spool-file): Mark as obsolete. (nnmail-get-new-mail): Reformat. diff --git a/lisp/message.el b/lisp/message.el index f9cdc19c5..1d26ac0a9 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -855,6 +855,15 @@ will not have a visible effect for those headers." (const :tag "All" t) (repeat (sexp :tag "Header")))) +(defcustom message-fill-column 72 + "Column beyond which automatic line-wrapping should happen. +Local value for message buffers. If non-nil, also turn on +auto-fill in message buffers." + :group 'message-various + ;; :link '(custom-manual "(message)Message Headers") + :type '(choice (const :tag "Don't turn on auto fill" nil) + (integer))) + (defcustom message-setup-hook nil "Normal hook, run each time a new outgoing message is initialized. The function `message-setup' runs this hook." @@ -2787,6 +2796,9 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (set (make-local-variable 'message-checksum) nil) (set (make-local-variable 'message-mime-part) 0) (message-setup-fill-variables) + (when message-fill-column + (setq fill-column message-fill-column) + (turn-on-auto-fill)) ;; Allow using comment commands to add/remove quoting. ;; (set (make-local-variable 'comment-start) message-yank-prefix) (when message-yank-prefix @@ -3552,6 +3564,8 @@ Really top post? "))) (message-exchange-point-and-mark))) (unless (bolp) (insert ?\n)) + ;; Add a `message-setup-very-last-hook' here? + ;; Add `gnus-article-highlight-citation' here? (unless modified (setq message-checksum (message-checksum)))))) -- 2.25.1