changeset 67643:1c477099d3ac

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 169-173) - Merge from emacs--cvs-trunk--0 - Update from CVS 2005-12-16 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-art.el (gnus-signature-separator): Fix custom type. * lisp/gnus/mm-decode.el (mm-inlined-types): Fix custom type. (mm-keep-viewer-alive-types): Ditto. (mm-automatic-display): Ditto. (mm-attachment-override-types): Ditto. (mm-inline-override-types): Ditto. (mm-automatic-external-display): Ditto. 2005-12-12 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-art.el (gnus-buttonized-mime-types): Mention addition of multipart/alternative and add xref to mm-discouraged-alternatives in doc string. * lisp/gnus/mm-decode.el (mm-discouraged-alternatives): Add xref to gnus-buttonized-mime-types in doc string. 2005-12-12 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/rfc2047.el (rfc2047-charset-to-coding-system): Recognize us-ascii as a MIME charset. * lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding): Protect against the case where the 2nd arg TYPE is nil. 2005-12-09 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-start.el (gnus-no-server-1): Mention `gnus-level-default-subscribed' in doc string. 2005-11-26 Dave Love <fx@gnu.org> * lisp/gnus/tls.el (open-tls-stream): Rename arg SERVICE to PORT. (tls-program, tls-success): Provide openssl alternative. * lisp/gnus/starttls.el: Doc fixes. (starttls-open-stream-gnutls, starttls-open-stream): Rename arg SERVICE to PORT. 2005-12-09 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-start.el (gnus-start-draft-setup): Enforce `gnus-draft-mode' for nndraft:drafts at startup. * lisp/gnus/gnus.el (gnus-splash): Change custom group. (gnus-group-get-parameter, gnus-group-parameter-value): Describe allow-list argument. * lisp/gnus/gnus-agent.el (gnus-agent-article-alist-save-format): Format doc string. 2005-12-09 ARISAWA Akihiro <ari@mbf.ocn.ne.jp> (tiny change) * lisp/gnus/mm-decode.el (mm-display-external): Add lacked cdr. 2005-12-12 Katsumi Yamaoka <yamaoka@jpl.org> * man/gnus.texi (MIME Commands): Mention addition of multipart/alternative to gnus-buttonized-mime-types and add xref to mm-discouraged-alternatives. * man/emacs-mime.texi (Display Customization): Mention addition of "image/.*" and add xref to gnus-buttonized-mime-types in the mm-discouraged-alternatives section.
author Miles Bader <miles@gnu.org>
date Sat, 17 Dec 2005 21:41:34 +0000
parents b64b1fbcca2a
children 6c94a933add1 14a4eb789b45
files lisp/gnus/ChangeLog lisp/gnus/gnus-agent.el lisp/gnus/gnus-art.el lisp/gnus/gnus-start.el lisp/gnus/gnus.el lisp/gnus/mm-bodies.el lisp/gnus/mm-decode.el lisp/gnus/rfc2047.el lisp/gnus/starttls.el lisp/net/tls.el man/ChangeLog man/emacs-mime.texi man/gnus.texi
diffstat 13 files changed, 157 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/ChangeLog	Sat Dec 17 21:41:34 2005 +0000
@@ -1,3 +1,61 @@
+2005-12-16  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-signature-separator): Fix custom type.
+
+	* mm-decode.el (mm-inlined-types): Fix custom type.
+	(mm-keep-viewer-alive-types): Ditto.
+	(mm-automatic-display): Ditto.
+	(mm-attachment-override-types): Ditto.
+	(mm-inline-override-types): Ditto.
+	(mm-automatic-external-display): Ditto.
+
+2005-12-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-buttonized-mime-types): Mention addition of
+	multipart/alternative and add xref to mm-discouraged-alternatives
+	in doc string.
+
+	* mm-decode.el (mm-discouraged-alternatives): Add xref to
+	gnus-buttonized-mime-types in doc string.
+
+2005-12-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* rfc2047.el (rfc2047-charset-to-coding-system): Recognize
+	us-ascii as a MIME charset.
+
+	* mm-bodies.el (mm-decode-content-transfer-encoding): Protect
+	against the case where the 2nd arg TYPE is nil.
+
+2005-12-09  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-start.el (gnus-no-server-1): Mention
+	`gnus-level-default-subscribed' in doc string.
+
+2005-11-26  Dave Love  <fx@gnu.org>
+
+	* tls.el (open-tls-stream): Rename arg SERVICE to PORT.
+	(tls-program, tls-success): Provide openssl alternative.
+
+	* starttls.el: Doc fixes.
+	(starttls-open-stream-gnutls, starttls-open-stream): Rename arg
+	SERVICE to PORT.
+
+2005-12-09  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-start.el (gnus-start-draft-setup): Enforce
+	`gnus-draft-mode' for nndraft:drafts at startup.
+
+	* gnus.el (gnus-splash): Change custom group.
+	(gnus-group-get-parameter, gnus-group-parameter-value): Describe
+	allow-list argument.
+
+	* gnus-agent.el (gnus-agent-article-alist-save-format): Format doc
+	string.
+
+2005-12-09  ARISAWA Akihiro  <ari@mbf.ocn.ne.jp>  (tiny change)
+
+	* mm-decode.el (mm-display-external): Add lacked cdr.
+
 2005-12-12  Richard M. Stallman  <rms@gnu.org>
 
 	* mm-url.el (mm-url-load-url): Require url-parse and url-vars.
@@ -106,11 +164,6 @@
 	as a buffer-local variable.  This avoids creating truncated
 	dribble files as a result of a hang up, eg.
 
-2005-10-30  Chong Yidong  <cyd@stupidchicken.com>
-
-	* imap.el (imap-open): Handle case where buffer is a buffer
-	object.
-
 2005-11-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* gnus-delay.el (gnus-delay-group): Don't autoload.
--- a/lisp/gnus/gnus-agent.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/gnus-agent.el	Sat Dec 17 21:41:34 2005 +0000
@@ -214,11 +214,12 @@
   :type 'boolean)
 
 (defcustom gnus-agent-article-alist-save-format 1
-  "Indicates whether to use compression(2), verses no
-  compression(1), when writing agentview files.  The compressed
-  files do save space but load times are 6-7 times higher.  A
-  group must be opened then closed for the agentview to be
-  updated using the new format."
+  "Indicates whether to use compression(2), versus no
+compression(1), when writing agentview files.  The compressed
+files do save space but load times are 6-7 times higher.  A group
+must be opened then closed for the agentview to be updated using
+the new format."
+  ;; Wouldn't symbols instead numbers be nicer?  --rsteib
   :version "22.1"
   :group 'gnus-agent
   :type '(radio (const :format "Compressed" 2)
--- a/lisp/gnus/gnus-art.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Sat Dec 17 21:41:34 2005 +0000
@@ -225,7 +225,9 @@
 This can also be a list of regexps.  In that case, it will be checked
 from head to tail looking for a separator.  Searches will be done from
 the end of the buffer."
-  :type '(repeat string)
+  :type '(choice :format "%{%t%}: %[Value Menu%]\n%v"
+		 (regexp)
+		 (repeat :tag "List of regexp" regexp))
   :group 'gnus-article-signature)
 
 (defcustom gnus-signature-limit nil
@@ -822,7 +824,9 @@
   "List of MIME types that should be given buttons when rendered inline.
 If set, this variable overrides `gnus-unbuttonized-mime-types'.
 To see e.g. security buttons you could set this to
-`(\"multipart/signed\")'.
+`(\"multipart/signed\")'.  You could also add \"multipart/alternative\" to
+this list to display radio buttons that allow you to choose one of two
+media types those mails include.  See also `mm-discouraged-alternatives'.
 This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
   :version "22.1"
   :group 'gnus-article-mime
--- a/lisp/gnus/gnus-start.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/gnus-start.el	Sat Dec 17 21:41:34 2005 +0000
@@ -717,11 +717,12 @@
 
 (defun gnus-no-server-1 (&optional arg slave)
   "Read network news.
-If ARG is a positive number, Gnus will use that as the
-startup level.	If ARG is nil, Gnus will be started at level 2.
-If ARG is non-nil and not a positive number, Gnus will
-prompt the user for the name of an NNTP server to use.
-As opposed to `gnus', this command will not connect to the local server."
+If ARG is a positive number, Gnus will use that as the startup
+level.  If ARG is nil, Gnus will be started at level 2
+\(`gnus-level-default-subscribed' minus one).  If ARG is non-nil
+and not a positive number, Gnus will prompt the user for the name
+of an NNTP server to use.  As opposed to \\[gnus], this command
+will not connect to the local server."
   (interactive "P")
   (let ((val (or arg (1- gnus-level-default-subscribed))))
     (gnus val t slave)
@@ -805,8 +806,12 @@
   "Make sure the draft group exists."
   (gnus-request-create-group "drafts" '(nndraft ""))
   (unless (gnus-gethash "nndraft:drafts" gnus-newsrc-hashtb)
+    (gnus-message 3 "Subscribing drafts group")
     (let ((gnus-level-default-subscribed 1))
-      (gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))
+      (gnus-subscribe-group "nndraft:drafts" nil '(nndraft ""))))
+  (unless (equal (gnus-group-get-parameter "nndraft:drafts" 'gnus-dummy t)
+		 '((gnus-draft-mode)))
+    (gnus-message 3 "Setting up drafts group")
     (gnus-group-set-parameter
      "nndraft:drafts" 'gnus-dummy '((gnus-draft-mode)))))
 
--- a/lisp/gnus/gnus.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/gnus.el	Sat Dec 17 21:41:34 2005 +0000
@@ -934,7 +934,7 @@
     (t
      ()))
   "Face for the splash screen."
-  :group 'gnus)
+  :group 'gnus-start)
 ;; backward-compatibility alias
 (put 'gnus-splash-face 'face-alias 'gnus-splash)
 
@@ -3820,6 +3820,7 @@
 (defun gnus-group-get-parameter (group &optional symbol allow-list)
   "Return the group parameters for GROUP.
 If SYMBOL, return the value of that symbol in the group parameters.
+If ALLOW-LIST, also allow list as a result.
 Most functions should use `gnus-group-find-parameter', which
 also examines the topic parameters."
   (let ((params (gnus-info-params (gnus-get-info group))))
@@ -3829,7 +3830,8 @@
 
 (defun gnus-group-parameter-value (params symbol &optional
 					  allow-list present-p)
-  "Return the value of SYMBOL in group PARAMS."
+  "Return the value of SYMBOL in group PARAMS.
+If ALLOW-LIST, also allow list as a result."
   ;; We only wish to return group parameters (dotted lists) and
   ;; not local variables, which may have the same names.
   ;; But first we handle single elements...
--- a/lisp/gnus/mm-bodies.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/mm-bodies.el	Sat Dec 17 21:41:34 2005 +0000
@@ -227,6 +227,7 @@
 	 (message "Error while decoding: %s" error)
 	 nil))
     (when (and
+	   type
 	   (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc))
 	   (string-match "\\`text/" type))
       (goto-char (point-min))
--- a/lisp/gnus/mm-decode.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/mm-decode.el	Sat Dec 17 21:41:34 2005 +0000
@@ -283,7 +283,7 @@
   "List of media types that are to be displayed inline.
 See also `mm-inline-media-tests', which says how to display a media
 type inline."
-  :type '(repeat string)
+  :type '(repeat regexp)
   :group 'mime-display)
 
 (defcustom mm-keep-viewer-alive-types
@@ -292,7 +292,7 @@
   "List of media types for which the external viewer will not be killed
 when selecting a different article."
   :version "22.1"
-  :type '(repeat string)
+  :type '(repeat regexp)
   :group 'mime-display)
 
 (defcustom mm-automatic-display
@@ -304,7 +304,7 @@
     "application/pkcs7-signature" "application/x-pkcs7-mime"
     "application/pkcs7-mime")
   "A list of MIME types to be displayed automatically."
-  :type '(repeat string)
+  :type '(repeat regexp)
   :group 'mime-display)
 
 (defcustom mm-attachment-override-types '("text/x-vcard"
@@ -313,17 +313,17 @@
 					  "application/pkcs7-signature"
 					  "application/x-pkcs7-signature")
   "Types to have \"attachment\" ignored if they can be displayed inline."
-  :type '(repeat string)
+  :type '(repeat regexp)
   :group 'mime-display)
 
 (defcustom mm-inline-override-types nil
   "Types to be treated as attachments even if they can be displayed inline."
-  :type '(repeat string)
+  :type '(repeat regexp)
   :group 'mime-display)
 
 (defcustom mm-automatic-external-display nil
   "List of MIME type regexps that will be displayed externally automatically."
-  :type '(repeat string)
+  :type '(repeat regexp)
   :group 'mime-display)
 
 (defcustom mm-discouraged-alternatives nil
@@ -338,7 +338,9 @@
  (\"text/html\" \"text/richtext\")
 
 Adding \"image/.*\" might also be useful.  Spammers use it as the
-prefered part of multipart/alternative messages."
+prefered part of multipart/alternative messages.  See also
+`gnus-buttonized-mime-types', to which adding \"multipart/alternative\"
+enables you to choose manually one of two types those mails include."
   :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'.
   :group 'mime-display)
 
@@ -769,7 +771,7 @@
 		   ;; Use nametemplate (defined in RFC1524) if it is
 		   ;; specified in mailcap.
 		   (if (assoc "nametemplate" mime-info)
-		       (format (assoc "nametemplate" mime-info) file)
+		       (format (cdr (assoc "nametemplate" mime-info)) file)
 		     ;; Add a suffix according to `mailcap-mime-extensions'.
 		     (concat file (car (rassoc (mm-handle-media-type handle)
 					       mailcap-mime-extensions))))))
--- a/lisp/gnus/rfc2047.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/rfc2047.el	Sat Dec 17 21:41:34 2005 +0000
@@ -831,11 +831,11 @@
 	    (memq 'gnus-all mail-parse-ignored-charsets)
 	    (memq charset mail-parse-ignored-charsets))
     (setq charset mail-parse-charset))
-  (let ((cs (mm-coding-system-p (mm-charset-to-coding-system charset))))
+  (let ((cs (mm-charset-to-coding-system charset)))
     (cond ((eq cs 'ascii)
 	   (setq cs (or (mm-charset-to-coding-system mail-parse-charset)
 			'raw-text)))
-	  (cs)
+	  ((setq cs (mm-coding-system-p cs)))
 	  ((and charset
 		(listp mail-parse-ignored-charsets)
 		(memq 'gnus-unknown mail-parse-ignored-charsets))
--- a/lisp/gnus/starttls.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/gnus/starttls.el	Sat Dec 17 21:41:34 2005 +0000
@@ -32,7 +32,7 @@
 ;; [RFC 2595] "Using TLS with IMAP, POP3 and ACAP"
 ;;	by Chris Newman <chris.newman@innosoft.com> (1999/06)
 
-;; This file now contain a combination of the two previous
+;; This file now contains a combination of the two previous
 ;; implementations both called "starttls.el".  The first one is Daiki
 ;; Ueno's starttls.el which uses his own "starttls" command line tool,
 ;; and the second one is Simon Josefsson's starttls.el which uses
@@ -44,7 +44,7 @@
 ;; both tools installed.  It is recommended to use GNUTLS, though, as
 ;; it performs more verification of the certificates.
 
-;; The GNUTLS support require GNUTLS 0.9.90 (released 2003-10-08) or
+;; The GNUTLS support requires GNUTLS 0.9.90 (released 2003-10-08) or
 ;; later, from <http://www.gnu.org/software/gnutls/>, or "starttls"
 ;; from <ftp://ftp.opaopa.org/pub/elisp/>.
 
@@ -58,7 +58,7 @@
 ;;   (message "STARTTLS output:\n%s" (starttls-negotiate tmp))
 ;;   (process-send-string tmp "EHLO foo\n"))
 
-;; An example run yield the following output:
+;; An example run yields the following output:
 ;;
 ;; 220 yxa.extundo.com ESMTP Sendmail 8.12.11/8.12.11/Debian-3; Wed, 26 May 2004 19:12:29 +0200; (No UCE/UBE) logging access from: c494102a.s-bi.bostream.se(OK)-c494102a.s-bi.bostream.se [217.215.27.65]
 ;; 220 2.0.0 Ready to start TLS
@@ -146,15 +146,14 @@
 
 (defcustom starttls-extra-args nil
   "Extra arguments to `starttls-program'.
-This program is used when the `starttls' command is used,
-i.e. when `starttls-use-gnutls' is nil."
+These apply when the `starttls' command is used, i.e. when
+`starttls-use-gnutls' is nil."
   :type '(repeat string)
   :group 'starttls)
 
 (defcustom starttls-extra-arguments nil
   "Extra arguments to `starttls-program'.
-This program is used when GNUTLS is used, i.e. when
-`starttls-use-gnutls' is non-nil.
+These apply when GNUTLS is used, i.e. when `starttls-use-gnutls' is non-nil.
 
 For example, non-TLS compliant servers may require
 '(\"--protocols\" \"ssl3\").  Invoke \"gnutls-cli --help\" to
@@ -172,7 +171,7 @@
 (defcustom starttls-connect "- Simple Client Mode:\n\n"
   "*Regular expression indicating successful connection.
 The default is what GNUTLS's \"gnutls-cli\" outputs."
-  ;; GNUTLS cli.c:main() print this string when it is starting to run
+  ;; GNUTLS cli.c:main() prints this string when it is starting to run
   ;; in the application read/write phase.  If the logic, or the string
   ;; itself, is modified, this must be updated.
   :version "22.1"
@@ -182,7 +181,7 @@
 (defcustom starttls-failure "\\*\\*\\* Handshake has failed"
   "*Regular expression indicating failed TLS handshake.
 The default is what GNUTLS's \"gnutls-cli\" outputs."
-  ;; GNUTLS cli.c:do_handshake() print this string on failure.  If the
+  ;; GNUTLS cli.c:do_handshake() prints this string on failure.  If the
   ;; logic, or the string itself, is modified, this must be updated.
   :version "22.1"
   :type 'regexp
@@ -200,10 +199,10 @@
   :group 'starttls)
 
 (defun starttls-negotiate-gnutls (process)
-  "Negotiate TLS on process opened by `open-starttls-stream'.
-This should typically only be done once.  It typically return a
+  "Negotiate TLS on PROCESS opened by `open-starttls-stream'.
+This should typically only be done once.  It typically returns a
 multi-line informational message with information about the
-handshake, or NIL on failure."
+handshake, or nil on failure."
   (let (buffer info old-max done-ok done-bad)
     (if (null (setq buffer (process-buffer process)))
 	;; XXX How to remove/extract the TLS negotiation junk?
@@ -243,16 +242,16 @@
     (defalias 'starttls-set-process-query-on-exit-flag
       'process-kill-without-query)))
 
-(defun starttls-open-stream-gnutls (name buffer host service)
+(defun starttls-open-stream-gnutls (name buffer host port)
   (message "Opening STARTTLS connection to `%s'..." host)
   (let* (done
 	 (old-max (with-current-buffer buffer (point-max)))
 	 (process-connection-type starttls-process-connection-type)
 	 (process (apply #'start-process name buffer
 			 starttls-gnutls-program "-s" host
-			 "-p" (if (integerp service)
-				  (int-to-string service)
-				service)
+			 "-p" (if (integerp port)
+				  (int-to-string port)
+				port)
 			 starttls-extra-arguments)))
     (starttls-set-process-query-on-exit-flag process nil)
     (while (and (processp process)
@@ -273,11 +272,11 @@
 	     host (if done "done" "failed"))
     process))
 
-(defun starttls-open-stream (name buffer host service)
-  "Open a TLS connection for a service to a host.
-Returns a subprocess-object to represent the connection.
+(defun starttls-open-stream (name buffer host port)
+  "Open a TLS connection for a port to a host.
+Returns a subprocess object to represent the connection.
 Input and output work as for subprocesses; `delete-process' closes it.
-Args are NAME BUFFER HOST SERVICE.
+Args are NAME BUFFER HOST PORT.
 NAME is name for process.  It is modified if necessary to make it unique.
 BUFFER is the buffer (or `buffer-name') to associate with the process.
  Process output goes at end of that buffer, unless you specify
@@ -285,14 +284,15 @@
  BUFFER may be also nil, meaning that this process is not associated
  with any buffer
 Third arg is name of the host to connect to, or its IP address.
-Fourth arg SERVICE is name of the service desired, or an integer
-specifying a port number to connect to."
+Fourth arg PORT is an integer specifying a port to connect to.
+If `starttls-use-gnutls' is nil, this may also be a service name, but
+GNUTLS requires a port number."
   (if starttls-use-gnutls
-      (starttls-open-stream-gnutls name buffer host service)
+      (starttls-open-stream-gnutls name buffer host port)
     (let* ((process-connection-type starttls-process-connection-type)
 	   (process (apply #'start-process
 			   name buffer starttls-program
-			   host (format "%s" service)
+			   host (format "%s" port)
 			   starttls-extra-args)))
       (starttls-set-process-query-on-exit-flag process nil)
       process)))
--- a/lisp/net/tls.el	Sat Dec 17 17:29:36 2005 +0000
+++ b/lisp/net/tls.el	Sat Dec 17 21:41:34 2005 +0000
@@ -56,7 +56,8 @@
   :group 'comm)
 
 (defcustom tls-program '("gnutls-cli -p %p %h"
-			 "gnutls-cli -p %p %h --protocols ssl3")
+			 "gnutls-cli -p %p %h --protocols ssl3"
+			 "openssl s_client -connect %h:%p -no_ssl2")
   "List of strings containing commands to start TLS stream to a host.
 Each entry in the list is tried until a connection is successful.
 %s is replaced with server hostname, %p with port to connect to.
@@ -64,6 +65,7 @@
 stdout.  Also see `tls-success' for what the program should output
 after successful negotiation."
   :type '(repeat string)
+  :version "22.1"
   :group 'tls)
 
 (defcustom tls-process-connection-type nil
@@ -72,9 +74,10 @@
   :type 'boolean
   :group 'tls)
 
-(defcustom tls-success "- Handshake was completed"
+(defcustom tls-success "- Handshake was completed\\|SSL handshake has read "
   "*Regular expression indicating completed TLS handshakes.
-The default is what GNUTLS's \"gnutls-cli\" outputs."
+The default is what GNUTLS's \"gnutls-cli\" or OpenSSL's
+\"openssl s_client\" outputs."
   :version "22.1"
   :type 'regexp
   :group 'tls)
@@ -109,11 +112,11 @@
 	    (push (cons (match-string 1) (match-string 2)) vals))
 	  (nreverse vals))))))
 
-(defun open-tls-stream (name buffer host service)
-  "Open a TLS connection for a service to a host.
+(defun open-tls-stream (name buffer host port)
+  "Open a TLS connection for a port to a host.
 Returns a subprocess-object to represent the connection.
 Input and output work as for subprocesses; `delete-process' closes it.
-Args are NAME BUFFER HOST SERVICE.
+Args are NAME BUFFER HOST PORT.
 NAME is name for process.  It is modified if necessary to make it unique.
 BUFFER is the buffer (or buffer-name) to associate with the process.
  Process output goes at end of that buffer, unless you specify
@@ -121,8 +124,7 @@
  BUFFER may be also nil, meaning that this process is not associated
  with any buffer
 Third arg is name of the host to connect to, or its IP address.
-Fourth arg SERVICE is name of the service desired, or an integer
-specifying a port number to connect to."
+Fourth arg PORT is an integer specifying a port to connect to."
   (let ((cmds tls-program) cmd done)
     (message "Opening TLS connection to `%s'..." host)
     (while (and (not done) (setq cmd (pop cmds)))
@@ -134,9 +136,9 @@
 			cmd
 			(format-spec-make
 			 ?h host
-			 ?p (if (integerp service)
-				(int-to-string service)
-			      service)))))
+			 ?p (if (integerp port)
+				(int-to-string port)
+			      port)))))
 	     response)
 	(while (and process
 		    (memq (process-status process) '(open run))
--- a/man/ChangeLog	Sat Dec 17 17:29:36 2005 +0000
+++ b/man/ChangeLog	Sat Dec 17 21:41:34 2005 +0000
@@ -1,3 +1,13 @@
+2005-12-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus.texi (MIME Commands): Mention addition of
+	multipart/alternative to gnus-buttonized-mime-types and add xref
+	to mm-discouraged-alternatives.
+
+	* emacs-mime.texi (Display Customization): Mention addition of
+	"image/.*" and add xref to gnus-buttonized-mime-types in the
+	mm-discouraged-alternatives section.
+
 2005-12-16  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org.texi: (Tags): New section.
--- a/man/emacs-mime.texi	Sat Dec 17 17:29:36 2005 +0000
+++ b/man/emacs-mime.texi	Sat Dec 17 21:41:34 2005 +0000
@@ -322,6 +322,12 @@
       (remove "text/html" mm-automatic-display))
 @end lisp
 
+Adding @code{"image/.*"} might also be useful.  Spammers use it as the
+prefered part of @samp{multipart/alternative} messages.  See also
+@code{gnus-buttonized-mime-types} (@pxref{MIME Commands, ,MIME Commands,
+gnus, Gnus Manual}), to which adding @code{"multipart/alternative"}
+enables you to choose manually one of two types those mails include.
+
 @item mm-inline-large-images
 @vindex mm-inline-large-images
 When displaying inline images that are larger than the window, Emacs
--- a/man/gnus.texi	Sat Dec 17 17:29:36 2005 +0000
+++ b/man/gnus.texi	Sat Dec 17 21:41:34 2005 +0000
@@ -9319,6 +9319,12 @@
 variable to @code{("multipart/signed")} and leave
 @code{gnus-unbuttonized-mime-types} at the default value.
 
+You could also add @code{"multipart/alternative"} to this list to
+display radio buttons that allow you to choose one of two media types
+those mails include.  See also @code{mm-discouraged-alternatives}
+(@pxref{Display Customization, ,Display Customization, emacs-mime, The
+Emacs MIME Manual}).
+
 @item gnus-inhibit-mime-unbuttonizing
 @vindex gnus-inhibit-mime-unbuttonizing
 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The