]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-convert-mbox-format): Decode messages with
authorAlex Schroeder <alex@gnu.org>
Mon, 23 Jan 2006 16:54:26 +0000 (16:54 +0000)
committerAlex Schroeder <alex@gnu.org>
Mon, 23 Jan 2006 16:54:26 +0000 (16:54 +0000)
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.

lisp/mail/ChangeLog
lisp/mail/rmail.el

index cf60237c476641858158c10a94d6a9b9af59be8a..98fd7420366cb7c7a30681e53d6d5770e752fa45 100644 (file)
@@ -1,3 +1,18 @@
+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
index 28a7c67804db5fba754b98b4dc74a6c0d86f4c6a..eaa347f084e4e23a7b5e8fa25d26d46f5f433213 100644 (file)
@@ -48,6 +48,7 @@
 (require 'rmailhdr)
 (require 'rmailkwd)
 (require 'mail-parse)
+(require 'qp)
 
 (defvar deleted-head)
 (defvar font-lock-fontified)
@@ -2055,12 +2056,20 @@ non-nil then do not show any progress messages."
                    (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
@@ -2107,35 +2116,22 @@ non-nil then do not show any progress messages."
 (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.