2001-01-31 Dave Love <fx@gnu.org>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 2 Feb 2001 03:04:10 +0000 (03:04 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 2 Feb 2001 03:04:10 +0000 (03:04 +0000)
* mm-util.el (mm-mime-mule-charset-alist)
(mm-find-mime-charset-region): Consider mule-utf-8.

2001-01-31  Dave Love  <fx@gnu.org>

* gnus-art.el (gnus-article-x-face-command)
(gnus-treat-display-xface, gnus-treat-display-smileys): Add
:version.

2001-01-26  Dave Love  <fx@gnu.org>

* mm-util.el (mm-multibyte-string-p): New.

;; * qp.el: Remove un-logged bogus changes from 2000-12-20.
;; (quoted-printable-encode-region): Doc fix.  Don't call
;; string-as-multibyte on class.  Clarify line-folding.
(quoted-printable-encode-string): Make temp buffer inherit
string's multibyteness.

2001-01-23  Gerd Moellmann  <gerd@gnu.org>

* nnheader.el (toplevel): Don't require `gnus-util' at
compile-time; this creates a circular dependency, and prevents
a bootstrap.

2001-01-22  Andreas Schwab  <schwab@suse.de>

* nnheader.el (gnus-delete-line): Autoload it as a macro.

lisp/ChangeLog
lisp/gnus-art.el
lisp/mm-util.el
lisp/nnheader.el
lisp/qp.el

index 67a027b..b5892d1 100644 (file)
@@ -1,3 +1,34 @@
+2001-01-31  Dave Love  <fx@gnu.org>
+
+       * mm-util.el (mm-mime-mule-charset-alist)
+       (mm-find-mime-charset-region): Consider mule-utf-8.
+
+2001-01-31  Dave Love  <fx@gnu.org>
+
+       * gnus-art.el (gnus-article-x-face-command)
+       (gnus-treat-display-xface, gnus-treat-display-smileys): Add
+       :version.
+
+2001-01-26  Dave Love  <fx@gnu.org>
+
+       * mm-util.el (mm-multibyte-string-p): New.
+       
+;;     * qp.el: Remove un-logged bogus changes from 2000-12-20.
+;;     (quoted-printable-encode-region): Doc fix.  Don't call
+;;     string-as-multibyte on class.  Clarify line-folding.
+       (quoted-printable-encode-string): Make temp buffer inherit
+       string's multibyteness.
+
+2001-01-23  Gerd Moellmann  <gerd@gnu.org>
+
+       * nnheader.el (toplevel): Don't require `gnus-util' at
+       compile-time; this creates a circular dependency, and prevents
+       a bootstrap.
+
+2001-01-22  Andreas Schwab  <schwab@suse.de>
+
+       * nnheader.el (gnus-delete-line): Autoload it as a macro.
+
 2001-01-31 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnmail.el (nnmail-remove-list-identifiers): Use consp.
index 1b9430d..acd2258 100644 (file)
@@ -224,6 +224,7 @@ asynchronously.      The compressed face will be piped to this command."
   :type '(choice string
                 (function-item gnus-article-display-xface)
                 function)
+  :version "21.1"
   :group 'gnus-article-washing)
 
 (defcustom gnus-article-x-face-too-ugly nil
@@ -997,6 +998,7 @@ See the manual for details."
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See the manual for details."
   :group 'gnus-article-treat
+  :version "21.1"
   :type gnus-article-treat-head-custom)
 (put 'gnus-treat-display-xface 'highlight t)
 
@@ -1010,6 +1012,7 @@ See the manual for details."
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See the manual for details."
   :group 'gnus-article-treat
+  :version "21.1"
   :type gnus-article-treat-custom)
 (put 'gnus-treat-display-smileys 'highlight t)
 
index 89268c0..439c660 100644 (file)
@@ -28,7 +28,7 @@
 (require 'mail-prsvr)
 
 (defvar mm-mime-mule-charset-alist
-  '((us-ascii ascii)
+  `((us-ascii ascii)
     (iso-8859-1 latin-iso8859-1)
     (iso-8859-2 latin-iso8859-2)
     (iso-8859-3 latin-iso8859-3)
                    chinese-cns11643-3 chinese-cns11643-4
                    chinese-cns11643-5 chinese-cns11643-6
                    chinese-cns11643-7)
-    (utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e))
+    ,(if (or (charsetp 'unicode-a)
+            (not (coding-system-p 'mule-utf-8)))
+        '(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e)
+       ;; If we have utf-8 we're in Mule 5+.
+       (delete 'ascii (coding-system-get 'mule-utf-8 'safe-charsets))))
   "Alist of MIME-charset/MULE-charsets.")
 
 (eval-and-compile
              (setq idx (1+ idx)))
            string)))
      (string-as-unibyte . identity)
-      )))
+     (multibyte-string-p . ignore)
+     )))
 
 (eval-and-compile
   (defalias 'mm-char-or-char-int-p
@@ -299,6 +304,7 @@ If the charset is `composition', return the actual one."
                 (setq mail-parse-mule-charset
                       (or (car (last (assq mail-parse-charset
                                            mm-mime-mule-charset-alist)))
+                          ;; Fixme: don't fix that!
                           'latin-iso8859-1)))
             mail-parse-mule-charset)))))))
 
@@ -338,7 +344,8 @@ If the charset is `composition', return the actual one."
     (setq charsets (mm-delete-duplicates charsets))
     (if (and (> (length charsets) 1)
             (fboundp 'find-coding-systems-region)
-            (memq 'utf-8 (find-coding-systems-region b e)))
+            (let ((cs (find-coding-systems-region b e)))
+              (or (memq 'utf-8 cs) (memq 'mule-utf-8 cs))))
        '(utf-8)
       charsets)))
 
index 8ba0e07..b15885e 100644 (file)
@@ -1,7 +1,7 @@
 ;;; nnheader.el --- header access macros for Gnus and its backends
 
 ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
-;;        1997, 1998, 2000
+;;        1997, 1998, 2000, 2001
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 
 (eval-when-compile (require 'cl))
 
+;; Requiring `gnus-util' at compile time creates a circular
+;; dependency between nnheader.el and gnus-util.el.
+;(eval-when-compile (require 'gnus-util))
+
 (require 'mail-utils)
 (require 'mm-util)
 (eval-and-compile
@@ -56,7 +60,7 @@ on your system, you could say something like:
   (autoload 'mail-position-on-field "sendmail")
   (autoload 'message-remove-header "message")
   (autoload 'gnus-point-at-eol "gnus-util")
-  (autoload 'gnus-delete-line "gnus-util")
+  (autoload 'gnus-delete-line "gnus-util" nil nil 'macro)
   (autoload 'gnus-buffer-live-p "gnus-util"))
 
 ;;; Header access macros.
index 2f63abf..0e0f960 100644 (file)
@@ -1,6 +1,6 @@
 ;;; qp.el --- Quoted-Printable functions
 
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: mail, extensions
@@ -85,8 +85,9 @@ If CODING-SYSTEM is non-nil, decode the region with coding-system."
   "Quoted-printable encode the region between FROM and TO per RFC 2045.
 
 If FOLD, fold long lines at 76 characters (as required by the RFC).
-If CLASS is non-nil, translate the characters matched by that class in
-the form expected by `skip-chars-forward'.
+If CLASS is non-nil, translate the characters not matched by that
+regexp class, which is in the form expected by `skip-chars-forward'.
+You should probably avoid non-ASCII characters in this arg.
 
 If `mm-use-ultra-safe-encoding' is set, fold lines unconditionally and
 encode lines starting with \"From\"."
@@ -95,8 +96,6 @@ encode lines starting with \"From\"."
     ;; Avoid using 8bit characters. = is \075.
     ;; Equivalent to "^\000-\007\013\015-\037\200-\377="
     (setq class "\010-\012\014\040-\074\076-\177"))
-  (if (fboundp 'string-as-multibyte)
-      (setq class (string-as-multibyte class)))
   (save-excursion
     (save-restriction
       (narrow-to-region from to)
@@ -130,34 +129,33 @@ encode lines starting with \"From\"."
               (and (boundp 'mm-use-ultra-safe-encoding)
                    mm-use-ultra-safe-encoding)))
          (when (or fold mm-use-ultra-safe-encoding)
-           ;; Fold long lines.
-           (let ((tab-width 1))                ; HTAB is one character.
+           (let ((tab-width 1))        ; HTAB is one character.
              (goto-char (point-min))
              (while (not (eobp))
                ;; In ultra-safe mode, encode "From " at the beginning
                ;; of a line.
                (when mm-use-ultra-safe-encoding
-                 (beginning-of-line)
                  (if (looking-at "From ")
                      (replace-match "From=20" nil t)
                    (if (looking-at "-")
                        (replace-match "=2D" nil t))))
                (end-of-line)
-             (while (> (current-column) 76) ; tab-width must be 1.
-               (beginning-of-line)
-               (forward-char 75)       ; 75 chars plus an "="
-               (search-backward "=" (- (point) 2) t)
-               (insert "=\n")
-               (end-of-line))
-             (unless (eobp)
-               (forward-line))))))))))
+               ;; Fold long lines.
+               (while (> (current-column) 76) ; tab-width must be 1.
+                 (beginning-of-line)
+                 (forward-char 75)     ; 75 chars plus an "="
+                 (search-backward "=" (- (point) 2) t)
+                 (insert "=\n")
+                 (end-of-line))
+               (forward-line)))))))))
 
 (defun quoted-printable-encode-string (string)
   "Encode the STRING as quoted-printable and return the result."
-  (with-temp-buffer
-    (insert string)
-    (quoted-printable-encode-region (point-min) (point-max))
-    (buffer-string)))
+  (let ((default-enable-multibyte-characters (mm-multibyte-string-p string)))
+    (with-temp-buffer
+      (insert string)
+      (quoted-printable-encode-region (point-min) (point-max))
+      (buffer-string))))
 
 (provide 'qp)