+2006-01-23 Alex Schroeder <alex@gnu.org>
+
+ * rmailsum.el (rmail-user-mail-address-regexp): Compute a default
+ value instead of assuming nil. Doc.
+ (rmail-summary-get-sender): Compare with
+ rmail-user-mail-address-regexp instead of computing the default
+ value.
+
+ * rmail.el (rmail-convert-mbox-format): Decode messages with
+ content-transfer-encoding quoted-printable, because it's easy to
+ do.
+ (rmail-unknown-mail-followup-to): Compare with
+ rmail-user-mail-address-regexp instead of computing the default
+ value.
+
2006-01-23 Henrik Enberg <enberg@printf.se>
* rmail.el (rmail-decode-mbox-format): Rename from
(require 'rmailhdr)
(require 'rmailkwd)
(require 'mail-parse)
+(require 'qp)
(defvar deleted-head)
(defvar font-lock-fontified)
(delete-char 1)))
(setq end (marker-position end-marker))
(set-marker end-marker nil)))
-
- ;; encoded-words in from and subject
- (dolist (header '("Subject" "From"))
+ ;; Convert encoded-words in from and subject
+ (dolist (header '("From" "Subject"))
(let ((value (rmail-header-get-header header)))
(rmail-header-add-header
header (mail-decode-encoded-word-string value))))
+ ;; Convert quoted printable transfer encoding because it
+ ;; is easy to do.
+ (let ((encoding (rmail-header-get-header
+ "content-transfer-encoding")))
+ (when (and encoding
+ (string= (downcase encoding)
+ "quoted-printable"))
+ (quoted-printable-decode-region (rmail-header-get-limit)
+ (point-max))))
;; Make sure we have an Rmail BABYL attribute header field.
;; All we can assume is that the Rmail BABYL header field is
(defun rmail-unknown-mail-followup-to ()
"Handle a \"Mail-Followup-To\" header field with an unknown mailing list.
Ask the user whether to add that list name to `mail-mailing-lists'."
- (save-restriction
- (rmail-narrow-to-non-pruned-header)
- (let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t)))
- (when mail-followup-to
- (let ((addresses
- (split-string
- (mail-strip-quoted-names mail-followup-to)
- ",[[:space:]]+" t)))
- (dolist (addr addresses)
- (when (and (not (member addr mail-mailing-lists))
- (not
- ;; taken from rmailsum.el
- (string-match
- (or rmail-user-mail-address-regexp
- (concat "^\\("
- (regexp-quote (user-login-name))
- "\\($\\|@\\)\\|"
- (regexp-quote
- (or user-mail-address
- (concat (user-login-name) "@"
- (or mail-host-address
- (system-name)))))
- "\\>\\)"))
- addr))
- (y-or-n-p
- (format "Add `%s' to `mail-mailing-lists'? "
- addr)))
- (customize-save-variable 'mail-mailing-lists
- (cons addr mail-mailing-lists)))))))))
+ (save-restriction
+ (rmail-narrow-to-non-pruned-header)
+ (let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t)))
+ (when mail-followup-to
+ (let ((addresses
+ (split-string
+ (mail-strip-quoted-names mail-followup-to)
+ ",[[:space:]]+" t)))
+ (dolist (addr addresses)
+ (when (and (not (member addr mail-mailing-lists))
+ (not (string-match rmail-user-mail-address-regexp addr))
+ (y-or-n-p
+ (format "Add `%s' to `mail-mailing-lists'? "
+ addr)))
+ (customize-save-variable 'mail-mailing-lists
+ (cons addr mail-mailing-lists)))))))))
(defun rmail-show-message (&optional n no-summary)
"Show message number N (prefix argument), counting from start of file.