+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.
+
+ * gnus-util.el (gnus-message-with-timestamp-1): Use log-message instead
+ of modifying message-stack directly for XEmacs.
+
+ * 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-06 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-group.el (gnus-group-name-charset): Allow a method of the short
;; 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.
(cond ((eq gnus-add-timestamp-to-message 'log)
(setq time (current-time))
(display-message 'no-log str)
- (setcar (car message-stack) 'message)
- (setcdr (car message-stack) (concat ,@timestamp str)))
+ (log-message 'message (concat ,@timestamp str)))
(gnus-add-timestamp-to-message
(setq time (current-time))
(display-message 'message (concat ,@timestamp str)))
(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)
(string-match (car elem) buffer-name)
(throw 'return (cdr elem))))))))))))
+(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)))
+
(defalias 'mm-string-to-multibyte
(cond
((featurep 'xemacs)
(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
(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")
(defvar rfc2047-header-encoding-alist
\(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