Changes committed gnus/lisp (8 files)

"Miles Bader" <[email protected]> Fri, 03 Oct 2008 06:21:55 +0200
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog ChangeLog.2 gnus-art.el gnus-group.el gnus-util.el
          mm-util.el mml.el tls.el

Merge from emacs--devo--0

Patches applied:

 * emacs--devo--0  (patch 1411, 1413, 1424, 1427, 1429, 1431, 1433, 1436-1438, 1440-1441)

   - Merge from gnus--devo--0
   - Update from CVS

2008-10-02  Glenn Morris  <[email protected]>

   * lisp/mm-util.el (mm-codepage-setup): Tweak codepage error.
   Silence compiler warning.

2008-10-01  Magnus Henoch  <[email protected]>

   * lisp/tls.el (open-tls-stream): Show the actual command being
   executed, instead of the format string.

2008-09-30  Chong Yidong  <[email protected]>

   * lisp/mml.el (mml-menu): Don't assume mml2015 is bound.

2008-09-27  Glenn Morris  <[email protected]>

   * lisp/gnus-util.el (mail-header-remove-comments): Autoload it.

2008-09-27  Andreas Schwab  <[email protected]>

   * lisp/gnus-util.el (gnus-split-references): Strip comments.
   (gnus-parent-id): Likewise.

2008-09-10  Katsumi Yamaoka  <[email protected]>

   * lisp/gnus-group.el (gnus-group-make-useful-group): Don't use the compiler
   macro caddr in the interactive form since it won't be expanded.

2008-09-09  Katsumi Yamaoka  <[email protected]>

   * lisp/gnus-art.el (gnus-mime-set-charset-parameters): Add new argument
   `charset'; fix name of function called recursively.
   (gnus-mime-view-part-as-charset): Don't bind gnus-newsgroup-charset.

2008-09-09  Katsumi Yamaoka  <[email protected]>

   * lisp/gnus-art.el (gnus-mime-strip-charset-parameters): Remove.
   (gnus-mime-set-charset-parameters): New function.
   (gnus-mime-view-part-as-charset): Use it to correctly display part
   specifying wrong charset.

Revision: [email protected]/gnus--devo--0--patch-549


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1922 gnus/lisp/ChangeLog:7.1923
--- ChangeLog:7.1922	Fri Oct  3 03:52:25 2008
+++ ChangeLog	Fri Oct  3 06:21:54 2008
@@ -7,15 +7,38 @@
 
 	* nnmail.el (nnmail-expiry-target): Fix custom type.
 
+2008-10-02  Glenn Morris  <[email protected]>
+
+	* mm-util.el (mm-codepage-setup): Tweak codepage error.
+	Silence compiler warning.
+
+2008-10-01  Magnus Henoch  <[email protected]>
+
+	* tls.el (open-tls-stream): Show the actual command being
+	executed, instead of the format string.
+
 2008-10-01  Katsumi Yamaoka  <[email protected]>
 
 	* lpath.el: Fbind codepage-setup for Emacs 23.
 
+2008-09-30  Chong Yidong  <[email protected]>
+
+	* mml.el (mml-menu): Don't assume mml2015 is bound.
+
 2008-09-29  Katsumi Yamaoka  <[email protected]>
 
 	* gnus-art.el (gnus-article-read-summary-keys): Check if summary window
 	exists.
 
+2008-09-27  Glenn Morris  <[email protected]>
+
+	* gnus-util.el (mail-header-remove-comments): Autoload it.
+
+2008-09-27  Andreas Schwab  <[email protected]>
+
+	* gnus-util.el (gnus-split-references): Strip comments.
+	(gnus-parent-id): Likewise.
+
 2008-09-26  Reiner Steib  <[email protected]>
 
 	* message.el (message-confirm-send): Fix version.
@@ -67,6 +90,24 @@
 	summary line gnus-number property and ignore them (with a warning
 	message).
 
+2008-09-10  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-group.el (gnus-group-make-useful-group): Don't use the compiler
+	macro caddr in the interactive form since it won't be expanded.
+
+2008-09-09  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-art.el (gnus-mime-set-charset-parameters): Add new argument
+	`charset'; fix name of function called recursively.
+	(gnus-mime-view-part-as-charset): Don't bind gnus-newsgroup-charset.
+
+2008-09-09  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-art.el (gnus-mime-strip-charset-parameters): Remove.
+	(gnus-mime-set-charset-parameters): New function.
+	(gnus-mime-view-part-as-charset): Use it to correctly display part
+	specifying wrong charset.
+
 2008-09-08  David Engster  <[email protected]>
 
 	* nnmairix.el (nnmairix-create-server-and-default-group): Require match
@@ -8960,7 +9001,7 @@
 	* gnus-art.el (gnus-mime-inline-part): Decode parts according to
 	the coding cookies; decompress compressed parts.
 
-	* mml.el (mml-generate-mime-1): Add the charaset parameter according
+	* mml.el (mml-generate-mime-1): Add the charset parameter according
 	to the value which a user specified manually or the coding cookie.
 
 	* mm-util.el (mm-string-to-multibyte): New function.
Index: ChangeLog.2
diff -u gnus/lisp/ChangeLog.2:7.26 gnus/lisp/ChangeLog.2:7.27
--- ChangeLog.2:7.26	Fri Jul  4 02:09:29 2008
+++ ChangeLog.2	Fri Oct  3 06:21:54 2008
@@ -1059,7 +1059,7 @@
 2003-10-24  Teodor Zlatanov  <[email protected]>
 
 	* spam.el (spam-ham-copy-or-move-routine): Do not delete if copy
-	is t, also don't intepret the list of groups as a list of lists.
+	is t, also don't interpret the list of groups as a list of lists.
 	(spam-mark-spam-as-expired-and-move-routine)
 	(spam-ham-copy-or-move-routine): Delete articles only if 1 or
 	more groups were specified (and "copy" was not specified for
@@ -6936,12 +6936,12 @@
 	broken connections by opening a new connection and repeating the
 	failed command.
 	(nntp-retrieve-headers-with-xover): Some NNTP servers respond to
-	XOVER commands preceeding the active articles with the nov entry
+	XOVER commands preceding the active articles with the nov entry
 	of the first available article.  When gnus connected to such a
 	server, the unexpected nov entry would result in duplicate lines
 	in the agent's overview file.  This patch fixes the duplicate
 	lines problem and improves performance by skipping over all
-	articles IDs that preceed the first nov entry in the server's
+	articles IDs that precede the first nov entry in the server's
 	reply.
 
 2002-12-11  Katsumi Yamaoka  <[email protected]>
@@ -7470,7 +7470,7 @@
 
 2002-10-22  TSUCHIYA Masatoshi  <[email protected]>
 
-	* pgg.el (pgg-snarf-keys): Do not refer unbinded local variables.
+	* pgg.el (pgg-snarf-keys): Do not refer unbound local variables.
 
 2002-10-22  Simon Josefsson  <[email protected]>
 
@@ -8900,7 +8900,7 @@
 
 2002-05-18  Jesper Harder  <[email protected]>
 
-	* gnus-sum.el (gnus-dependencies-add-header): Avoid one unecessary
+	* gnus-sum.el (gnus-dependencies-add-header): Avoid one unnecessary
 	call to gnus-parent-id when we check for References loops.
 	(gnus-summary-prepare-threads): Avoid simplifying every Subject
 	twice by saving the simplified subject string in simp-subject.
@@ -9310,7 +9310,7 @@
 
 2002-04-11  Lars Magne Ingebrigtsen  <[email protected]>
 
-	* gnus-art.el (gnus-article-prepare): Place point on the emtpy
+	* gnus-art.el (gnus-article-prepare): Place point on the empty
 	header line.
 
 2002-04-11  Per Abrahamsen  <[email protected]>
@@ -13762,7 +13762,7 @@
 	expiry-target.  (Otherwise nnml will be in a inconsistent internal
 	state causing all kind of problems.)
 	(nnml-request-expire-articles): If `nnml-article-to-file' or
-	`file-attributes' failes, return article as un-expirable instead
+	`file-attributes' fail, return article as un-expirable instead
 	of treating it as expired.
 
 2001-08-31  Sam Steingold  <[email protected]>
Index: gnus-art.el
diff -u gnus/lisp/gnus-art.el:7.282 gnus/lisp/gnus-art.el:7.283
--- gnus-art.el:7.282	Tue Sep 30 01:54:48 2008
+++ gnus-art.el	Fri Oct  3 06:21:54 2008
@@ -5138,10 +5138,14 @@
 	   (mm-string-to-multibyte contents)))
 	(goto-char b)))))
 
-(defun gnus-mime-strip-charset-parameters (handle)
-  "Strip charset parameters from HANDLE."
+(defun gnus-mime-set-charset-parameters (handle charset)
+  "Set CHARSET to parameters in HANDLE.
+CHARSET may either be a string or a symbol."
+  (unless (stringp charset)
+    (setq charset (symbol-name charset)))
   (if (stringp (car handle))
-      (mapc #'gnus-mime-strip-charset-parameters (cdr handle))
+      (dolist (h (cdr handle))
+	(gnus-mime-set-charset-parameters h charset))
     (let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle)
 					    "message/external-body")
 				     (progn
@@ -5149,9 +5153,10 @@
 					 (mm-extern-cache-contents handle))
 				       (mm-handle-cache handle))
 				   handle)))
-	   (charset (assq 'charset (cdr type))))
-      (when charset
-	(delq charset type)))))
+	   (param (assq 'charset (cdr type))))
+      (if param
+	  (setcdr param charset)
+	(setcdr type (cons (cons 'charset charset) (cdr type)))))))
 
 (defun gnus-mime-view-part-as-charset (&optional handle arg)
   "Insert the MIME part under point into the current buffer using the
@@ -5161,18 +5166,18 @@
   (let ((handle (or handle (get-text-property (point) 'gnus-data)))
 	(fun (get-text-property (point) 'gnus-callback))
 	(gnus-newsgroup-ignored-charsets 'gnus-all)
-	gnus-newsgroup-charset form preferred parts)
+	charset form preferred parts)
     (when handle
       (when (prog1
 		(and fun
-		     (setq gnus-newsgroup-charset
+		     (setq charset
 			   (or (cdr (assq
 				     arg
 				     gnus-summary-show-article-charset-alist))
 			       (mm-read-coding-system "Charset: "))))
 	      (if (mm-handle-undisplayer handle)
 		  (mm-remove-part handle)))
-	(gnus-mime-strip-charset-parameters handle)
+	(gnus-mime-set-charset-parameters handle charset)
 	(when (and (consp (setq form (cdr-safe fun)))
 		   (setq form (ignore-errors
 				(assq 'gnus-mime-display-alternative form)))
Index: gnus-group.el
diff -u gnus/lisp/gnus-group.el:7.115 gnus/lisp/gnus-group.el:7.116
--- gnus-group.el:7.115	Wed Jun 11 16:19:44 2008
+++ gnus-group.el	Fri Oct  3 06:21:54 2008
@@ -2925,7 +2925,10 @@
    (let ((entry (assoc (completing-read "Create group: " gnus-useful-groups
 					nil t)
 		       gnus-useful-groups)))
-     (list (cadr entry) (caddr entry))))
+     (list (cadr entry)
+	   ;; Don't use `caddr' here since macros within the `interactive'
+	   ;; form won't be expanded.
+	   (car (cddr entry)))))
   (setq method (gnus-copy-sequence method))
   (let (entry)
     (while (setq entry (memq (assq 'eval method) method))
Index: gnus-util.el
diff -u gnus/lisp/gnus-util.el:7.84 gnus/lisp/gnus-util.el:7.85
--- gnus-util.el:7.84	Sun Jul 27 02:26:58 2008
+++ gnus-util.el	Fri Oct  3 06:21:54 2008
@@ -57,6 +57,7 @@
 (autoload 'rmail-show-message "rmail")
 (autoload 'nnheader-narrow-to-headers "nnheader")
 (autoload 'nnheader-replace-chars-in-string "nnheader")
+(autoload 'mail-header-remove-comments "mail-parse")
 
 (eval-and-compile
   (cond
@@ -625,7 +626,7 @@
 (defun gnus-split-references (references)
   "Return a list of Message-IDs in REFERENCES."
   (let ((beg 0)
-	(references (or references ""))
+	(references (mail-header-remove-comments (or references "")))
 	ids)
     (while (string-match "<[^<]+[^< \t]" references beg)
       (push (substring references (match-beginning 0) (setq beg (match-end 0)))
@@ -652,8 +653,9 @@
 	  (while (nthcdr n ids)
 	    (setq ids (cdr ids)))
 	  (car ids))
-      (when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references)
-	(match-string 1 references)))))
+      (let ((references (mail-header-remove-comments references)))
+	(when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references)
+	  (match-string 1 references))))))
 
 (defun gnus-buffer-live-p (buffer)
   "Say whether BUFFER is alive or not."
Index: mm-util.el
diff -u gnus/lisp/mm-util.el:7.79 gnus/lisp/mm-util.el:7.80
--- mm-util.el:7.79	Fri Jul  4 02:09:29 2008
+++ mm-util.el	Fri Oct  3 06:21:54 2008
@@ -220,8 +220,8 @@
    (let ((completion-ignore-case t)
 	 (candidates (if (fboundp 'cp-supported-codepages)
 			 (cp-supported-codepages)
-		       ;; Removed in Emacs 23 (unicode), sosignal an error:
-		       (error "`codepage-setup' is obsolete in this Emacs version."))))
+		       ;; Removed in Emacs 23 (unicode), so signal an error:
+		       (error "`codepage-setup' not present in this Emacs version."))))
      (list (completing-read "Setup DOS Codepage: (default 437) " candidates
 			    nil t nil nil "437"))))
   (when alias
@@ -230,7 +230,9 @@
 		  (intern (format "windows-%s" number)))))
   (let* ((cp (intern (format "cp%s" number))))
     (unless (mm-coding-system-p cp)
-      (codepage-setup number))
+      (if (fboundp 'codepage-setup)	; silence compiler
+	  (codepage-setup number)
+	(error "`codepage-setup' not present in this Emacs version.")))
     (when (and alias
 	       ;; Don't add alias if setup of cp failed.
 	       (mm-coding-system-p cp))
Index: mml.el
diff -u gnus/lisp/mml.el:7.69 gnus/lisp/mml.el:7.70
--- mml.el:7.69	Wed Jun 11 16:19:45 2008
+++ mml.el	Fri Oct  3 06:21:54 2008
@@ -1102,13 +1102,13 @@
     ["PGG manual" (lambda () (interactive) (message-info mml2015-use))
      ;; XEmacs barfs on :visible.
      ,@(if (featurep 'xemacs) nil
-	 '(:visible (equal mml2015-use 'pgg)))
+	 '(:visible (and (boundp 'mml2015-use) (equal mml2015-use 'pgg))))
      ,@(if (featurep 'xemacs) '(t)
 	 '(:help "Display the PGG manual"))]
-    ["EasyPG manual" (lambda () (interactive) (message-info mml2015-use))
+    ["EasyPG manual" (lambda () (interactive) (require 'mml2015) (message-info mml2015-use))
      ;; XEmacs barfs on :visible.
      ,@(if (featurep 'xemacs) nil
-	 '(:visible (equal mml2015-use 'epg)))
+	 '(:visible (and (boundp 'mml2015-use) (equal mml2015-use 'epg))))
      ,@(if (featurep 'xemacs) '(t)
 	 '(:help "Display the EasyPG manual"))]))
 
Index: tls.el
diff -u gnus/lisp/tls.el:7.29 gnus/lisp/tls.el:7.30
--- tls.el:7.29	Sun Jul 27 02:26:58 2008
+++ tls.el	Fri Oct  3 06:21:54 2008
@@ -224,18 +224,20 @@
     (with-current-buffer buffer
       (message "Opening TLS connection to `%s'..." host)
       (while (and (not done) (setq cmd (pop cmds)))
-	(message "Opening TLS connection with `%s'..." cmd)
 	(let ((process-connection-type tls-process-connection-type)
+	      (formatted-cmd
+	       (format-spec
+		cmd
+		(format-spec-make
+		 ?h host
+		 ?p (if (integerp port)
+			(int-to-string port)
+		      port))))
 	      response)
+	  (message "Opening TLS connection with `%s'..." formatted-cmd)
 	  (setq process (start-process
 			 name buffer shell-file-name shell-command-switch
-			 (format-spec
-			  cmd
-			  (format-spec-make
-			   ?h host
-			   ?p (if (integerp port)
-				  (int-to-string port)
-				port)))))
+			 formatted-cmd))
 	  (while (and process
 		      (memq (process-status process) '(open run))
 		      (progn
@@ -244,7 +246,7 @@
 					 tls-success nil t)))))
 	    (unless (accept-process-output process 1)
 	      (sit-for 1)))
-	  (message "Opening TLS connection with `%s'...%s" cmd
+	  (message "Opening TLS connection with `%s'...%s" formatted-cmd
 		   (if done "done" "failed"))
 	  (if (not done)
 	      (delete-process process)