Commit | Line | Data |
---|---|---|
23f87bed | 1 | ;;; mail-parse.el --- Interface functions for parsing mail |
e84b4b86 | 2 | |
ba318903 | 3 | ;; Copyright (C) 1998-2014 Free Software Foundation, Inc. |
c113de23 GM |
4 | |
5 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | |
6 | ;; This file is part of GNU Emacs. | |
7 | ||
5e809f55 | 8 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
c113de23 | 9 | ;; it under the terms of the GNU General Public License as published by |
5e809f55 GM |
10 | ;; the Free Software Foundation, either version 3 of the License, or |
11 | ;; (at your option) any later version. | |
c113de23 GM |
12 | |
13 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
5e809f55 | 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c113de23 GM |
16 | ;; GNU General Public License for more details. |
17 | ||
18 | ;; You should have received a copy of the GNU General Public License | |
5e809f55 | 19 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
c113de23 GM |
20 | |
21 | ;;; Commentary: | |
22 | ||
23 | ;; This file contains wrapper functions for a wide range of mail | |
24 | ;; parsing functions. The idea is that there are low-level libraries | |
53964682 | 25 | ;; that implement according to various specs (RFC2231, DRUMS, USEFOR), |
c113de23 GM |
26 | ;; but that programmers that want to parse some header (say, |
27 | ;; Content-Type) will want to use the latest spec. | |
28 | ;; | |
29 | ;; So while each low-level library (rfc2231.el, for instance) decodes | |
30 | ;; faithfully according to that (proposed) standard, this library is | |
31 | ;; the interface library. If some later RFC supersedes RFC2231, one | |
32 | ;; would just have to write a new low-level library, adjust the | |
33 | ;; aliases in this library, and the users and programmers won't notice | |
34 | ;; any changes. | |
35 | ||
36 | ;;; Code: | |
37 | ||
38 | (require 'mail-prsvr) | |
39 | (require 'ietf-drums) | |
40 | (require 'rfc2231) | |
41 | (require 'rfc2047) | |
42 | (require 'rfc2045) | |
43 | ||
23f87bed MB |
44 | (defalias 'mail-header-parse-content-type 'rfc2231-parse-qp-string) |
45 | (defalias 'mail-header-parse-content-disposition 'rfc2231-parse-qp-string) | |
c113de23 | 46 | (defalias 'mail-content-type-get 'rfc2231-get-value) |
a46359d4 | 47 | (defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter) |
c113de23 GM |
48 | |
49 | (defalias 'mail-header-remove-comments 'ietf-drums-remove-comments) | |
50 | (defalias 'mail-header-remove-whitespace 'ietf-drums-remove-whitespace) | |
51 | (defalias 'mail-header-strip 'ietf-drums-strip) | |
52 | (defalias 'mail-header-get-comment 'ietf-drums-get-comment) | |
53 | (defalias 'mail-header-parse-address 'ietf-drums-parse-address) | |
54 | (defalias 'mail-header-parse-addresses 'ietf-drums-parse-addresses) | |
55 | (defalias 'mail-header-parse-date 'ietf-drums-parse-date) | |
56 | (defalias 'mail-narrow-to-head 'ietf-drums-narrow-to-header) | |
57 | (defalias 'mail-quote-string 'ietf-drums-quote-string) | |
01c52d31 | 58 | (defalias 'mail-header-make-address 'ietf-drums-make-address) |
c113de23 | 59 | |
23f87bed MB |
60 | (defalias 'mail-header-fold-field 'rfc2047-fold-field) |
61 | (defalias 'mail-header-unfold-field 'rfc2047-unfold-field) | |
c113de23 | 62 | (defalias 'mail-header-narrow-to-field 'rfc2047-narrow-to-field) |
23f87bed MB |
63 | (defalias 'mail-header-field-value 'rfc2047-field-value) |
64 | ||
c113de23 GM |
65 | (defalias 'mail-encode-encoded-word-region 'rfc2047-encode-region) |
66 | (defalias 'mail-encode-encoded-word-buffer 'rfc2047-encode-message-header) | |
67 | (defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string) | |
68 | (defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region) | |
69 | (defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string) | |
343d6628 MB |
70 | (defalias 'mail-decode-encoded-address-region 'rfc2047-decode-address-region) |
71 | (defalias 'mail-decode-encoded-address-string 'rfc2047-decode-address-string) | |
c113de23 GM |
72 | |
73 | (provide 'mail-parse) | |
74 | ||
75 | ;;; mail-parse.el ends here |