From: Miles Bader Date: Sun, 15 Jul 2007 04:45:41 +0000 (+0000) Subject: Merge from gnus--rel--5.10 X-Git-Tag: emacs-pretest-22.1.90~1268 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82fe1aeda6647e15874f7c7c5299f82abd2cbb5c;p=emacs.git Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 235-236) - Update from CVS 2007-07-13 Katsumi Yamaoka * lisp/gnus/gnus-srvr.el (gnus-server-agent-face, gnus-server-opened-face) (gnus-server-closed-face, gnus-server-denied-face) (gnus-server-offline-face): Remove variable. (gnus-server-font-lock-keywords): Use faces that are not aliases. * lisp/gnus/mm-util.el (mm-decode-coding-string, mm-encode-coding-string) (mm-decode-coding-region, mm-encode-coding-region): Don't modify string if the coding-system argument is nil for XEmacs. * lisp/gnus/nnrss.el (nnrss-compatible-encoding-alist): Inherit the value of mm-charset-override-alist. * lisp/gnus/rfc2047.el: Don't require base64; require rfc2045 for the function rfc2045-encode-string. (rfc2047-encode-parameter): Use rfc2045-encode-string to quote or not to quote the parameter value. Revision: emacs@sv.gnu.org/emacs--rel--22--patch-58 --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6ff604ab53f..5e45df2e902 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,22 @@ +2007-07-13 Katsumi Yamaoka + + * gnus-srvr.el (gnus-server-agent-face, gnus-server-opened-face) + (gnus-server-closed-face, gnus-server-denied-face) + (gnus-server-offline-face): Remove variable. + (gnus-server-font-lock-keywords): Use faces that are not aliases. + + * mm-util.el (mm-decode-coding-string, mm-encode-coding-string) + (mm-decode-coding-region, mm-encode-coding-region): Don't modify string + if the coding-system argument is nil for XEmacs. + + * nnrss.el (nnrss-compatible-encoding-alist): Inherit the value of + mm-charset-override-alist. + + * rfc2047.el: Don't require base64; require rfc2045 for the function + rfc2045-encode-string. + (rfc2047-encode-parameter): Use rfc2045-encode-string to quote or not + to quote the parameter value. + 2007-07-04 Katsumi Yamaoka * gnus-sum.el (gnus-summary-catchup): Don't recognize cached articles diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index f6804f3b114..0d5443f576c 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -214,43 +214,12 @@ If nil, a faster, but more primitive, buffer is used instead." ;; backward-compatibility alias (put 'gnus-server-offline-face 'face-alias 'gnus-server-offline) -(defcustom gnus-server-agent-face 'gnus-server-agent - "Face name to use on AGENTIZED servers." - :version "22.1" - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-opened-face 'gnus-server-opened - "Face name to use on OPENED servers." - :version "22.1" - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-closed-face 'gnus-server-closed - "Face name to use on CLOSED servers." - :version "22.1" - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-denied-face 'gnus-server-denied - "Face name to use on DENIED servers." - :version "22.1" - :group 'gnus-server-visual - :type 'face) - -(defcustom gnus-server-offline-face 'gnus-server-offline - "Face name to use on OFFLINE servers." - :version "22.1" - :group 'gnus-server-visual - :type 'face) - (defvar gnus-server-font-lock-keywords - (list - '("(\\(agent\\))" 1 gnus-server-agent-face) - '("(\\(opened\\))" 1 gnus-server-opened-face) - '("(\\(closed\\))" 1 gnus-server-closed-face) - '("(\\(offline\\))" 1 gnus-server-offline-face) - '("(\\(denied\\))" 1 gnus-server-denied-face))) + '(("(\\(agent\\))" 1 gnus-server-agent) + ("(\\(opened\\))" 1 gnus-server-opened) + ("(\\(closed\\))" 1 gnus-server-closed) + ("(\\(offline\\))" 1 gnus-server-offline) + ("(\\(denied\\))" 1 gnus-server-denied))) (defun gnus-server-mode () "Major mode for listing and editing servers. diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 742bbc223ae..8933edaf42c 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -36,11 +36,7 @@ (if (fboundp (car elem)) (defalias nfunc (car elem)) (defalias nfunc (cdr elem))))) - '((decode-coding-string . (lambda (s a) s)) - (encode-coding-string . (lambda (s a) s)) - (encode-coding-region . ignore) - (coding-system-list . ignore) - (decode-coding-region . ignore) + '((coding-system-list . ignore) (char-int . identity) (coding-system-equal . equal) (annotationp . ignore) @@ -96,6 +92,34 @@ (insert-byte . insert-char) (multibyte-char-to-unibyte . identity)))) +(eval-and-compile + (if (featurep 'xemacs) + (if (featurep 'file-coding) + ;; Don't modify string if CODING-SYSTEM is nil. + (progn + (defun mm-decode-coding-string (str coding-system) + (if coding-system + (decode-coding-string str coding-system) + str)) + (defun mm-encode-coding-string (str coding-system) + (if coding-system + (encode-coding-string str coding-system) + str)) + (defun mm-decode-coding-region (start end coding-system) + (if coding-system + (decode-coding-region start end coding-system))) + (defun mm-encode-coding-region (start end coding-system) + (if coding-system + (encode-coding-region start end coding-system)))) + (defun mm-decode-coding-string (str coding-system) str) + (defun mm-encode-coding-string (str coding-system) str) + (defalias 'mm-decode-coding-region 'ignore) + (defalias 'mm-encode-coding-region 'ignore)) + (defalias 'mm-decode-coding-string 'decode-coding-string) + (defalias 'mm-encode-coding-string 'encode-coding-string) + (defalias 'mm-decode-coding-region 'decode-coding-region) + (defalias 'mm-encode-coding-region 'encode-coding-region))) + (eval-and-compile (cond ((fboundp 'replace-in-string) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 996783e69b6..1f7e5ba1de9 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -85,7 +85,12 @@ ARTICLE is the article number of the current headline.") (defvar nnrss-file-coding-system mm-universal-coding-system "Coding system used when reading and writing files.") -(defvar nnrss-compatible-encoding-alist '((iso-8859-1 . windows-1252)) +(defvar nnrss-compatible-encoding-alist + (delq nil (mapcar (lambda (elem) + (if (and (mm-coding-system-p (car elem)) + (mm-coding-system-p (cdr elem))) + elem)) + mm-charset-override-alist)) "Alist of encodings and those supersets. The cdr of each element is used to decode data if it is available when the car is what the data specify as the encoding. Or, the car is used diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 6dc432daf79..3cf2940e031 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el @@ -55,7 +55,7 @@ Value is what BODY returns." (require 'ietf-drums) ;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus. (require 'mail-prsvr) -(require 'base64) +(require 'rfc2045) ;; rfc2045-encode-string (autoload 'mm-body-7-or-8 "mm-bodies") (eval-and-compile @@ -832,12 +832,9 @@ it, put the following line in your ~/.gnus.el file: \(defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter) " - (let* ((rfc2047-encoding-type 'mime) - (rfc2047-encode-max-chars nil) - (string (rfc2047-encode-string value))) - (if (string-match (concat "[" ietf-drums-tspecials "]") string) - (format "%s=%S" param string) - (concat param "=" string)))) + (let ((rfc2047-encoding-type 'mime) + (rfc2047-encode-max-chars nil)) + (rfc2045-encode-string param (rfc2047-encode-string value)))) ;;; ;;; Functions for decoding RFC2047 messages