Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Sun, 24 Feb 2008 06:23:40 +0000 (06:23 +0000)
committerMiles Bader <miles@gnu.org>
Sun, 24 Feb 2008 06:23:40 +0000 (06:23 +0000)
Patches applied:

 * emacs--devo--0  (patch 1019, 1037-1038, 1046-1048)

   - Update from CVS
   - Merge unicode branch
   - Merge ChangeLog.unicode files into ChangeLogs
   - Adjust dates of unicode merge entries to UTC.
   - Merge from gnus--devo--0
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 215)

   - Merge from gnus--rel--5.10

 * emacs--unicode--0  (base, patch 2, 7, 9, 11, 13-15, 17, 21, 23, 34, 40, 42-43, 46, 49-51, 54, 56-58, 60, 62, 64, 74, 78, 86, 90, 98, 101, 105, 108-111, 113, 115, 118, 127, 130, 137, 140, 146, 150, 156, 158, 162, 166, 171, 177, 180, 184-185, 189, 196, 202, 205, 208, 213, 219, 223, 230, 235, 238-239, 246, 249, 252, 257, 270, 272, 278, 283, 294, 300, 306, 312, 324)

   - tag of miles@gnu.org--gnu-2005/emacs--unicode--0--patch-100
   - Merge from emacs--devo--0
   - Update from CVS

 * gnus--rel--5.10  (patch 275)

   - Update from CVS

 * miles@gnu.org--gnu-2004/emacs--unicode--0  (patch 2, 15, 17, 24, 32, 36, 40-41, 43, 45, 47-48, 50, 57, 62, 65, 69-70, 72, 74, 78-79, 81)

   - Add changes from CVS emacs-unicode-2 branch
   - Merge from emacs--cvs-trunk--0
   - Merge from lorentey@elte.hu--2004/emacs--hacks--0, emacs--cvs-trunk--0
   - Merge from emacs--cvs-trunk--0, emacs--gnus--5.10, gnus--rel--5.10
   - Remove apparently vestigial uses of `mm-hack-charsets'

 * miles@gnu.org--gnu-2005/emacs--unicode--0  (base, patch 1-2, 4, 7, 10-11, 13-16, 18, 21, 23-24, 28-29, 31, 35, 37, 39, 44, 51, 53, 57, 63, 65, 67-69, 71, 74, 77-79, 81-82, 85-86, 88, 91, 95, 97, 99)

   - tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-2
   - Import changes from miles@gnu.org--gnu-2004/emacs--unicode--0
   - Merge from emacs--cvs-trunk--0
   - Update unicode-branch version numbers and ChangeLog file names

2008-02-01  Zhang Wei  <id.brep@gmail.com>

   * lisp/rfc2047.el (rfc2047-charset-encoding-alist): Add gbk and GB18030.

   * lisp/mm-util.el (mm-mime-mule-charset-alist): Add gbk and GB18030.

2008-02-01  Kenichi Handa  <handa@m17n.org>

   * lisp/rfc2104.el (rfc2104-hexstring-to-byte-list): Renamed from
   rfc2104-hexstring-to-bitstring and changed to return a byte list.
   (rfc2104-hash): Convert the result of concat to unibyte string.

2008-02-01  Dave Love  <fx@gnu.org>

   * lisp/gnus-start.el (gnus-read-newsrc-el-file): Don't bind
   coding-system-for-read.
   (gnus-gnus-to-quick-newsrc-format): Insert coding cookie.

Revision: emacs@sv.gnu.org/gnus--devo--0--patch-458

lisp/ChangeLog
lisp/gnus-start.el
lisp/mm-util.el
lisp/rfc2047.el
lisp/rfc2104.el

index 18b0748..1b2164b 100644 (file)
        ports to the calls to `netrc-machine-user-or-password' in addition to
        "imap" and "imaps".
 
+2008-02-01  Zhang Wei  <id.brep@gmail.com>
+
+       * rfc2047.el (rfc2047-charset-encoding-alist): Add gbk and GB18030.
+
+       * mm-util.el (mm-mime-mule-charset-alist): Add gbk and GB18030.
+
+2008-02-01  Kenichi Handa  <handa@m17n.org>
+
+       * rfc2104.el (rfc2104-hexstring-to-byte-list): Renamed from
+       rfc2104-hexstring-to-bitstring and changed to return a byte list.
+       (rfc2104-hash): Convert the result of concat to unibyte string.
+
+2008-02-01  Dave Love  <fx@gnu.org>
+
+       * gnus-start.el (gnus-read-newsrc-el-file): Don't bind
+       coding-system-for-read.
+       (gnus-gnus-to-quick-newsrc-format): Insert coding cookie.
+
 2008-02-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus.el (gnus-group-startup-message): Add `find-image' call before
index d65403c..009c5c3 100644 (file)
@@ -463,6 +463,8 @@ Can be used to turn version control on or off."
 
 ;;; Internal variables
 
+;; Fixme: deal with old emacs-mule when mm-universal-coding-system is
+;; utf-8-emacs.
 (defvar gnus-ding-file-coding-system mm-universal-coding-system
   "Coding system for ding file.")
 
@@ -2404,8 +2406,7 @@ If FORCE is non-nil, the .newsrc file is read."
       ;; We always, always read the .eld file.
       (gnus-message 5 "Reading %s..." ding-file)
       (let (gnus-newsrc-assoc)
-       (let ((coding-system-for-read gnus-ding-file-coding-system))
-         (gnus-load ding-file))
+       (gnus-load ding-file)
        ;; Older versions of `gnus-format-specs' are no longer valid
        ;; in Oort Gnus 0.01.
        (let ((version
@@ -2837,7 +2838,8 @@ If FORCE is non-nil, the .newsrc file is read."
 
 (defun gnus-gnus-to-quick-newsrc-format (&optional minimal name &rest specific-variables)
   "Print Gnus variables such as `gnus-newsrc-alist' in Lisp format."
-    (princ ";; -*- emacs-lisp -*-\n")
+    (princ (format ";; -*- mode:emacs-lisp; coding: %s; -*-\n"
+                  gnus-ding-file-coding-system))
     (if name
        (princ (format ";; %s\n" name))
       (princ ";; Gnus startup file.\n"))
index ede0d04..1a60539 100644 (file)
@@ -492,6 +492,10 @@ could use `autoload-coding-system' here."
     (iso-2022-jp latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978)
     (euc-kr korean-ksc5601)
     (gb2312 chinese-gb2312)
+    (gbk chinese-gbk)
+    (gb18030 gb18030-2-byte
+            gb18030-4-byte-bmp gb18030-4-byte-smp
+            gb18030-4-byte-ext-1 gb18030-4-byte-ext-2)
     (big5 chinese-big5-1 chinese-big5-2)
     (tibetan tibetan)
     (thai-tis620 thai-tis620)
@@ -560,7 +564,7 @@ with Mule charsets.  It is completely useless for Emacs."
          cs mime mule alist)
       (while css
        (setq cs (pop css)
-             mime (or (coding-system-get cs :mime-charset) ; Emacs 23 (unicode)
+             mime (or (coding-system-get cs :mime-charset); Emacs 23 (unicode)
                       (coding-system-get cs 'mime-charset)))
        (when (and mime
                   (not (eq t (setq mule
@@ -1012,6 +1016,8 @@ charset, and a longer list means no appropriate charset."
        ;; Otherwise, we'll get nil, and the next setq will get invoked.
        (setq charsets (mm-xemacs-find-mime-charset b e))
 
+       ;; Fixme: won't work for unibyte Emacs 23:
+
        ;; We're not multibyte, or a single coding system won't cover it.
        (setq charsets
              (mm-delete-duplicates
index a462452..45f251d 100644 (file)
@@ -78,6 +78,8 @@ The values can be:
     (iso-2022-jp . B)
     (iso-2022-kr . B)
     (gb2312 . B)
+    (gbk . B)
+    (gb18030 . B)
     (big5 . B)
     (cn-big5 . B)
     (cn-gb . B)
@@ -344,7 +346,7 @@ The buffer may be narrowed."
   ;; (make-char-table 'syntax-table '(2)) only works in Emacs.
   (let ((table (make-syntax-table)))
     ;; The following is done to work for setting all elements of the table
-    ;; in Emacs 21 and 22 and XEmacs; it appears to be the cleanest way.
+    ;; in Emacs 21-23 and XEmacs; it appears to be the cleanest way.
     ;; Play safe and don't assume the form of the word syntax entry --
     ;; copy it from ?a.
     (if (fboundp 'set-char-table-range)        ; Emacs
index 5c208a8..43bbae9 100644 (file)
@@ -53,6 +53,7 @@
 ;;; 1999-10-23  included in pgnus
 ;;; 2000-08-15  `rfc2104-hexstring-to-bitstring'
 ;;; 2000-05-12  added sha-1 example, added test case reference
+;;; 2003-11-13  change rfc2104-hexstring-to-bitstring to ...-byte-list
 
 ;;; Code:
 
        (rfc2104-hex-to-int (reverse (append str nil))))
     0))
 
-(defun rfc2104-hexstring-to-bitstring (str)
+(defun rfc2104-hexstring-to-byte-list (str)
   (let (out)
     (while (< 0 (length str))
       (push (rfc2104-hex-to-int (substring str -2)) out)
       (setq str (substring str 0 -2)))
-    (concat out)))
+    out))
 
 (defun rfc2104-hash (hash block-length hash-length key text)
   (let* (;; if key is longer than B, reset it to HASH(key)
     (setq k_ipad (mapcar (lambda (c) (logxor c rfc2104-ipad)) k_ipad))
     (setq k_opad (mapcar (lambda (c) (logxor c rfc2104-opad)) k_opad))
     ;; perform outer hash
-    (funcall hash (concat k_opad (rfc2104-hexstring-to-bitstring
-                                 ;; perform inner hash
-                                 (funcall hash (concat k_ipad text)))))))
+    (funcall hash
+            (encode-coding-string
+             (concat k_opad (rfc2104-hexstring-to-byte-list
+                             ;; perform inner hash
+                             (funcall hash (concat k_ipad text))))
+             'iso-latin-1))))
 
 (provide 'rfc2104)