(eval-when-compile
(require 'cl)
(defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
+
(require 'mailheader)
(require 'nnheader)
;; This is apparently necessary even though things are autoloaded:
(defvar message-font-lock-keywords
(let* ((cite-prefix "A-Za-z")
(cite-suffix (concat cite-prefix "0-9_.@-"))
- (content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)"))
+ (content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?"))
`((,(concat "^\\([Tt]o:\\)" content)
(1 'message-header-name-face)
(2 'message-header-to-face nil t))
(unless (bolp)
(save-excursion
(beginning-of-line)
- (when (looking-at (concat prefix
+ (when (looking-at (concat prefix "\\|"
supercite-thing))
(setq quoted (match-string 0))))
(insert "\n"))
(success t)
elem sent
(message-options message-options))
+ (message-options-set-recipient)
(while (and success
(setq elem (pop alist)))
(when (funcall (cadr elem))
message-use-followup-to
(or (not (eq message-use-followup-to 'ask))
(message-y-or-n-p
- (concat "Obey Mail-Followup-To: " mft "? ") t "\
-You should normally obey the Mail-Followup-To: header.
+ (concat "Obey Mail-Followup-To? ") t "\
+You should normally obey the Mail-Followup-To: header. In this
+article, it has the value of
+
+" mft "
- `Mail-Followup-To: " mft "'
-directs your response to " (if (string-match "," mft)
+which directs your response to " (if (string-match "," mft)
"the specified addresses"
"that address only") ".
(push ccs follow-to)))))
follow-to))
-
;;;###autoload
(defun message-reply (&optional to-address wide)
"Start editing a reply to the article in the current buffer."
;;; Miscellaneous functions
-;; stolen (and renamed) from nnheader.el
-(if (fboundp 'subst-char-in-string)
- (defsubst message-replace-chars-in-string (string from to)
- (subst-char-in-string from to string))
- (defun message-replace-chars-in-string (string from to)
- "Replace characters in STRING from FROM to TO."
- (let ((string (substring string 0)) ;Copy string.
- (len (length string))
- (idx 0))
- ;; Replace all occurrences of FROM with TO.
- (while (< idx len)
- (when (= (aref string idx) from)
- (aset string idx to))
- (setq idx (1+ idx)))
- string)))
+(defsubst message-replace-chars-in-string (string from to)
+ (mm-subst-char-in-string from to string))
;;;
;;; MIME functions
(push (cons symbol value) message-options))))
value)
+(defun message-options-set-recipient ()
+ (save-restriction
+ (message-narrow-to-headers-or-head)
+ (message-options-set 'message-sender
+ (mail-strip-quoted-names
+ (message-fetch-field "from")))
+ (message-options-set 'message-recipients
+ (mail-strip-quoted-names
+ (message-fetch-field "to")))))
+
(provide 'message)
(run-hooks 'message-load-hook)