Mercurial > emacs
annotate lisp/gnus/rfc2045.el @ 83094:8e5779acd195
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-193
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-194
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-195
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-196
Remove RCS keywords
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-197
Stupid CVS keyword changes
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-198
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-199
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-134
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 10 Apr 2004 23:06:09 +0000 |
parents | 695cf19ef79e |
children | 55fd4f77387a 375f2633d815 |
rev | line source |
---|---|
38413
a26d9b55abb6
Some fixes to follow coding conventions in files from Gnus.
Pavel Janík <Pavel@Janik.cz>
parents:
34674
diff
changeset
|
1 ;;; rfc2045.el --- functions for decoding rfc2045 headers |
31717 | 2 |
3 ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. | |
4 | |
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | |
6 ;; This file is part of GNU Emacs. | |
7 | |
8 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
9 ;; it under the terms of the GNU General Public License as published by | |
10 ;; the Free Software Foundation; either version 2, or (at your option) | |
11 ;; any later version. | |
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 | |
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 ;; GNU General Public License for more details. | |
17 | |
18 ;; You should have received a copy of the GNU General Public License | |
19 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
20 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 ;; Boston, MA 02111-1307, USA. | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38413
diff
changeset
|
22 |
34674 | 23 ;; RFC 2045 is: "Multipurpose Internet Mail Extensions (MIME) Part |
24 ;; One: Format of Internet Message Bodies". | |
31717 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;;; Code: | |
29 | |
30 (require 'ietf-drums) | |
31 | |
32 (defun rfc2045-encode-string (param value) | |
33 "Return and PARAM=VALUE string encoded according to RFC2045." | |
34 (if (or (string-match (concat "[" ietf-drums-no-ws-ctl-token "]") value) | |
35 (string-match (concat "[" ietf-drums-tspecials "]") value) | |
36 (string-match "[ \n\t]" value) | |
37 (not (string-match (concat "[" ietf-drums-text-token "]") value))) | |
38 (concat param "=" (format "%S" value)) | |
39 (concat param "=" value))) | |
40 | |
41 (provide 'rfc2045) | |
42 | |
52401 | 43 ;;; arch-tag: 9ca54127-97bc-432c-b6e2-8c59cadba306 |
31717 | 44 ;;; rfc2045.el ends here |