Changes committed gnus/lisp (5 files)

"Miles Bader" <[email protected]>
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog gnus-start.el mm-util.el rfc2047.el rfc2104.el

Merge from emacs--devo--0

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 [email protected]/emacs--unicode--0--patch-100
   - Merge from emacs--devo--0
   - Update from CVS

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

   - Update from CVS

 * [email protected]/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 [email protected]/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'

 * [email protected]/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 [email protected]/emacs--cvs-trunk--0--patch-2
   - Import changes from [email protected]/emacs--unicode--0
   - Merge from emacs--cvs-trunk--0
   - Update unicode-branch version numbers and ChangeLog file names

2008-02-01  Zhang Wei  <[email protected]>

   * 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  <[email protected]>

   * 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  <[email protected]>

   * 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: [email protected]/gnus--devo--0--patch-458


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1754 gnus/lisp/ChangeLog:7.1755
--- ChangeLog:7.1754	Wed Feb 20 12:38:14 2008
+++ ChangeLog	Sun Feb 24 07:23:40 2008
@@ -39,6 +39,24 @@
 	ports to the calls to `netrc-machine-user-or-password' in addition to
 	"imap" and "imaps".
 
+2008-02-01  Zhang Wei  <[email protected]>
+
+	* 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  <[email protected]>
+
+	* 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  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* gnus.el (gnus-group-startup-message): Add `find-image' call before
Index: gnus-start.el
diff -u gnus/lisp/gnus-start.el:7.64 gnus/lisp/gnus-start.el:7.65
--- gnus-start.el:7.64	Sun Jan 20 06:23:57 2008
+++ gnus-start.el	Sun Feb 24 07:23:40 2008
@@ -463,6 +463,8 @@
 
 ;;; 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 @@
       ;; 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 @@
 
 (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: mm-util.el
diff -u gnus/lisp/mm-util.el:7.74 gnus/lisp/mm-util.el:7.75
--- mm-util.el:7.74	Sun Jan 20 06:23:57 2008
+++ mm-util.el	Sun Feb 24 07:23:40 2008
@@ -492,6 +492,10 @@
     (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 @@
 	  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
@@ -1011,6 +1015,8 @@
 	;; mm-xemacs-find-mime-charset will return an appropriate list.
 	;; 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
Index: rfc2047.el
diff -u gnus/lisp/rfc2047.el:7.68 gnus/lisp/rfc2047.el:7.69
--- rfc2047.el:7.68	Sun Jan 20 06:23:57 2008
+++ rfc2047.el	Sun Feb 24 07:23:40 2008
@@ -78,6 +78,8 @@
     (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 @@
   ;; (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: rfc2104.el
diff -u gnus/lisp/rfc2104.el:7.9 gnus/lisp/rfc2104.el:7.10
--- rfc2104.el:7.9	Sun Jan 20 06:23:57 2008
+++ rfc2104.el	Sun Feb 24 07:23:40 2008
@@ -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:
 
@@ -88,12 +89,12 @@
 	(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)
@@ -110,9 +111,12 @@
     (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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.