view lisp/gnus/rfc2045.el @ 110465:b7b7e970d807

Merge changes made in Gnus trunk. gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) spec inserr "*" if the group isn't active instead of 0. nnimap.el (nnimap-request-create-group): Implement. nnimap.el: Use the IMAP version of utf7-encode throughout. nnimap.el: Implement the nnimap article expunging interface method, and make it more general. gnus-group.el: Put back the nnimap autoloads needed to do the acl stuff. gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. nnimap.el (nnimap-request-group): When we have zero articles, return the right data to Gnus. nnimap.el (nnimap-request-expire-articles): Only delete articles immediately if the target is 'delete. nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time for oldness in addition to being a predicate. nnimap.el: Implement nnimap expiry. nnimap.el (nnimap-request-move-article): Request the article before looking at what the Message-ID is. nnimap.el (nnimap-mark-and-expunge-incoming): Wait for the last sequence. gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to find out whether methods are equal. nnimap.el (nnimap-find-expired-articles): Don't refer to nnml-inhibit-expiry. nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. gnus-start.el (gnus-get-unread-articles): Fix the prefixed select method in the presence of many similar methods. When we have several similar methods, try to create as few extended methods as possible. gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting marks for nnimap, which is seldom the right thing to do. gnus-int.el (gnus-open-server): Give a better error message in the "go offline" case. gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. nnml.el (nnml-generate-nov-file): Fix variable name clobbering from previous patch. gnus-start.el (gnus-get-unread-articles): Get the extended method slightly later to avoid double-getting it.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Tue, 21 Sep 2010 23:13:46 +0000
parents 8d09094063d0
children 417b1e4d63cd
line wrap: on
line source

;;; rfc2045.el --- Functions for decoding rfc2045 headers

;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

;; RFC 2045 is: "Multipurpose Internet Mail Extensions (MIME) Part
;; One:  Format of Internet Message Bodies".

;;; Commentary:

;;; Code:

(require 'ietf-drums)

(defun rfc2045-encode-string (param value)
  "Return and PARAM=VALUE string encoded according to RFC2045."
  (if (or (string-match (concat "[" ietf-drums-no-ws-ctl-token "]") value)
	  (string-match (concat "[" ietf-drums-tspecials "]") value)
	  (string-match "[ \n\t]" value)
	  (not (string-match (concat "[" ietf-drums-text-token "]") value)))
      (concat param "=" (format "%S" value))
    (concat param "=" value)))

(provide 'rfc2045)

;;; rfc2045.el ends here