/[emacs]/emacs/lisp/mail/rmail.el
ViewVC logotype

Diff of /emacs/lisp/mail/rmail.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.360.2.1 by miles, Fri Apr 4 06:20:27 2003 UTC revision 1.360.2.2 by miles, Tue Oct 14 23:39:25 2003 UTC
# Line 152  It is useful to set this variable in the Line 152  It is useful to set this variable in the
152            "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:"            "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:"
153            "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"            "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"
154            "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:"            "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:"
155            "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:"            "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:"
156            "\\|^x-mailer:\\|^delivered-to:\\|^lines:\\|^mime-version:"            "\\|^x-mailer:\\|^delivered-to:\\|^lines:\\|^mime-version:"
157            "\\|^content-transfer-encoding:\\|^x-coding-system:"            "\\|^content-transfer-encoding:\\|^x-coding-system:"
158            "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"            "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
# Line 212  See also `rmail-highlight-face'." Line 212  See also `rmail-highlight-face'."
212  ;;;###autoload  ;;;###autoload
213  (defcustom rmail-primary-inbox-list nil "\  (defcustom rmail-primary-inbox-list nil "\
214  *List of files which are inboxes for user's primary mail file `~/RMAIL'.  *List of files which are inboxes for user's primary mail file `~/RMAIL'.
215  `nil' means the default, which is (\"/usr/spool/mail/$USER\")  nil means the default, which is (\"/usr/spool/mail/$USER\")
216  \(the name varies depending on the operating system,  \(the name varies depending on the operating system,
217  and the value of the environment variable MAIL overrides it)."  and the value of the environment variable MAIL overrides it)."
218    ;; Don't use backquote here, because we don't want to need it    ;; Don't use backquote here, because we don't want to need it
# Line 1652  It returns t if it got any new messages. Line 1652  It returns t if it got any new messages.
1652                                (save-excursion                                (save-excursion
1653                                  (skip-chars-forward " \t\n")                                  (skip-chars-forward " \t\n")
1654                                  (point)))                                  (point)))
1655                 (setq last-coding-system-used nil)                 (save-excursion
1656                 (or rmail-enable-mime                   (let* ((header-end
1657                     (not rmail-enable-multibyte)                           (progn
1658                     (decode-coding-region start (point)                             (save-excursion
1659                                           (or rmail-file-coding-system                               (goto-char start)
1660                                               'undecided)))                               (forward-line 1)
1661                                 (if (looking-at "0")
1662                                     (forward-line 1)
1663                                   (forward-line 2))
1664                                 (save-restriction
1665                                   (narrow-to-region (point) (point-max))
1666                                   (rfc822-goto-eoh)
1667                                   (point)))))
1668                            (case-fold-search t)
1669                            (quoted-printable-header-field-end
1670                             (save-excursion
1671                               (goto-char start)
1672                               (re-search-forward
1673                                "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
1674                                header-end t)))
1675                            (base64-header-field-end
1676                             (save-excursion
1677                               (goto-char start)
1678                               (re-search-forward
1679                                "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
1680                                header-end t))))
1681                       (if quoted-printable-header-field-end
1682                           (save-excursion
1683                             (rmail-decode-quoted-printable header-end (point))
1684                             ;; Change "quoted-printable" to "8bit",
1685                             ;; to reflect the decoding we just did.
1686                             (goto-char quoted-printable-header-field-end)
1687                             (delete-region (point) (search-backward ":"))
1688                             (insert ": 8bit")))
1689                       (if base64-header-field-end
1690                           (save-excursion
1691                             (base64-decode-region (1+ header-end)
1692                                                   (- (point) 2))
1693                             ;; Change "base64" to "8bit", to reflect the
1694                             ;; decoding we just did.
1695                             (goto-char (1+ header-end))
1696                             (while (search-forward "\r\n" (point-max) t)
1697                               (replace-match "\n"))
1698                             (goto-char base64-header-field-end)
1699                             (delete-region (point) (search-backward ":"))
1700                             (insert ": 8bit")))
1701                       (setq last-coding-system-used nil)
1702                       (or rmail-enable-mime
1703                           (not rmail-enable-multibyte)
1704                           (let ((mime-charset
1705                                  (if (and rmail-decode-mime-charset
1706                                           (save-excursion
1707                                             (goto-char start)
1708                                             (search-forward "\n\n" nil t)
1709                                             (let ((case-fold-search t))
1710                                               (re-search-backward
1711                                                rmail-mime-charset-pattern
1712                                                start t))))
1713                                      (intern (downcase (match-string 1))))))
1714                             (rmail-decode-region start (point) mime-charset)))))
1715                 ;; Add an X-Coding-System: header if we don't have one.                 ;; Add an X-Coding-System: header if we don't have one.
1716                 (save-excursion                 (save-excursion
1717                   (goto-char start)                   (goto-char start)
# Line 1714  It returns t if it got any new messages. Line 1768  It returns t if it got any new messages.
1768                           (re-search-forward                           (re-search-forward
1769                            "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"                            "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
1770                            header-end t)))                            header-end t)))
1771                          (base64-header-field-end
1772                           (save-excursion
1773                             (re-search-forward
1774                              "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
1775                              header-end t)))
1776                        (size                        (size
1777                         ;; Get the numeric value from the Content-Length field.                         ;; Get the numeric value from the Content-Length field.
1778                         (save-excursion                         (save-excursion
# Line 1762  It returns t if it got any new messages. Line 1821  It returns t if it got any new messages.
1821                         ;; to reflect the decoding we just did.                         ;; to reflect the decoding we just did.
1822                         (goto-char quoted-printable-header-field-end)                         (goto-char quoted-printable-header-field-end)
1823                         (delete-region (point) (search-backward ":"))                         (delete-region (point) (search-backward ":"))
1824                           (insert ": 8bit")))
1825                     (if base64-header-field-end
1826                         (save-excursion
1827                           (base64-decode-region header-end (point))
1828                           ;; Change "base64" to "8bit", to reflect the
1829                           ;; decoding we just did.
1830                           (goto-char base64-header-field-end)
1831                           (delete-region (point) (search-backward ":"))
1832                         (insert ": 8bit"))))                         (insert ": 8bit"))))
1833    
1834                 (save-excursion                 (save-excursion
# Line 3755  encoded string (and the same mask) will Line 3822  encoded string (and the same mask) will
3822    
3823  (provide 'rmail)  (provide 'rmail)
3824    
3825    ;;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c
3826  ;;; rmail.el ends here  ;;; rmail.el ends here

Legend:
Removed from v.1.360.2.1  
changed lines
  Added in v.1.360.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26