aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-12-17 21:41:34 +0000
committerMiles Bader2005-12-17 21:41:34 +0000
commit3031d8b0bb97f21c79b3022ff3e7564173facd18 (patch)
tree8326caa5ddefa2a97951766f00441456f134f230
parentabeb585559cb58e735127e487b9614bb680339e2 (diff)
downloademacs-3031d8b0bb97f21c79b3022ff3e7564173facd18.tar.gz
emacs-3031d8b0bb97f21c79b3022ff3e7564173facd18.zip
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.
-rw-r--r--lisp/gnus/ChangeLog63
-rw-r--r--lisp/gnus/gnus-agent.el11
-rw-r--r--lisp/gnus/gnus-art.el8
-rw-r--r--lisp/gnus/gnus-start.el17
-rw-r--r--lisp/gnus/gnus.el6
-rw-r--r--lisp/gnus/mm-bodies.el1
-rw-r--r--lisp/gnus/mm-decode.el18
-rw-r--r--lisp/gnus/rfc2047.el4
-rw-r--r--lisp/gnus/starttls.el48
-rw-r--r--lisp/net/tls.el24
-rw-r--r--man/ChangeLog10
-rw-r--r--man/emacs-mime.texi6
-rw-r--r--man/gnus.texi6
13 files changed, 157 insertions, 65 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c61de08c468..40adfc1d853 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,61 @@
12005-12-16 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-art.el (gnus-signature-separator): Fix custom type.
4
5 * mm-decode.el (mm-inlined-types): Fix custom type.
6 (mm-keep-viewer-alive-types): Ditto.
7 (mm-automatic-display): Ditto.
8 (mm-attachment-override-types): Ditto.
9 (mm-inline-override-types): Ditto.
10 (mm-automatic-external-display): Ditto.
11
122005-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
13
14 * gnus-art.el (gnus-buttonized-mime-types): Mention addition of
15 multipart/alternative and add xref to mm-discouraged-alternatives
16 in doc string.
17
18 * mm-decode.el (mm-discouraged-alternatives): Add xref to
19 gnus-buttonized-mime-types in doc string.
20
212005-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
22
23 * rfc2047.el (rfc2047-charset-to-coding-system): Recognize
24 us-ascii as a MIME charset.
25
26 * mm-bodies.el (mm-decode-content-transfer-encoding): Protect
27 against the case where the 2nd arg TYPE is nil.
28
292005-12-09 Reiner Steib <Reiner.Steib@gmx.de>
30
31 * gnus-start.el (gnus-no-server-1): Mention
32 `gnus-level-default-subscribed' in doc string.
33
342005-11-26 Dave Love <fx@gnu.org>
35
36 * tls.el (open-tls-stream): Rename arg SERVICE to PORT.
37 (tls-program, tls-success): Provide openssl alternative.
38
39 * starttls.el: Doc fixes.
40 (starttls-open-stream-gnutls, starttls-open-stream): Rename arg
41 SERVICE to PORT.
42
432005-12-09 Reiner Steib <Reiner.Steib@gmx.de>
44
45 * gnus-start.el (gnus-start-draft-setup): Enforce
46 `gnus-draft-mode' for nndraft:drafts at startup.
47
48 * gnus.el (gnus-splash): Change custom group.
49 (gnus-group-get-parameter, gnus-group-parameter-value): Describe
50 allow-list argument.
51
52 * gnus-agent.el (gnus-agent-article-alist-save-format): Format doc
53 string.
54
552005-12-09 ARISAWA Akihiro <ari@mbf.ocn.ne.jp> (tiny change)
56
57 * mm-decode.el (mm-display-external): Add lacked cdr.
58
12005-12-12 Richard M. Stallman <rms@gnu.org> 592005-12-12 Richard M. Stallman <rms@gnu.org>
2 60
3 * mm-url.el (mm-url-load-url): Require url-parse and url-vars. 61 * mm-url.el (mm-url-load-url): Require url-parse and url-vars.
@@ -106,11 +164,6 @@
106 as a buffer-local variable. This avoids creating truncated 164 as a buffer-local variable. This avoids creating truncated
107 dribble files as a result of a hang up, eg. 165 dribble files as a result of a hang up, eg.
108 166
1092005-10-30 Chong Yidong <cyd@stupidchicken.com>
110
111 * imap.el (imap-open): Handle case where buffer is a buffer
112 object.
113
1142005-11-30 Stefan Monnier <monnier@iro.umontreal.ca> 1672005-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
115 168
116 * gnus-delay.el (gnus-delay-group): Don't autoload. 169 * gnus-delay.el (gnus-delay-group): Don't autoload.
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 2139c485720..400dbe7c29f 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -214,11 +214,12 @@ unplugged."
214 :type 'boolean) 214 :type 'boolean)
215 215
216(defcustom gnus-agent-article-alist-save-format 1 216(defcustom gnus-agent-article-alist-save-format 1
217 "Indicates whether to use compression(2), verses no 217 "Indicates whether to use compression(2), versus no
218 compression(1), when writing agentview files. The compressed 218compression(1), when writing agentview files. The compressed
219 files do save space but load times are 6-7 times higher. A 219files do save space but load times are 6-7 times higher. A group
220 group must be opened then closed for the agentview to be 220must be opened then closed for the agentview to be updated using
221 updated using the new format." 221the new format."
222 ;; Wouldn't symbols instead numbers be nicer? --rsteib
222 :version "22.1" 223 :version "22.1"
223 :group 'gnus-agent 224 :group 'gnus-agent
224 :type '(radio (const :format "Compressed" 2) 225 :type '(radio (const :format "Compressed" 2)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index ef5796a6083..ad3c91f3579 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -225,7 +225,9 @@ only of boring text. Boring text is controlled by
225This can also be a list of regexps. In that case, it will be checked 225This can also be a list of regexps. In that case, it will be checked
226from head to tail looking for a separator. Searches will be done from 226from head to tail looking for a separator. Searches will be done from
227the end of the buffer." 227the end of the buffer."
228 :type '(repeat string) 228 :type '(choice :format "%{%t%}: %[Value Menu%]\n%v"
229 (regexp)
230 (repeat :tag "List of regexp" regexp))
229 :group 'gnus-article-signature) 231 :group 'gnus-article-signature)
230 232
231(defcustom gnus-signature-limit nil 233(defcustom gnus-signature-limit nil
@@ -822,7 +824,9 @@ This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
822 "List of MIME types that should be given buttons when rendered inline. 824 "List of MIME types that should be given buttons when rendered inline.
823If set, this variable overrides `gnus-unbuttonized-mime-types'. 825If set, this variable overrides `gnus-unbuttonized-mime-types'.
824To see e.g. security buttons you could set this to 826To see e.g. security buttons you could set this to
825`(\"multipart/signed\")'. 827`(\"multipart/signed\")'. You could also add \"multipart/alternative\" to
828this list to display radio buttons that allow you to choose one of two
829media types those mails include. See also `mm-discouraged-alternatives'.
826This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil." 830This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
827 :version "22.1" 831 :version "22.1"
828 :group 'gnus-article-mime 832 :group 'gnus-article-mime
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index d3b313c621f..53bcc4be15f 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -717,11 +717,12 @@ the first newsgroup."
717 717
718(defun gnus-no-server-1 (&optional arg slave) 718(defun gnus-no-server-1 (&optional arg slave)
719 "Read network news. 719 "Read network news.
720If ARG is a positive number, Gnus will use that as the 720If ARG is a positive number, Gnus will use that as the startup
721startup level. If ARG is nil, Gnus will be started at level 2. 721level. If ARG is nil, Gnus will be started at level 2
722If ARG is non-nil and not a positive number, Gnus will 722\(`gnus-level-default-subscribed' minus one). If ARG is non-nil
723prompt the user for the name of an NNTP server to use. 723and not a positive number, Gnus will prompt the user for the name
724As opposed to `gnus', this command will not connect to the local server." 724of an NNTP server to use. As opposed to \\[gnus], this command
725will not connect to the local server."
725 (interactive "P") 726 (interactive "P")
726 (let ((val (or arg (1- gnus-level-default-subscribed)))) 727 (let ((val (or arg (1- gnus-level-default-subscribed))))
727 (gnus val t slave) 728 (gnus val t slave)
@@ -805,8 +806,12 @@ prompt the user for the name of an NNTP server to use."
805 "Make sure the draft group exists." 806 "Make sure the draft group exists."
806 (gnus-request-create-group "drafts" '(nndraft "")) 807 (gnus-request-create-group "drafts" '(nndraft ""))
807 (unless (gnus-gethash "nndraft:drafts" gnus-newsrc-hashtb) 808 (unless (gnus-gethash "nndraft:drafts" gnus-newsrc-hashtb)
809 (gnus-message 3 "Subscribing drafts group")
808 (let ((gnus-level-default-subscribed 1)) 810 (let ((gnus-level-default-subscribed 1))
809 (gnus-subscribe-group "nndraft:drafts" nil '(nndraft ""))) 811 (gnus-subscribe-group "nndraft:drafts" nil '(nndraft ""))))
812 (unless (equal (gnus-group-get-parameter "nndraft:drafts" 'gnus-dummy t)
813 '((gnus-draft-mode)))
814 (gnus-message 3 "Setting up drafts group")
810 (gnus-group-set-parameter 815 (gnus-group-set-parameter
811 "nndraft:drafts" 'gnus-dummy '((gnus-draft-mode))))) 816 "nndraft:drafts" 'gnus-dummy '((gnus-draft-mode)))))
812 817
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 578fc49395c..20e41bde239 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -934,7 +934,7 @@ be set in `.emacs' instead."
934 (t 934 (t
935 ())) 935 ()))
936 "Face for the splash screen." 936 "Face for the splash screen."
937 :group 'gnus) 937 :group 'gnus-start)
938;; backward-compatibility alias 938;; backward-compatibility alias
939(put 'gnus-splash-face 'face-alias 'gnus-splash) 939(put 'gnus-splash-face 'face-alias 'gnus-splash)
940 940
@@ -3820,6 +3820,7 @@ If you call this function inside a loop, consider using the faster
3820(defun gnus-group-get-parameter (group &optional symbol allow-list) 3820(defun gnus-group-get-parameter (group &optional symbol allow-list)
3821 "Return the group parameters for GROUP. 3821 "Return the group parameters for GROUP.
3822If SYMBOL, return the value of that symbol in the group parameters. 3822If SYMBOL, return the value of that symbol in the group parameters.
3823If ALLOW-LIST, also allow list as a result.
3823Most functions should use `gnus-group-find-parameter', which 3824Most functions should use `gnus-group-find-parameter', which
3824also examines the topic parameters." 3825also examines the topic parameters."
3825 (let ((params (gnus-info-params (gnus-get-info group)))) 3826 (let ((params (gnus-info-params (gnus-get-info group))))
@@ -3829,7 +3830,8 @@ also examines the topic parameters."
3829 3830
3830(defun gnus-group-parameter-value (params symbol &optional 3831(defun gnus-group-parameter-value (params symbol &optional
3831 allow-list present-p) 3832 allow-list present-p)
3832 "Return the value of SYMBOL in group PARAMS." 3833 "Return the value of SYMBOL in group PARAMS.
3834If ALLOW-LIST, also allow list as a result."
3833 ;; We only wish to return group parameters (dotted lists) and 3835 ;; We only wish to return group parameters (dotted lists) and
3834 ;; not local variables, which may have the same names. 3836 ;; not local variables, which may have the same names.
3835 ;; But first we handle single elements... 3837 ;; But first we handle single elements...
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index e9f8f1e9391..8b47989e563 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -227,6 +227,7 @@ If TYPE is `text/plain' CRLF->LF translation may occur."
227 (message "Error while decoding: %s" error) 227 (message "Error while decoding: %s" error)
228 nil)) 228 nil))
229 (when (and 229 (when (and
230 type
230 (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc)) 231 (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc))
231 (string-match "\\`text/" type)) 232 (string-match "\\`text/" type))
232 (goto-char (point-min)) 233 (goto-char (point-min))
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 108c5056541..5b55af4d756 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -283,7 +283,7 @@ before the external MIME handler is invoked."
283 "List of media types that are to be displayed inline. 283 "List of media types that are to be displayed inline.
284See also `mm-inline-media-tests', which says how to display a media 284See also `mm-inline-media-tests', which says how to display a media
285type inline." 285type inline."
286 :type '(repeat string) 286 :type '(repeat regexp)
287 :group 'mime-display) 287 :group 'mime-display)
288 288
289(defcustom mm-keep-viewer-alive-types 289(defcustom mm-keep-viewer-alive-types
@@ -292,7 +292,7 @@ type inline."
292 "List of media types for which the external viewer will not be killed 292 "List of media types for which the external viewer will not be killed
293when selecting a different article." 293when selecting a different article."
294 :version "22.1" 294 :version "22.1"
295 :type '(repeat string) 295 :type '(repeat regexp)
296 :group 'mime-display) 296 :group 'mime-display)
297 297
298(defcustom mm-automatic-display 298(defcustom mm-automatic-display
@@ -304,7 +304,7 @@ when selecting a different article."
304 "application/pkcs7-signature" "application/x-pkcs7-mime" 304 "application/pkcs7-signature" "application/x-pkcs7-mime"
305 "application/pkcs7-mime") 305 "application/pkcs7-mime")
306 "A list of MIME types to be displayed automatically." 306 "A list of MIME types to be displayed automatically."
307 :type '(repeat string) 307 :type '(repeat regexp)
308 :group 'mime-display) 308 :group 'mime-display)
309 309
310(defcustom mm-attachment-override-types '("text/x-vcard" 310(defcustom mm-attachment-override-types '("text/x-vcard"
@@ -313,17 +313,17 @@ when selecting a different article."
313 "application/pkcs7-signature" 313 "application/pkcs7-signature"
314 "application/x-pkcs7-signature") 314 "application/x-pkcs7-signature")
315 "Types to have \"attachment\" ignored if they can be displayed inline." 315 "Types to have \"attachment\" ignored if they can be displayed inline."
316 :type '(repeat string) 316 :type '(repeat regexp)
317 :group 'mime-display) 317 :group 'mime-display)
318 318
319(defcustom mm-inline-override-types nil 319(defcustom mm-inline-override-types nil
320 "Types to be treated as attachments even if they can be displayed inline." 320 "Types to be treated as attachments even if they can be displayed inline."
321 :type '(repeat string) 321 :type '(repeat regexp)
322 :group 'mime-display) 322 :group 'mime-display)
323 323
324(defcustom mm-automatic-external-display nil 324(defcustom mm-automatic-external-display nil
325 "List of MIME type regexps that will be displayed externally automatically." 325 "List of MIME type regexps that will be displayed externally automatically."
326 :type '(repeat string) 326 :type '(repeat regexp)
327 :group 'mime-display) 327 :group 'mime-display)
328 328
329(defcustom mm-discouraged-alternatives nil 329(defcustom mm-discouraged-alternatives nil
@@ -338,7 +338,9 @@ to:
338 (\"text/html\" \"text/richtext\") 338 (\"text/html\" \"text/richtext\")
339 339
340Adding \"image/.*\" might also be useful. Spammers use it as the 340Adding \"image/.*\" might also be useful. Spammers use it as the
341prefered part of multipart/alternative messages." 341prefered part of multipart/alternative messages. See also
342`gnus-buttonized-mime-types', to which adding \"multipart/alternative\"
343enables you to choose manually one of two types those mails include."
342 :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'. 344 :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'.
343 :group 'mime-display) 345 :group 'mime-display)
344 346
@@ -769,7 +771,7 @@ external if displayed external."
769 ;; Use nametemplate (defined in RFC1524) if it is 771 ;; Use nametemplate (defined in RFC1524) if it is
770 ;; specified in mailcap. 772 ;; specified in mailcap.
771 (if (assoc "nametemplate" mime-info) 773 (if (assoc "nametemplate" mime-info)
772 (format (assoc "nametemplate" mime-info) file) 774 (format (cdr (assoc "nametemplate" mime-info)) file)
773 ;; Add a suffix according to `mailcap-mime-extensions'. 775 ;; Add a suffix according to `mailcap-mime-extensions'.
774 (concat file (car (rassoc (mm-handle-media-type handle) 776 (concat file (car (rassoc (mm-handle-media-type handle)
775 mailcap-mime-extensions)))))) 777 mailcap-mime-extensions))))))
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index d03a25c4564..5d2710d6bb6 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -831,11 +831,11 @@ If your Emacs implementation can't decode CHARSET, return nil."
831 (memq 'gnus-all mail-parse-ignored-charsets) 831 (memq 'gnus-all mail-parse-ignored-charsets)
832 (memq charset mail-parse-ignored-charsets)) 832 (memq charset mail-parse-ignored-charsets))
833 (setq charset mail-parse-charset)) 833 (setq charset mail-parse-charset))
834 (let ((cs (mm-coding-system-p (mm-charset-to-coding-system charset)))) 834 (let ((cs (mm-charset-to-coding-system charset)))
835 (cond ((eq cs 'ascii) 835 (cond ((eq cs 'ascii)
836 (setq cs (or (mm-charset-to-coding-system mail-parse-charset) 836 (setq cs (or (mm-charset-to-coding-system mail-parse-charset)
837 'raw-text))) 837 'raw-text)))
838 (cs) 838 ((setq cs (mm-coding-system-p cs)))
839 ((and charset 839 ((and charset
840 (listp mail-parse-ignored-charsets) 840 (listp mail-parse-ignored-charsets)
841 (memq 'gnus-unknown mail-parse-ignored-charsets)) 841 (memq 'gnus-unknown mail-parse-ignored-charsets))
diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el
index 67464395c76..c63e08fc12e 100644
--- a/lisp/gnus/starttls.el
+++ b/lisp/gnus/starttls.el
@@ -32,7 +32,7 @@
32;; [RFC 2595] "Using TLS with IMAP, POP3 and ACAP" 32;; [RFC 2595] "Using TLS with IMAP, POP3 and ACAP"
33;; by Chris Newman <chris.newman@innosoft.com> (1999/06) 33;; by Chris Newman <chris.newman@innosoft.com> (1999/06)
34 34
35;; This file now contain a combination of the two previous 35;; This file now contains a combination of the two previous
36;; implementations both called "starttls.el". The first one is Daiki 36;; implementations both called "starttls.el". The first one is Daiki
37;; Ueno's starttls.el which uses his own "starttls" command line tool, 37;; Ueno's starttls.el which uses his own "starttls" command line tool,
38;; and the second one is Simon Josefsson's starttls.el which uses 38;; and the second one is Simon Josefsson's starttls.el which uses
@@ -44,7 +44,7 @@
44;; both tools installed. It is recommended to use GNUTLS, though, as 44;; both tools installed. It is recommended to use GNUTLS, though, as
45;; it performs more verification of the certificates. 45;; it performs more verification of the certificates.
46 46
47;; The GNUTLS support require GNUTLS 0.9.90 (released 2003-10-08) or 47;; The GNUTLS support requires GNUTLS 0.9.90 (released 2003-10-08) or
48;; later, from <http://www.gnu.org/software/gnutls/>, or "starttls" 48;; later, from <http://www.gnu.org/software/gnutls/>, or "starttls"
49;; from <ftp://ftp.opaopa.org/pub/elisp/>. 49;; from <ftp://ftp.opaopa.org/pub/elisp/>.
50 50
@@ -58,7 +58,7 @@
58;; (message "STARTTLS output:\n%s" (starttls-negotiate tmp)) 58;; (message "STARTTLS output:\n%s" (starttls-negotiate tmp))
59;; (process-send-string tmp "EHLO foo\n")) 59;; (process-send-string tmp "EHLO foo\n"))
60 60
61;; An example run yield the following output: 61;; An example run yields the following output:
62;; 62;;
63;; 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] 63;; 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]
64;; 220 2.0.0 Ready to start TLS 64;; 220 2.0.0 Ready to start TLS
@@ -146,15 +146,14 @@ i.e. when `starttls-use-gnutls' is nil."
146 146
147(defcustom starttls-extra-args nil 147(defcustom starttls-extra-args nil
148 "Extra arguments to `starttls-program'. 148 "Extra arguments to `starttls-program'.
149This program is used when the `starttls' command is used, 149These apply when the `starttls' command is used, i.e. when
150i.e. when `starttls-use-gnutls' is nil." 150`starttls-use-gnutls' is nil."
151 :type '(repeat string) 151 :type '(repeat string)
152 :group 'starttls) 152 :group 'starttls)
153 153
154(defcustom starttls-extra-arguments nil 154(defcustom starttls-extra-arguments nil
155 "Extra arguments to `starttls-program'. 155 "Extra arguments to `starttls-program'.
156This program is used when GNUTLS is used, i.e. when 156These apply when GNUTLS is used, i.e. when `starttls-use-gnutls' is non-nil.
157`starttls-use-gnutls' is non-nil.
158 157
159For example, non-TLS compliant servers may require 158For example, non-TLS compliant servers may require
160'(\"--protocols\" \"ssl3\"). Invoke \"gnutls-cli --help\" to 159'(\"--protocols\" \"ssl3\"). Invoke \"gnutls-cli --help\" to
@@ -172,7 +171,7 @@ find out which parameters are available."
172(defcustom starttls-connect "- Simple Client Mode:\n\n" 171(defcustom starttls-connect "- Simple Client Mode:\n\n"
173 "*Regular expression indicating successful connection. 172 "*Regular expression indicating successful connection.
174The default is what GNUTLS's \"gnutls-cli\" outputs." 173The default is what GNUTLS's \"gnutls-cli\" outputs."
175 ;; GNUTLS cli.c:main() print this string when it is starting to run 174 ;; GNUTLS cli.c:main() prints this string when it is starting to run
176 ;; in the application read/write phase. If the logic, or the string 175 ;; in the application read/write phase. If the logic, or the string
177 ;; itself, is modified, this must be updated. 176 ;; itself, is modified, this must be updated.
178 :version "22.1" 177 :version "22.1"
@@ -182,7 +181,7 @@ The default is what GNUTLS's \"gnutls-cli\" outputs."
182(defcustom starttls-failure "\\*\\*\\* Handshake has failed" 181(defcustom starttls-failure "\\*\\*\\* Handshake has failed"
183 "*Regular expression indicating failed TLS handshake. 182 "*Regular expression indicating failed TLS handshake.
184The default is what GNUTLS's \"gnutls-cli\" outputs." 183The default is what GNUTLS's \"gnutls-cli\" outputs."
185 ;; GNUTLS cli.c:do_handshake() print this string on failure. If the 184 ;; GNUTLS cli.c:do_handshake() prints this string on failure. If the
186 ;; logic, or the string itself, is modified, this must be updated. 185 ;; logic, or the string itself, is modified, this must be updated.
187 :version "22.1" 186 :version "22.1"
188 :type 'regexp 187 :type 'regexp
@@ -200,10 +199,10 @@ The default is what GNUTLS's \"gnutls-cli\" outputs."
200 :group 'starttls) 199 :group 'starttls)
201 200
202(defun starttls-negotiate-gnutls (process) 201(defun starttls-negotiate-gnutls (process)
203 "Negotiate TLS on process opened by `open-starttls-stream'. 202 "Negotiate TLS on PROCESS opened by `open-starttls-stream'.
204This should typically only be done once. It typically return a 203This should typically only be done once. It typically returns a
205multi-line informational message with information about the 204multi-line informational message with information about the
206handshake, or NIL on failure." 205handshake, or nil on failure."
207 (let (buffer info old-max done-ok done-bad) 206 (let (buffer info old-max done-ok done-bad)
208 (if (null (setq buffer (process-buffer process))) 207 (if (null (setq buffer (process-buffer process)))
209 ;; XXX How to remove/extract the TLS negotiation junk? 208 ;; XXX How to remove/extract the TLS negotiation junk?
@@ -243,16 +242,16 @@ handshake, or NIL on failure."
243 (defalias 'starttls-set-process-query-on-exit-flag 242 (defalias 'starttls-set-process-query-on-exit-flag
244 'process-kill-without-query))) 243 'process-kill-without-query)))
245 244
246(defun starttls-open-stream-gnutls (name buffer host service) 245(defun starttls-open-stream-gnutls (name buffer host port)
247 (message "Opening STARTTLS connection to `%s'..." host) 246 (message "Opening STARTTLS connection to `%s'..." host)
248 (let* (done 247 (let* (done
249 (old-max (with-current-buffer buffer (point-max))) 248 (old-max (with-current-buffer buffer (point-max)))
250 (process-connection-type starttls-process-connection-type) 249 (process-connection-type starttls-process-connection-type)
251 (process (apply #'start-process name buffer 250 (process (apply #'start-process name buffer
252 starttls-gnutls-program "-s" host 251 starttls-gnutls-program "-s" host
253 "-p" (if (integerp service) 252 "-p" (if (integerp port)
254 (int-to-string service) 253 (int-to-string port)
255 service) 254 port)
256 starttls-extra-arguments))) 255 starttls-extra-arguments)))
257 (starttls-set-process-query-on-exit-flag process nil) 256 (starttls-set-process-query-on-exit-flag process nil)
258 (while (and (processp process) 257 (while (and (processp process)
@@ -273,11 +272,11 @@ handshake, or NIL on failure."
273 host (if done "done" "failed")) 272 host (if done "done" "failed"))
274 process)) 273 process))
275 274
276(defun starttls-open-stream (name buffer host service) 275(defun starttls-open-stream (name buffer host port)
277 "Open a TLS connection for a service to a host. 276 "Open a TLS connection for a port to a host.
278Returns a subprocess-object to represent the connection. 277Returns a subprocess object to represent the connection.
279Input and output work as for subprocesses; `delete-process' closes it. 278Input and output work as for subprocesses; `delete-process' closes it.
280Args are NAME BUFFER HOST SERVICE. 279Args are NAME BUFFER HOST PORT.
281NAME is name for process. It is modified if necessary to make it unique. 280NAME is name for process. It is modified if necessary to make it unique.
282BUFFER is the buffer (or `buffer-name') to associate with the process. 281BUFFER is the buffer (or `buffer-name') to associate with the process.
283 Process output goes at end of that buffer, unless you specify 282 Process output goes at end of that buffer, unless you specify
@@ -285,14 +284,15 @@ BUFFER is the buffer (or `buffer-name') to associate with the process.
285 BUFFER may be also nil, meaning that this process is not associated 284 BUFFER may be also nil, meaning that this process is not associated
286 with any buffer 285 with any buffer
287Third arg is name of the host to connect to, or its IP address. 286Third arg is name of the host to connect to, or its IP address.
288Fourth arg SERVICE is name of the service desired, or an integer 287Fourth arg PORT is an integer specifying a port to connect to.
289specifying a port number to connect to." 288If `starttls-use-gnutls' is nil, this may also be a service name, but
289GNUTLS requires a port number."
290 (if starttls-use-gnutls 290 (if starttls-use-gnutls
291 (starttls-open-stream-gnutls name buffer host service) 291 (starttls-open-stream-gnutls name buffer host port)
292 (let* ((process-connection-type starttls-process-connection-type) 292 (let* ((process-connection-type starttls-process-connection-type)
293 (process (apply #'start-process 293 (process (apply #'start-process
294 name buffer starttls-program 294 name buffer starttls-program
295 host (format "%s" service) 295 host (format "%s" port)
296 starttls-extra-args))) 296 starttls-extra-args)))
297 (starttls-set-process-query-on-exit-flag process nil) 297 (starttls-set-process-query-on-exit-flag process nil)
298 process))) 298 process)))
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index ceebe4b33d5..e46c98b6f6a 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -56,7 +56,8 @@
56 :group 'comm) 56 :group 'comm)
57 57
58(defcustom tls-program '("gnutls-cli -p %p %h" 58(defcustom tls-program '("gnutls-cli -p %p %h"
59 "gnutls-cli -p %p %h --protocols ssl3") 59 "gnutls-cli -p %p %h --protocols ssl3"
60 "openssl s_client -connect %h:%p -no_ssl2")
60 "List of strings containing commands to start TLS stream to a host. 61 "List of strings containing commands to start TLS stream to a host.
61Each entry in the list is tried until a connection is successful. 62Each entry in the list is tried until a connection is successful.
62%s is replaced with server hostname, %p with port to connect to. 63%s is replaced with server hostname, %p with port to connect to.
@@ -64,6 +65,7 @@ The program should read input on stdin and write output to
64stdout. Also see `tls-success' for what the program should output 65stdout. Also see `tls-success' for what the program should output
65after successful negotiation." 66after successful negotiation."
66 :type '(repeat string) 67 :type '(repeat string)
68 :version "22.1"
67 :group 'tls) 69 :group 'tls)
68 70
69(defcustom tls-process-connection-type nil 71(defcustom tls-process-connection-type nil
@@ -72,9 +74,10 @@ after successful negotiation."
72 :type 'boolean 74 :type 'boolean
73 :group 'tls) 75 :group 'tls)
74 76
75(defcustom tls-success "- Handshake was completed" 77(defcustom tls-success "- Handshake was completed\\|SSL handshake has read "
76 "*Regular expression indicating completed TLS handshakes. 78 "*Regular expression indicating completed TLS handshakes.
77The default is what GNUTLS's \"gnutls-cli\" outputs." 79The default is what GNUTLS's \"gnutls-cli\" or OpenSSL's
80\"openssl s_client\" outputs."
78 :version "22.1" 81 :version "22.1"
79 :type 'regexp 82 :type 'regexp
80 :group 'tls) 83 :group 'tls)
@@ -109,11 +112,11 @@ Used by `tls-certificate-information'."
109 (push (cons (match-string 1) (match-string 2)) vals)) 112 (push (cons (match-string 1) (match-string 2)) vals))
110 (nreverse vals)))))) 113 (nreverse vals))))))
111 114
112(defun open-tls-stream (name buffer host service) 115(defun open-tls-stream (name buffer host port)
113 "Open a TLS connection for a service to a host. 116 "Open a TLS connection for a port to a host.
114Returns a subprocess-object to represent the connection. 117Returns a subprocess-object to represent the connection.
115Input and output work as for subprocesses; `delete-process' closes it. 118Input and output work as for subprocesses; `delete-process' closes it.
116Args are NAME BUFFER HOST SERVICE. 119Args are NAME BUFFER HOST PORT.
117NAME is name for process. It is modified if necessary to make it unique. 120NAME is name for process. It is modified if necessary to make it unique.
118BUFFER is the buffer (or buffer-name) to associate with the process. 121BUFFER is the buffer (or buffer-name) to associate with the process.
119 Process output goes at end of that buffer, unless you specify 122 Process output goes at end of that buffer, unless you specify
@@ -121,8 +124,7 @@ BUFFER is the buffer (or buffer-name) to associate with the process.
121 BUFFER may be also nil, meaning that this process is not associated 124 BUFFER may be also nil, meaning that this process is not associated
122 with any buffer 125 with any buffer
123Third arg is name of the host to connect to, or its IP address. 126Third arg is name of the host to connect to, or its IP address.
124Fourth arg SERVICE is name of the service desired, or an integer 127Fourth arg PORT is an integer specifying a port to connect to."
125specifying a port number to connect to."
126 (let ((cmds tls-program) cmd done) 128 (let ((cmds tls-program) cmd done)
127 (message "Opening TLS connection to `%s'..." host) 129 (message "Opening TLS connection to `%s'..." host)
128 (while (and (not done) (setq cmd (pop cmds))) 130 (while (and (not done) (setq cmd (pop cmds)))
@@ -134,9 +136,9 @@ specifying a port number to connect to."
134 cmd 136 cmd
135 (format-spec-make 137 (format-spec-make
136 ?h host 138 ?h host
137 ?p (if (integerp service) 139 ?p (if (integerp port)
138 (int-to-string service) 140 (int-to-string port)
139 service))))) 141 port)))))
140 response) 142 response)
141 (while (and process 143 (while (and process
142 (memq (process-status process) '(open run)) 144 (memq (process-status process) '(open run))
diff --git a/man/ChangeLog b/man/ChangeLog
index a66ebf572b2..490b4f5420e 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,13 @@
12005-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus.texi (MIME Commands): Mention addition of
4 multipart/alternative to gnus-buttonized-mime-types and add xref
5 to mm-discouraged-alternatives.
6
7 * emacs-mime.texi (Display Customization): Mention addition of
8 "image/.*" and add xref to gnus-buttonized-mime-types in the
9 mm-discouraged-alternatives section.
10
12005-12-16 Carsten Dominik <dominik@science.uva.nl> 112005-12-16 Carsten Dominik <dominik@science.uva.nl>
2 12
3 * org.texi: (Tags): New section. 13 * org.texi: (Tags): New section.
diff --git a/man/emacs-mime.texi b/man/emacs-mime.texi
index 35dbe1e5797..d98fd4091bb 100644
--- a/man/emacs-mime.texi
+++ b/man/emacs-mime.texi
@@ -322,6 +322,12 @@ you could say something like:
322 (remove "text/html" mm-automatic-display)) 322 (remove "text/html" mm-automatic-display))
323@end lisp 323@end lisp
324 324
325Adding @code{"image/.*"} might also be useful. Spammers use it as the
326prefered part of @samp{multipart/alternative} messages. See also
327@code{gnus-buttonized-mime-types} (@pxref{MIME Commands, ,MIME Commands,
328gnus, Gnus Manual}), to which adding @code{"multipart/alternative"}
329enables you to choose manually one of two types those mails include.
330
325@item mm-inline-large-images 331@item mm-inline-large-images
326@vindex mm-inline-large-images 332@vindex mm-inline-large-images
327When displaying inline images that are larger than the window, Emacs 333When displaying inline images that are larger than the window, Emacs
diff --git a/man/gnus.texi b/man/gnus.texi
index 2ab494a835d..ad4343de5d3 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -9319,6 +9319,12 @@ To see e.g. security buttons but no other buttons, you could set this
9319variable to @code{("multipart/signed")} and leave 9319variable to @code{("multipart/signed")} and leave
9320@code{gnus-unbuttonized-mime-types} at the default value. 9320@code{gnus-unbuttonized-mime-types} at the default value.
9321 9321
9322You could also add @code{"multipart/alternative"} to this list to
9323display radio buttons that allow you to choose one of two media types
9324those mails include. See also @code{mm-discouraged-alternatives}
9325(@pxref{Display Customization, ,Display Customization, emacs-mime, The
9326Emacs MIME Manual}).
9327
9322@item gnus-inhibit-mime-unbuttonizing 9328@item gnus-inhibit-mime-unbuttonizing
9323@vindex gnus-inhibit-mime-unbuttonizing 9329@vindex gnus-inhibit-mime-unbuttonizing
9324If this is non-@code{nil}, then all @acronym{MIME} parts get buttons. The 9330If this is non-@code{nil}, then all @acronym{MIME} parts get buttons. The