changeset 78125:f0705c4da65a

Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 235-236) - Update from CVS 2007-07-13 Katsumi Yamaoka <yamaoka@jpl.org> * 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
author Miles Bader <miles@gnu.org>
date Sun, 15 Jul 2007 04:45:41 +0000
parents efad8ed994d6
children c30936b69ac7 e0cd45299f77
files lisp/gnus/ChangeLog lisp/gnus/gnus-srvr.el lisp/gnus/mm-util.el lisp/gnus/nnrss.el lisp/gnus/rfc2047.el
diffstat 5 files changed, 63 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Sun Jul 15 01:23:15 2007 +0000
+++ b/lisp/gnus/ChangeLog	Sun Jul 15 04:45:41 2007 +0000
@@ -1,3 +1,22 @@
+2007-07-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* 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  <yamaoka@jpl.org>
 
 	* gnus-sum.el (gnus-summary-catchup): Don't recognize cached articles
--- a/lisp/gnus/gnus-srvr.el	Sun Jul 15 01:23:15 2007 +0000
+++ b/lisp/gnus/gnus-srvr.el	Sun Jul 15 04:45:41 2007 +0000
@@ -214,43 +214,12 @@
 ;; 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.
--- a/lisp/gnus/mm-util.el	Sun Jul 15 01:23:15 2007 +0000
+++ b/lisp/gnus/mm-util.el	Sun Jul 15 04:45:41 2007 +0000
@@ -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)
@@ -97,6 +93,34 @@
      (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)
     (defalias 'mm-replace-in-string 'replace-in-string))
--- a/lisp/gnus/nnrss.el	Sun Jul 15 01:23:15 2007 +0000
+++ b/lisp/gnus/nnrss.el	Sun Jul 15 04:45:41 2007 +0000
@@ -85,7 +85,12 @@
 (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
--- a/lisp/gnus/rfc2047.el	Sun Jul 15 01:23:15 2007 +0000
+++ b/lisp/gnus/rfc2047.el	Sun Jul 15 04:45:41 2007 +0000
@@ -55,7 +55,7 @@
 (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 @@
 
 \(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