+2001-10-12 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+ Suggested by Oliver Scholz <epameinondas@gmx.de>.
+
+ * message.el (message-do-auto-fill): New function. Like
+ `do-auto-fill' but don't fill when in the message header.
+ (message-setup-1): Put a text property on the message header.
+ (message-setup-fill-variables): Use `message-do-auto-fill'.
+
2001-10-10 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* message.el (message-send-mail-partially): Insert an empty line
(setq adaptive-fill-first-line-regexp
(concat quote-prefix-regexp "\\|"
adaptive-fill-first-line-regexp))
- (setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:")))
+ ;;(setq auto-fill-inhibit-regexp "^[A-Z][^: \n\t]+:")
+ (setq auto-fill-inhibit-regexp nil)
+ (setq auto-fill-function 'message-do-auto-fill)))
\f
(message-newline-and-reformat arg t)
t))
+(defun message-do-auto-fill ()
+ "Like `do-auto-fill', but don't fill in message header."
+ (unless (text-property-any (line-beginning-position) (point) 'field 'header)
+ (do-auto-fill)))
+
(defun message-insert-signature (&optional force)
"Insert a signature. See documentation for variable `message-signature'."
(interactive (list 0))
(indent-rigidly start (mark t) message-indentation-spaces)
(save-excursion
(goto-char start)
- (let (last-line)
- ;; `last-line' describes the contents of the last line
- ;; encountered in the loop below. nil means "empty line",
- ;; spaces "line consisting entirely of whitespace",
- ;; right-angle "line starts with >", quoted "quote character
- ;; at the beginning of the line", text "the remaining cases".
(while (< (point) (mark t))
- (cond
- ((eolp)
+ (if (looking-at ">")
(insert message-yank-cited-prefix)
- (setq last-line nil))
- ((looking-at ">")
- (if (memq last-line '(nil spaces right-angle quoted))
- (progn
- (insert message-yank-cited-prefix)
- (setq last-line 'quoted))
- (insert message-yank-prefix)
- (setq last-line 'right-angle)))
- ((looking-at "\\s-+$")
- (insert message-yank-prefix)
- (setq last-line 'spaces))
- (t
- (insert message-yank-prefix)
- (setq last-line 'text)))
- (forward-line 1)))))
+ (insert message-yank-prefix))
+ (forward-line 1))))
(goto-char start)))
(defun message-yank-original (&optional arg)
(insert mail-header-separator "\n")
(1- (point)))
'read-only nil)
+ (put-text-property (point-min) (1- (point)) 'field 'header)
(forward-line -1)
(when (message-news-p)
(when message-default-news-headers