diff options
| author | Miles Bader | 2007-12-06 00:21:00 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-12-06 00:21:00 +0000 |
| commit | b890d447fb56bfe9f2e4742eda4b3ab4b5f4b32a (patch) | |
| tree | b97d8b30984a8884b61d54b056a4aabf852ecbbe | |
| parent | f6e7ec024870e8ccaaed5bc2e0d92fde7554e16b (diff) | |
| download | emacs-b890d447fb56bfe9f2e4742eda4b3ab4b5f4b32a.tar.gz emacs-b890d447fb56bfe9f2e4742eda4b3ab4b5f4b32a.zip | |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-941
| -rw-r--r-- | doc/misc/ChangeLog | 24 | ||||
| -rw-r--r-- | doc/misc/emacs-mime.texi | 15 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 19 | ||||
| -rw-r--r-- | lisp/ChangeLog | 34 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 158 | ||||
| -rw-r--r-- | lisp/gnus/gnus-agent.el | 18 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 105 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cache.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-dired.el | 99 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 18 | ||||
| -rw-r--r-- | lisp/gnus/gnus-int.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-kill.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/gnus-move.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-srvr.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-start.el | 29 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/gnus-uu.el | 46 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 27 | ||||
| -rw-r--r-- | lisp/gnus/mail-source.el | 9 | ||||
| -rw-r--r-- | lisp/gnus/mailcap.el | 27 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 16 | ||||
| -rw-r--r-- | lisp/gnus/mm-uu.el | 9 | ||||
| -rw-r--r-- | lisp/gnus/nnkiboze.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 26 | ||||
| -rw-r--r-- | lisp/gnus/rfc2047.el | 66 | ||||
| -rw-r--r-- | lisp/gnus/yenc.el | 19 | ||||
| -rw-r--r-- | lisp/net/imap.el | 11 | ||||
| -rw-r--r-- | lisp/net/tls.el | 123 |
29 files changed, 712 insertions, 212 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 02e39fe8171..61fd28a0622 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2007-12-03 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus.texi (Other Files): Add the yenc command. | ||
| 4 | |||
| 5 | 2007-11-30 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 6 | |||
| 7 | * gnus.texi (MIME Commands): Default of gnus-article-loose-mime is t | ||
| 8 | since 2004-08-06. | ||
| 9 | |||
| 10 | 2007-11-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 11 | |||
| 12 | * gnus.texi (Fancy Mail Splitting): Fix description of splitting based | ||
| 13 | on body. | ||
| 14 | |||
| 15 | 2007-11-27 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 16 | |||
| 17 | * emacs-mime.texi (rfc2047): Mention rfc2047-encoded-word-regexp-loose | ||
| 18 | and rfc2047-allow-irregular-q-encoded-words; fix description of | ||
| 19 | rfc2047-encode-encoded-words. | ||
| 20 | |||
| 21 | 2007-11-24 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 22 | |||
| 23 | * gnus.texi (Fetching Mail): Remove obsoleted `nnmail-spool-file'. | ||
| 24 | |||
| 1 | 2007-12-05 Michael Olson <mwolson@gnu.org> | 25 | 2007-12-05 Michael Olson <mwolson@gnu.org> |
| 2 | 26 | ||
| 3 | * remember.texi (Diary): Remove "require" line for remember-diary.el. | 27 | * remember.texi (Diary): Remove "require" line for remember-diary.el. |
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index d4cbf8380b6..f8be71ef860 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi | |||
| @@ -1417,10 +1417,23 @@ This is an alist of encoding / function pairs. The encodings are | |||
| 1417 | @vindex rfc2047-encoded-word-regexp | 1417 | @vindex rfc2047-encoded-word-regexp |
| 1418 | When decoding words, this library looks for matches to this regexp. | 1418 | When decoding words, this library looks for matches to this regexp. |
| 1419 | 1419 | ||
| 1420 | @item rfc2047-encoded-word-regexp-loose | ||
| 1421 | @vindex rfc2047-encoded-word-regexp-loose | ||
| 1422 | This is a version from which the regexp for the Q encoding pattern of | ||
| 1423 | @code{rfc2047-encoded-word-regexp} is made loose. | ||
| 1424 | |||
| 1420 | @item rfc2047-encode-encoded-words | 1425 | @item rfc2047-encode-encoded-words |
| 1421 | @vindex rfc2047-encode-encoded-words | 1426 | @vindex rfc2047-encode-encoded-words |
| 1422 | The boolean variable specifies whether encoded words | 1427 | The boolean variable specifies whether encoded words |
| 1423 | (e.g. @samp{=?hello?=}) should be encoded again. | 1428 | (e.g. @samp{=?us-ascii?q?hello?=}) should be encoded again. |
| 1429 | @code{rfc2047-encoded-word-regexp} is used to look for such words. | ||
| 1430 | |||
| 1431 | @item rfc2047-allow-irregular-q-encoded-words | ||
| 1432 | @vindex rfc2047-allow-irregular-q-encoded-words | ||
| 1433 | The boolean variable specifies whether irregular Q encoded words | ||
| 1434 | (e.g. @samp{=?us-ascii?q?hello??=}) should be decoded. If it is | ||
| 1435 | non-@code{nil}, @code{rfc2047-encoded-word-regexp-loose} is used instead | ||
| 1436 | of @code{rfc2047-encoded-word-regexp} to look for encoded words. | ||
| 1424 | 1437 | ||
| 1425 | @end table | 1438 | @end table |
| 1426 | 1439 | ||
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 97e70c1cec2..10e7741f8d2 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -8175,6 +8175,11 @@ Save the current series | |||
| 8175 | @findex gnus-uu-decode-binhex | 8175 | @findex gnus-uu-decode-binhex |
| 8176 | Unbinhex the current series (@code{gnus-uu-decode-binhex}). This | 8176 | Unbinhex the current series (@code{gnus-uu-decode-binhex}). This |
| 8177 | doesn't really work yet. | 8177 | doesn't really work yet. |
| 8178 | |||
| 8179 | @item X Y | ||
| 8180 | @kindex X Y (Summary) | ||
| 8181 | @findex gnus-uu-decode-yenc | ||
| 8182 | yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}). | ||
| 8178 | @end table | 8183 | @end table |
| 8179 | 8184 | ||
| 8180 | 8185 | ||
| @@ -9740,7 +9745,7 @@ To have all Vcards be ignored, you'd say something like this: | |||
| 9740 | If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header | 9745 | If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header |
| 9741 | before interpreting the message as a @acronym{MIME} message. This helps | 9746 | before interpreting the message as a @acronym{MIME} message. This helps |
| 9742 | when reading messages from certain broken mail user agents. The | 9747 | when reading messages from certain broken mail user agents. The |
| 9743 | default is @code{nil}. | 9748 | default is @code{t}. |
| 9744 | 9749 | ||
| 9745 | @item gnus-article-emulate-mime | 9750 | @item gnus-article-emulate-mime |
| 9746 | @vindex gnus-article-emulate-mime | 9751 | @vindex gnus-article-emulate-mime |
| @@ -14649,14 +14654,12 @@ If non-@code{nil}, name of program for fetching new mail. If | |||
| 14649 | @subsubsection Fetching Mail | 14654 | @subsubsection Fetching Mail |
| 14650 | 14655 | ||
| 14651 | @vindex mail-sources | 14656 | @vindex mail-sources |
| 14652 | @vindex nnmail-spool-file | ||
| 14653 | The way to actually tell Gnus where to get new mail from is to set | 14657 | The way to actually tell Gnus where to get new mail from is to set |
| 14654 | @code{mail-sources} to a list of mail source specifiers | 14658 | @code{mail-sources} to a list of mail source specifiers |
| 14655 | (@pxref{Mail Source Specifiers}). | 14659 | (@pxref{Mail Source Specifiers}). |
| 14656 | 14660 | ||
| 14657 | If this variable (and the obsolescent @code{nnmail-spool-file}) is | 14661 | If this variable is @code{nil}, the mail back ends will never attempt to |
| 14658 | @code{nil}, the mail back ends will never attempt to fetch mail by | 14662 | fetch mail by themselves. |
| 14659 | themselves. | ||
| 14660 | 14663 | ||
| 14661 | If you want to fetch mail both from your local spool as well as a | 14664 | If you want to fetch mail both from your local spool as well as a |
| 14662 | @acronym{POP} mail server, you'd say something like: | 14665 | @acronym{POP} mail server, you'd say something like: |
| @@ -14865,9 +14868,9 @@ body of the messages: | |||
| 14865 | "string.group")))) | 14868 | "string.group")))) |
| 14866 | @end lisp | 14869 | @end lisp |
| 14867 | 14870 | ||
| 14868 | The buffer is narrowed to the message in question when @var{function} | 14871 | The buffer is narrowed to the header of the message in question when |
| 14869 | is run. That's why @code{(widen)} needs to be called after | 14872 | @var{function} is run. That's why @code{(widen)} needs to be called |
| 14870 | @code{save-excursion} and @code{save-restriction} in the example | 14873 | after @code{save-excursion} and @code{save-restriction} in the example |
| 14871 | above. Also note that with the nnimap back end, message bodies will | 14874 | above. Also note that with the nnimap back end, message bodies will |
| 14872 | not be downloaded by default. You need to set | 14875 | not be downloaded by default. You need to set |
| 14873 | @code{nnimap-split-download-body} to @code{t} to do that | 14876 | @code{nnimap-split-download-body} to @code{t} to do that |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 733fba10ebe..1bcc372a619 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,37 @@ | |||
| 1 | 2007-12-05 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * net/tls.el (tls-hostmismatch, open-tls-stream): Checkdoc cleanup. | ||
| 4 | |||
| 5 | 2007-12-05 Elias Oltmanns <eo@nebensachen.de> | ||
| 6 | |||
| 7 | * net/tls.el (open-tls-stream): Actually consult tls-checktrust to | ||
| 8 | see if certs should be verified and what is to be done in the | ||
| 9 | event of a verification failure. | ||
| 10 | |||
| 11 | 2007-12-05 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 12 | |||
| 13 | * net/tls.el (tls-program): Provide more custom choices from | ||
| 14 | `tls-checktrust'. Refer to `tls-checktrust' in doc string. | ||
| 15 | (tls-process-connection-type, tls-success): Remove "*" in doc string. | ||
| 16 | (tls-checktrust, tls-hostmismatch, tls-untrusted): Add custom | ||
| 17 | version. Minor improvement to doc strings. | ||
| 18 | (tls-program): Add comment. | ||
| 19 | |||
| 20 | 2007-12-05 Elias Oltmanns <eo@nebensachen.de> | ||
| 21 | |||
| 22 | * net/tls.el (tls-certtool-program, tls-hostmismatch): New variables. | ||
| 23 | (tls-checktrust): New variable. Check if GNU TLS complained about a | ||
| 24 | mismatch between the hostname provided in the certificate and the name | ||
| 25 | of the host connnecting to. | ||
| 26 | (open-tls-stream): Use them. Check certificates against trusted root | ||
| 27 | certificates. | ||
| 28 | |||
| 29 | 2007-12-05 Nathan J. Williams <nathanw@MIT.EDU> (tiny change) | ||
| 30 | |||
| 31 | * net/imap.el (imap-mailbox-status-asynch): Upcase STATUS items. | ||
| 32 | (imap-parse-status): Upcase status-att for broken servers that sends | ||
| 33 | them lower-case (e.g., MS Exchange 2007). | ||
| 34 | |||
| 1 | 2007-12-05 D. Goel <deego3@gmail.com> | 35 | 2007-12-05 D. Goel <deego3@gmail.com> |
| 2 | 36 | ||
| 3 | * simple.el (undo): Ditto. | 37 | * simple.el (undo): Ditto. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7f6dda4c5eb..87e7f595cab 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,31 @@ | |||
| 1 | 2007-12-04 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus-group.el (gnus-group-highlight-line): Add FIXME. | ||
| 4 | |||
| 5 | * gnus-dired.el: Reduce Gnus dependencies. | ||
| 6 | (gnus-ems, gnus-msg, gnus-util, message, mm-decode, mml): Don't | ||
| 7 | require. Use autoloads instead. | ||
| 8 | (mml-attach-file, mm-default-file-encoding, mailcap-extension-to-mime) | ||
| 9 | (mailcap-mime-info, mm-mailcap-command, ps-print-preprint) | ||
| 10 | (message-buffers, gnus-setup-message, gnus-print-buffer): Autoload. | ||
| 11 | (gnus-dired-mode): Adjust doc string. | ||
| 12 | (gnus-dired-mail-mode): New variable. | ||
| 13 | (gnus-dired-mode-map): Avoid using `gnus-define-keys'. | ||
| 14 | (gnus-dired-mode): Avoid using `gnus-run-hooks'. | ||
| 15 | (gnus-dired-mail-buffers): New function. Return mail or message | ||
| 16 | composition buffers. | ||
| 17 | (gnus-dired-attach): Use it. | ||
| 18 | (gnus-dired-find-file-mailcap): Call `mailcap-mime-info' with | ||
| 19 | NO-DECODE. | ||
| 20 | (gnus-dired-print): Use `gnus-print-buffer' depending on | ||
| 21 | `gnus-dired-mail-mode'. | ||
| 22 | |||
| 23 | 2007-12-04 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 24 | |||
| 25 | * rfc2047.el (rfc2047-encoded-word-regexp) | ||
| 26 | (rfc2047-encoded-word-regexp-loose): Move forward; add comments | ||
| 27 | explaining what regexp patterns are for. | ||
| 28 | |||
| 1 | 2007-12-04 Glenn Morris <rgm@gnu.org> | 29 | 2007-12-04 Glenn Morris <rgm@gnu.org> |
| 2 | 30 | ||
| 3 | * password.el: Move to ../password-cache.el. | 31 | * password.el: Move to ../password-cache.el. |
| @@ -15,6 +43,29 @@ | |||
| 15 | * mml-sec.el, sieve-manage.el, smime.el: Require password-cache or | 43 | * mml-sec.el, sieve-manage.el, smime.el: Require password-cache or |
| 16 | password. | 44 | password. |
| 17 | 45 | ||
| 46 | 2007-12-03 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 47 | |||
| 48 | * mailcap.el: Reduce dependencies. | ||
| 49 | (mail-header-parse-content-type): Autoload. | ||
| 50 | (mailcap-delete-duplicates): New alias. | ||
| 51 | (mailcap-mime-info): Add optional argument NO-DECODE. | ||
| 52 | (mailcap-mime-types): Use mailcap-delete-duplicates. | ||
| 53 | |||
| 54 | * message.el (message-ignored-supersedes-headers): Add "X-ID". | ||
| 55 | |||
| 56 | 2007-12-03 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 57 | |||
| 58 | * gnus-sum.el (gnus-uu-extract-map): Add a command for the yenc | ||
| 59 | function. | ||
| 60 | |||
| 61 | * gnus-uu.el (gnus-uu-decode-yenc): New command. | ||
| 62 | (gnus-uu-yenc-article): New function. | ||
| 63 | |||
| 64 | * yenc.el (yenc-first-part-p, yenc-last-part-p): New functions. | ||
| 65 | |||
| 66 | * mm-uu.el (mm-uu-yenc-extract): Get the data from the original | ||
| 67 | buffer. | ||
| 68 | |||
| 18 | 2007-12-02 Glenn Morris <rgm@gnu.org> | 69 | 2007-12-02 Glenn Morris <rgm@gnu.org> |
| 19 | 70 | ||
| 20 | * sasl-cram.el, sasl-digest.el, sasl-ntlm.el, sasl.el: | 71 | * sasl-cram.el, sasl-digest.el, sasl-ntlm.el, sasl.el: |
| @@ -24,6 +75,20 @@ | |||
| 24 | 75 | ||
| 25 | * encrypt.el: Remove file. | 76 | * encrypt.el: Remove file. |
| 26 | 77 | ||
| 78 | 2007-12-01 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 79 | |||
| 80 | * message.el (message-cite-prefix-regexp): Remove `-' and `+' to avoid | ||
| 81 | matches on patches. | ||
| 82 | |||
| 83 | * gnus-art.el (gnus-article-browse-html-article): Mention | ||
| 84 | `mm-text-html-renderer' in the doc string. | ||
| 85 | |||
| 86 | * rfc2047.el (rfc2047-encode-max-chars): Refer to RFC 2047 in doc | ||
| 87 | string. Add comments. | ||
| 88 | |||
| 89 | * message.el (message-idna-to-ascii-rhs-1): Don't call `idna-to-ascii' | ||
| 90 | if rhs is ASCII. | ||
| 91 | |||
| 27 | 2007-12-01 Glenn Morris <rgm@gnu.org> | 92 | 2007-12-01 Glenn Morris <rgm@gnu.org> |
| 28 | 93 | ||
| 29 | * dig.el, dns.el: Move to ../net. | 94 | * dig.el, dns.el: Move to ../net. |
| @@ -36,15 +101,91 @@ | |||
| 36 | 101 | ||
| 37 | * encrypt.el: Require password, rather than autoloading password-read. | 102 | * encrypt.el: Require password, rather than autoloading password-read. |
| 38 | 103 | ||
| 104 | 2007-11-28 Elias Oltmanns <eo@nebensachen.de> | ||
| 105 | |||
| 106 | * gnus.el (gnus-method-to-server): Add an optional parameter so the | ||
| 107 | caller can indicate whether the cache should be disregarded for this | ||
| 108 | call. This way the result of the call is reproducible at all times and | ||
| 109 | can be considered a canonical server name for the supplied method. | ||
| 110 | (gnus-agent-method-p): Canonicalize server names by pushing their | ||
| 111 | method through `gnus-method-to-server' using the no-cache argument. | ||
| 112 | |||
| 113 | * gnus-srvr.el (gnus-server-insert-server-line): Call | ||
| 114 | `gnus-method-to-server' with `no-cache' argument. | ||
| 115 | |||
| 116 | * gnus-agent.el (gnus-agent-toggle-plugged): Don't call | ||
| 117 | gnus-agent-possibly-synchronize-flags as this should be called when the | ||
| 118 | server is actually being opened. | ||
| 119 | (gnus-agent-possibly-synchronize-flags) | ||
| 120 | (gnus-agent-possibly-synchronize-flags-server): Move check for the | ||
| 121 | flags file of an agentized server to the latter function. | ||
| 122 | |||
| 123 | * gnus-int.el (gnus-agent-possibly-synchronize-flags-server): Autoload. | ||
| 124 | (gnus-open-server): Call gnus-agent-possibly-synchronize-flags-server | ||
| 125 | after a connection has been established successfully. | ||
| 126 | |||
| 127 | 2007-11-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 128 | |||
| 129 | * gnus-art.el (article-display-face): Force to display face if called | ||
| 130 | interactively; check if gnus-article-x-face-too-ugly matches author. | ||
| 131 | (article-display-x-face): Display face even if From header is missing | ||
| 132 | as article-display-face does. | ||
| 133 | |||
| 39 | 2007-11-28 Richard Stallman <rms@gnu.org> | 134 | 2007-11-28 Richard Stallman <rms@gnu.org> |
| 40 | 135 | ||
| 41 | * md4.el: Move to ../. | 136 | * md4.el: Move to ../. |
| 42 | * hmac-def.el, hmac-md5.el, ntlm.el: Move to ../net. | 137 | * hmac-def.el, hmac-md5.el, ntlm.el: Move to ../net. |
| 43 | 138 | ||
| 139 | 2007-11-27 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 140 | |||
| 141 | * mail-source.el (mail-sources): Default to fetch from file for | ||
| 142 | compatibility with default of nnmail-spool-file. | ||
| 143 | |||
| 144 | 2007-11-27 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 145 | |||
| 146 | * rfc2047.el (rfc2047-allow-irregular-q-encoded-words): New variable. | ||
| 147 | (rfc2047-encodable-p): Use rfc2047-encoded-word-regexp instead of "=?" | ||
| 148 | to look for encoded word that should be encoded again. | ||
| 149 | (rfc2047-encoded-word-regexp): Make B encoding pattern strict. | ||
| 150 | (rfc2047-encoded-word-regexp-loose): New constant that has loose Q | ||
| 151 | encoding pattern. | ||
| 152 | (rfc2047-decode-region): Switch strict regexp and loose one according | ||
| 153 | to rfc2047-allow-irregular-q-encoded-words. | ||
| 154 | |||
| 44 | 2007-11-26 Simon Josefsson <simon@josefsson.org> | 155 | 2007-11-26 Simon Josefsson <simon@josefsson.org> |
| 45 | 156 | ||
| 46 | * imap.el: Move to ../net directory. | 157 | * imap.el: Move to ../net directory. |
| 47 | 158 | ||
| 159 | 2007-11-25 Romain Francoise <romain@orebokech.com> | ||
| 160 | |||
| 161 | * gnus-msg.el (gnus-summary-reply): Delete extra paren. | ||
| 162 | |||
| 163 | 2007-11-24 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 164 | |||
| 165 | * nnmail.el (nnmail-spool-file): Remove obsolete variable. | ||
| 166 | (nnmail-get-new-mail): Remove code using `nnmail-spool-file'. | ||
| 167 | |||
| 168 | * gnus-start.el (defvar, gnus-get-unread-articles): Remove code using | ||
| 169 | `nnmail-spool-file'. | ||
| 170 | |||
| 171 | * nnkiboze.el (nnkiboze-generate-groups): Don't bind obsolete | ||
| 172 | `nnmail-spool-file'. | ||
| 173 | |||
| 174 | * gnus-move.el (gnus-change-server): Ditto. | ||
| 175 | |||
| 176 | * gnus-kill.el (gnus-batch-score): Ditto. | ||
| 177 | |||
| 178 | * gnus-cache.el (gnus-jog-cache): Ditto. | ||
| 179 | |||
| 180 | * gnus-msg.el (gnus-summary-reply): Ignore | ||
| 181 | gnus-confirm-mail-reply-to-news for wide and very wide replies. | ||
| 182 | |||
| 183 | 2007-11-24 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 184 | |||
| 185 | * gnus-cache.el (gnus-cache-generate-nov-databases): Use | ||
| 186 | nnml-generate-nov-databases-directory instead of | ||
| 187 | nnml-generate-nov-databases-1. | ||
| 188 | |||
| 48 | 2007-11-24 Glenn Morris <rgm@gnu.org> | 189 | 2007-11-24 Glenn Morris <rgm@gnu.org> |
| 49 | 190 | ||
| 50 | * message.el (message-tool-bar-retro): Update for rename | 191 | * message.el (message-tool-bar-retro): Update for rename |
| @@ -52,6 +193,11 @@ | |||
| 52 | 193 | ||
| 53 | 2007-11-22 Reiner Steib <Reiner.Steib@gmx.de> | 194 | 2007-11-22 Reiner Steib <Reiner.Steib@gmx.de> |
| 54 | 195 | ||
| 196 | * smime.el (smime-cert-by-ldap-1): Use `ldap-search' instead of | ||
| 197 | `smime-ldap-search' for Emacs 22 and up. | ||
| 198 | |||
| 199 | 2007-11-22 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 200 | |||
| 55 | * hashcash.el: Move to ../mail directory. | 201 | * hashcash.el: Move to ../mail directory. |
| 56 | 202 | ||
| 57 | * smime-ldap.el: Remove. Not used in Emacs 22 and up. | 203 | * smime-ldap.el: Remove. Not used in Emacs 22 and up. |
| @@ -87,6 +233,18 @@ | |||
| 87 | (spam-check-crm114, spam-initialize, spam-unload-hook): | 233 | (spam-check-crm114, spam-initialize, spam-unload-hook): |
| 88 | Fix typos in docstrings. | 234 | Fix typos in docstrings. |
| 89 | 235 | ||
| 236 | 2007-11-21 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 237 | |||
| 238 | * gnus-start.el (gnus-get-unread-articles): Mark groups as having never | ||
| 239 | been checked if they have never been read and those group levels are | ||
| 240 | higher than the one that a user specified. | ||
| 241 | |||
| 242 | 2007-11-21 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 243 | |||
| 244 | * gnus-start.el (gnus-get-unread-articles): Don't prevent from checking | ||
| 245 | foreign groups unless a group level is specified by a user. | ||
| 246 | Reported by Dan Nicolaescu <dann@ics.uci.edu>. | ||
| 247 | |||
| 90 | 2007-11-21 Reiner Steib <Reiner.Steib@gmx.de> | 248 | 2007-11-21 Reiner Steib <Reiner.Steib@gmx.de> |
| 91 | 249 | ||
| 92 | * message.el (message-send-mail-function): Require sendmail. | 250 | * message.el (message-send-mail-function): Require sendmail. |
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index a29d985463f..22ffd585973 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -636,8 +636,7 @@ manipulated as follows: | |||
| 636 | (gnus-agent-make-mode-line-string " Plugged" | 636 | (gnus-agent-make-mode-line-string " Plugged" |
| 637 | 'mouse-2 | 637 | 'mouse-2 |
| 638 | 'gnus-agent-toggle-plugged)) | 638 | 'gnus-agent-toggle-plugged)) |
| 639 | (gnus-agent-go-online gnus-agent-go-online) | 639 | (gnus-agent-go-online gnus-agent-go-online)) |
| 640 | (gnus-agent-possibly-synchronize-flags)) | ||
| 641 | (t | 640 | (t |
| 642 | (gnus-agent-close-connections) | 641 | (gnus-agent-close-connections) |
| 643 | (setq gnus-plugged set-to) | 642 | (setq gnus-plugged set-to) |
| @@ -868,8 +867,7 @@ be a select method." | |||
| 868 | (interactive) | 867 | (interactive) |
| 869 | (save-excursion | 868 | (save-excursion |
| 870 | (dolist (gnus-command-method (gnus-agent-covered-methods)) | 869 | (dolist (gnus-command-method (gnus-agent-covered-methods)) |
| 871 | (when (and (file-exists-p (gnus-agent-lib-file "flags")) | 870 | (when (eq (gnus-server-status gnus-command-method) 'ok) |
| 872 | (eq (gnus-server-status gnus-command-method) 'ok)) | ||
| 873 | (gnus-agent-possibly-synchronize-flags-server gnus-command-method))))) | 871 | (gnus-agent-possibly-synchronize-flags-server gnus-command-method))))) |
| 874 | 872 | ||
| 875 | (defun gnus-agent-synchronize-flags-server (method) | 873 | (defun gnus-agent-synchronize-flags-server (method) |
| @@ -905,11 +903,13 @@ be a select method." | |||
| 905 | 903 | ||
| 906 | (defun gnus-agent-possibly-synchronize-flags-server (method) | 904 | (defun gnus-agent-possibly-synchronize-flags-server (method) |
| 907 | "Synchronize flags for server according to `gnus-agent-synchronize-flags'." | 905 | "Synchronize flags for server according to `gnus-agent-synchronize-flags'." |
| 908 | (when (or (and gnus-agent-synchronize-flags | 906 | (when (and (file-exists-p (gnus-agent-lib-file "flags")) |
| 909 | (not (eq gnus-agent-synchronize-flags 'ask))) | 907 | (or (and gnus-agent-synchronize-flags |
| 910 | (and (eq gnus-agent-synchronize-flags 'ask) | 908 | (not (eq gnus-agent-synchronize-flags 'ask))) |
| 911 | (gnus-y-or-n-p (format "Synchronize flags on server `%s'? " | 909 | (and (eq gnus-agent-synchronize-flags 'ask) |
| 912 | (cadr method))))) | 910 | (gnus-y-or-n-p |
| 911 | (format "Synchronize flags on server `%s'? " | ||
| 912 | (cadr method)))))) | ||
| 913 | (gnus-agent-synchronize-flags-server method))) | 913 | (gnus-agent-synchronize-flags-server method))) |
| 914 | 914 | ||
| 915 | ;;;###autoload | 915 | ;;;###autoload |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 4b93c030ac7..059d43bf0b8 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2334,9 +2334,9 @@ long lines iff arg is positive." | |||
| 2334 | 2334 | ||
| 2335 | (defvar gnus-face-properties-alist) | 2335 | (defvar gnus-face-properties-alist) |
| 2336 | 2336 | ||
| 2337 | (defun article-display-face () | 2337 | (defun article-display-face (&optional force) |
| 2338 | "Display any Face headers in the header." | 2338 | "Display any Face headers in the header." |
| 2339 | (interactive) | 2339 | (interactive (list 'force)) |
| 2340 | (let ((wash-face-p buffer-read-only)) | 2340 | (let ((wash-face-p buffer-read-only)) |
| 2341 | (gnus-with-article-headers | 2341 | (gnus-with-article-headers |
| 2342 | ;; When displaying parts, this function can be called several times on | 2342 | ;; When displaying parts, this function can be called several times on |
| @@ -2346,7 +2346,8 @@ long lines iff arg is positive." | |||
| 2346 | ;; read-only. | 2346 | ;; read-only. |
| 2347 | (if (and wash-face-p (memq 'face gnus-article-wash-types)) | 2347 | (if (and wash-face-p (memq 'face gnus-article-wash-types)) |
| 2348 | (gnus-delete-images 'face) | 2348 | (gnus-delete-images 'face) |
| 2349 | (let (face faces from) | 2349 | (let ((from (message-fetch-field "from")) |
| 2350 | face faces) | ||
| 2350 | (save-current-buffer | 2351 | (save-current-buffer |
| 2351 | (when (and wash-face-p | 2352 | (when (and wash-face-p |
| 2352 | (gnus-buffer-live-p gnus-original-article-buffer) | 2353 | (gnus-buffer-live-p gnus-original-article-buffer) |
| @@ -2354,16 +2355,22 @@ long lines iff arg is positive." | |||
| 2354 | (set-buffer gnus-original-article-buffer)) | 2355 | (set-buffer gnus-original-article-buffer)) |
| 2355 | (save-restriction | 2356 | (save-restriction |
| 2356 | (mail-narrow-to-head) | 2357 | (mail-narrow-to-head) |
| 2357 | (while (gnus-article-goto-header "Face") | 2358 | (when (or force |
| 2358 | (push (mail-header-field-value) faces)))) | 2359 | ;; Check whether this face is censored. |
| 2360 | (not (and gnus-article-x-face-too-ugly | ||
| 2361 | (or from | ||
| 2362 | (setq from (message-fetch-field "from"))) | ||
| 2363 | (string-match gnus-article-x-face-too-ugly | ||
| 2364 | from)))) | ||
| 2365 | (while (gnus-article-goto-header "Face") | ||
| 2366 | (push (mail-header-field-value) faces))))) | ||
| 2359 | (when faces | 2367 | (when faces |
| 2360 | (goto-char (point-min)) | 2368 | (goto-char (point-min)) |
| 2361 | (let ((from (gnus-article-goto-header "from")) | 2369 | (let (png image) |
| 2362 | png image) | 2370 | (unless (setq from (gnus-article-goto-header "from")) |
| 2363 | (unless from | ||
| 2364 | (insert "From:") | 2371 | (insert "From:") |
| 2365 | (setq from (point)) | 2372 | (setq from (point)) |
| 2366 | (insert "[no `from' set]\n")) | 2373 | (insert " [no `from' set]\n")) |
| 2367 | (while faces | 2374 | (while faces |
| 2368 | (when (setq png (gnus-convert-face-to-png (pop faces))) | 2375 | (when (setq png (gnus-convert-face-to-png (pop faces))) |
| 2369 | (setq image | 2376 | (setq image |
| @@ -2388,7 +2395,8 @@ long lines iff arg is positive." | |||
| 2388 | ;; instead. | 2395 | ;; instead. |
| 2389 | (gnus-delete-images 'xface) | 2396 | (gnus-delete-images 'xface) |
| 2390 | ;; Display X-Faces. | 2397 | ;; Display X-Faces. |
| 2391 | (let (x-faces from face) | 2398 | (let ((from (message-fetch-field "from")) |
| 2399 | x-faces face) | ||
| 2392 | (save-current-buffer | 2400 | (save-current-buffer |
| 2393 | (when (and wash-face-p | 2401 | (when (and wash-face-p |
| 2394 | (gnus-buffer-live-p gnus-original-article-buffer) | 2402 | (gnus-buffer-live-p gnus-original-article-buffer) |
| @@ -2399,43 +2407,41 @@ long lines iff arg is positive." | |||
| 2399 | (set-buffer gnus-original-article-buffer)) | 2407 | (set-buffer gnus-original-article-buffer)) |
| 2400 | (save-restriction | 2408 | (save-restriction |
| 2401 | (mail-narrow-to-head) | 2409 | (mail-narrow-to-head) |
| 2402 | (while (gnus-article-goto-header "X-Face") | 2410 | (and gnus-article-x-face-command |
| 2403 | (push (mail-header-field-value) x-faces)) | 2411 | (or force |
| 2404 | (setq from (message-fetch-field "from")))) | 2412 | ;; Check whether this face is censored. |
| 2405 | ;; Sending multiple EOFs to xv doesn't work, so we only do a | 2413 | (not (and gnus-article-x-face-too-ugly |
| 2406 | ;; single external face. | 2414 | (or from |
| 2407 | (when (stringp gnus-article-x-face-command) | 2415 | (setq from (message-fetch-field "from"))) |
| 2408 | (setq x-faces (list (car x-faces)))) | 2416 | (string-match gnus-article-x-face-too-ugly |
| 2409 | (when (and x-faces | 2417 | from)))) |
| 2410 | gnus-article-x-face-command | 2418 | (while (gnus-article-goto-header "X-Face") |
| 2411 | (or force | 2419 | (push (mail-header-field-value) x-faces))))) |
| 2412 | ;; Check whether this face is censored. | 2420 | (when x-faces |
| 2413 | (not gnus-article-x-face-too-ugly) | 2421 | ;; We display the face. |
| 2414 | (and from | 2422 | (cond ((functionp gnus-article-x-face-command) |
| 2415 | (not (string-match gnus-article-x-face-too-ugly | 2423 | ;; The command is a lisp function, so we call it. |
| 2416 | from))))) | 2424 | (mapc gnus-article-x-face-command x-faces)) |
| 2417 | (while (setq face (pop x-faces)) | 2425 | ((stringp gnus-article-x-face-command) |
| 2418 | ;; We display the face. | 2426 | ;; The command is a string, so we interpret the command |
| 2419 | (cond ((stringp gnus-article-x-face-command) | 2427 | ;; as a, well, command, and fork it off. |
| 2420 | ;; The command is a string, so we interpret the command | 2428 | (let ((process-connection-type nil)) |
| 2421 | ;; as a, well, command, and fork it off. | 2429 | (gnus-set-process-query-on-exit-flag |
| 2422 | (let ((process-connection-type nil)) | 2430 | (start-process |
| 2423 | (gnus-set-process-query-on-exit-flag | 2431 | "article-x-face" nil shell-file-name |
| 2424 | (start-process | 2432 | shell-command-switch gnus-article-x-face-command) |
| 2425 | "article-x-face" nil shell-file-name | 2433 | nil) |
| 2426 | shell-command-switch gnus-article-x-face-command) | 2434 | ;; Sending multiple EOFs to xv doesn't work, |
| 2427 | nil) | 2435 | ;; so we only do a single external face. |
| 2428 | (with-temp-buffer | 2436 | (with-temp-buffer |
| 2429 | (insert face) | 2437 | (insert (car x-faces)) |
| 2430 | (process-send-region "article-x-face" | 2438 | (process-send-region "article-x-face" |
| 2431 | (point-min) (point-max))) | 2439 | (point-min) (point-max))) |
| 2432 | (process-send-eof "article-x-face"))) | 2440 | (process-send-eof "article-x-face"))) |
| 2433 | ((functionp gnus-article-x-face-command) | 2441 | (t |
| 2434 | ;; The command is a lisp function, so we call it. | 2442 | (error "`%s' set to `%s' is not a function" |
| 2435 | (funcall gnus-article-x-face-command face)) | 2443 | gnus-article-x-face-command |
| 2436 | (t | 2444 | 'gnus-article-x-face-command))))))))) |
| 2437 | (error "%s is not a function" | ||
| 2438 | gnus-article-x-face-command)))))))))) | ||
| 2439 | 2445 | ||
| 2440 | (defun article-decode-mime-words () | 2446 | (defun article-decode-mime-words () |
| 2441 | "Decode all MIME-encoded words in the article." | 2447 | "Decode all MIME-encoded words in the article." |
| @@ -2823,7 +2829,10 @@ Warning: Spammers use links to images in HTML articles to verify | |||
| 2823 | whether you have read the message. As | 2829 | whether you have read the message. As |
| 2824 | `gnus-article-browse-html-article' passes the unmodified HTML | 2830 | `gnus-article-browse-html-article' passes the unmodified HTML |
| 2825 | content to the browser without eliminating these \"web bugs\" you | 2831 | content to the browser without eliminating these \"web bugs\" you |
| 2826 | should only use it for mails from trusted senders." | 2832 | should only use it for mails from trusted senders. |
| 2833 | |||
| 2834 | If you alwasy want to display HTML part in the browser, set | ||
| 2835 | `mm-text-html-renderer' to nil." | ||
| 2827 | ;; Cf. `mm-w3m-safe-url-regexp' | 2836 | ;; Cf. `mm-w3m-safe-url-regexp' |
| 2828 | (interactive) | 2837 | (interactive) |
| 2829 | (save-window-excursion | 2838 | (save-window-excursion |
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index fecb0685858..4f61a0f2759 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el | |||
| @@ -92,7 +92,7 @@ it's not cached." | |||
| 92 | (defvar gnus-cache-total-fetched-hashtb nil) | 92 | (defvar gnus-cache-total-fetched-hashtb nil) |
| 93 | 93 | ||
| 94 | (eval-and-compile | 94 | (eval-and-compile |
| 95 | (autoload 'nnml-generate-nov-databases-1 "nnml") | 95 | (autoload 'nnml-generate-nov-databases-directory "nnml") |
| 96 | (autoload 'nnvirtual-find-group-art "nnvirtual")) | 96 | (autoload 'nnvirtual-find-group-art "nnvirtual")) |
| 97 | 97 | ||
| 98 | 98 | ||
| @@ -620,7 +620,6 @@ $ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache" | |||
| 620 | (interactive) | 620 | (interactive) |
| 621 | (let ((gnus-mark-article-hook nil) | 621 | (let ((gnus-mark-article-hook nil) |
| 622 | (gnus-expert-user t) | 622 | (gnus-expert-user t) |
| 623 | (nnmail-spool-file nil) | ||
| 624 | (mail-sources nil) | 623 | (mail-sources nil) |
| 625 | (gnus-use-dribble-file nil) | 624 | (gnus-use-dribble-file nil) |
| 626 | (gnus-novice-user nil) | 625 | (gnus-novice-user nil) |
| @@ -756,7 +755,7 @@ If LOW, update the lower bound instead." | |||
| 756 | (interactive (list gnus-cache-directory)) | 755 | (interactive (list gnus-cache-directory)) |
| 757 | (gnus-cache-close) | 756 | (gnus-cache-close) |
| 758 | (let ((nnml-generate-active-function 'identity)) | 757 | (let ((nnml-generate-active-function 'identity)) |
| 759 | (nnml-generate-nov-databases-1 dir)) | 758 | (nnml-generate-nov-databases-directory dir)) |
| 760 | 759 | ||
| 761 | (setq gnus-cache-total-fetched-hashtb nil) | 760 | (setq gnus-cache-total-fetched-hashtb nil) |
| 762 | 761 | ||
diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el index fa9ef21bd1a..97e61a013c8 100644 --- a/lisp/gnus/gnus-dired.el +++ b/lisp/gnus/gnus-dired.el | |||
| @@ -42,25 +42,55 @@ | |||
| 42 | ;;; Code: | 42 | ;;; Code: |
| 43 | 43 | ||
| 44 | (require 'dired) | 44 | (require 'dired) |
| 45 | (require 'gnus-ems) | 45 | (autoload 'mml-attach-file "mml") |
| 46 | (require 'gnus-msg) | 46 | (autoload 'mm-default-file-encoding "mm-decode");; Shift this to `mailcap.el'? |
| 47 | (require 'gnus-util) | 47 | (autoload 'mailcap-extension-to-mime "mailcap") |
| 48 | (require 'message) | 48 | (autoload 'mailcap-mime-info "mailcap") |
| 49 | (require 'mm-encode) | 49 | |
| 50 | (require 'mml) | 50 | ;; Maybe shift this function to `mailcap.el'? |
| 51 | (autoload 'mm-mailcap-command "mm-decode") | ||
| 52 | |||
| 53 | (autoload 'ps-print-preprint "ps-print") | ||
| 54 | |||
| 55 | ;; Autoloads to avoid byte-compiler warnings. These are used only if the user | ||
| 56 | ;; customizes `gnus-dired-mail-mode' to use Message and/or Gnus. | ||
| 57 | (autoload 'message-buffers "message") | ||
| 58 | (autoload 'gnus-setup-message "gnus-msg") | ||
| 59 | (autoload 'gnus-print-buffer "gnus-sum") | ||
| 51 | 60 | ||
| 52 | (defvar gnus-dired-mode nil | 61 | (defvar gnus-dired-mode nil |
| 53 | "Minor mode for intersections of gnus and dired.") | 62 | "Minor mode for intersections of MIME mail composition and dired.") |
| 54 | 63 | ||
| 55 | (defvar gnus-dired-mode-map nil) | 64 | (defvar gnus-dired-mode-map nil) |
| 56 | 65 | ||
| 57 | (unless gnus-dired-mode-map | 66 | (unless gnus-dired-mode-map |
| 58 | (setq gnus-dired-mode-map (make-sparse-keymap)) | 67 | (setq gnus-dired-mode-map (make-sparse-keymap)) |
| 59 | 68 | ||
| 60 | (gnus-define-keys gnus-dired-mode-map | 69 | (define-key gnus-dired-mode-map "\C-c\C-m\C-a" 'gnus-dired-attach) |
| 61 | "\C-c\C-m\C-a" gnus-dired-attach | 70 | (define-key gnus-dired-mode-map "\C-c\C-m\C-l" 'gnus-dired-find-file-mailcap) |
| 62 | "\C-c\C-m\C-l" gnus-dired-find-file-mailcap | 71 | (define-key gnus-dired-mode-map "\C-c\C-m\C-p" 'gnus-dired-print)) |
| 63 | "\C-c\C-m\C-p" gnus-dired-print)) | 72 | |
| 73 | ;; FIXME: Make it customizable, change the default to `mail-user-agent' when | ||
| 74 | ;; this file if renamed (e.g. to `dired-mime.el'). | ||
| 75 | |||
| 76 | (defcustom gnus-dired-mail-mode 'gnus-user-agent ;; mail-user-agent | ||
| 77 | "Your preference for a mail composition package. | ||
| 78 | See `mail-user-agent' for more information." | ||
| 79 | :group 'mail ;; dired? | ||
| 80 | :version "23.0" ;; No Gnus | ||
| 81 | :type '(radio (function-item :tag "Default Emacs mail" | ||
| 82 | :format "%t\n" | ||
| 83 | sendmail-user-agent) | ||
| 84 | (function-item :tag "Emacs interface to MH" | ||
| 85 | :format "%t\n" | ||
| 86 | mh-e-user-agent) | ||
| 87 | (function-item :tag "Gnus Message package" | ||
| 88 | :format "%t\n" | ||
| 89 | message-user-agent) | ||
| 90 | (function-item :tag "Gnus Message with full Gnus features" | ||
| 91 | :format "%t\n" | ||
| 92 | gnus-user-agent) | ||
| 93 | (function :tag "Other"))) | ||
| 64 | 94 | ||
| 65 | (defun gnus-dired-mode (&optional arg) | 95 | (defun gnus-dired-mode (&optional arg) |
| 66 | "Minor mode for intersections of gnus and dired. | 96 | "Minor mode for intersections of gnus and dired. |
| @@ -73,14 +103,31 @@ | |||
| 73 | (> (prefix-numeric-value arg) 0))) | 103 | (> (prefix-numeric-value arg) 0))) |
| 74 | (when gnus-dired-mode | 104 | (when gnus-dired-mode |
| 75 | (add-minor-mode 'gnus-dired-mode "" gnus-dired-mode-map) | 105 | (add-minor-mode 'gnus-dired-mode "" gnus-dired-mode-map) |
| 76 | (gnus-run-hooks 'gnus-dired-mode-hook)))) | 106 | (save-current-buffer |
| 107 | (run-hooks 'gnus-dired-mode-hook))))) | ||
| 77 | 108 | ||
| 78 | ;;;###autoload | 109 | ;;;###autoload |
| 79 | (defun turn-on-gnus-dired-mode () | 110 | (defun turn-on-gnus-dired-mode () |
| 80 | "Convenience method to turn on gnus-dired-mode." | 111 | "Convenience method to turn on gnus-dired-mode." |
| 112 | (interactive) | ||
| 81 | (gnus-dired-mode 1)) | 113 | (gnus-dired-mode 1)) |
| 82 | 114 | ||
| 83 | ;; Method to attach files to a gnus composition. | 115 | (defun gnus-dired-mail-buffers () |
| 116 | "Return a list of active mail composition buffers." | ||
| 117 | (if (and (memq gnus-dired-mail-mode '(message-user-agent gnus-user-agent)) | ||
| 118 | (require 'message) | ||
| 119 | (fboundp 'message-buffers)) | ||
| 120 | (message-buffers) | ||
| 121 | ;; Cf. `message-buffers' in `message.el': | ||
| 122 | (let (buffers) | ||
| 123 | (save-excursion | ||
| 124 | (dolist (buffer (buffer-list t)) | ||
| 125 | (set-buffer buffer) | ||
| 126 | (when (eq major-mode 'mail-mode) | ||
| 127 | (push (buffer-name buffer) buffers)))) | ||
| 128 | (nreverse buffers)))) | ||
| 129 | |||
| 130 | ;; Method to attach files to a mail composition. | ||
| 84 | (defun gnus-dired-attach (files-to-attach) | 131 | (defun gnus-dired-attach (files-to-attach) |
| 85 | "Attach dired's marked files to a gnus message composition. | 132 | "Attach dired's marked files to a gnus message composition. |
| 86 | If called non-interactively, FILES-TO-ATTACH should be a list of | 133 | If called non-interactively, FILES-TO-ATTACH should be a list of |
| @@ -102,22 +149,25 @@ filenames." | |||
| 102 | (mapconcat | 149 | (mapconcat |
| 103 | (lambda (f) (file-name-nondirectory f)) | 150 | (lambda (f) (file-name-nondirectory f)) |
| 104 | files-to-attach ", ")) | 151 | files-to-attach ", ")) |
| 105 | (setq bufs (message-buffers)) | 152 | (setq bufs (gnus-dired-mail-buffers)) |
| 106 | 153 | ||
| 107 | ;; set up destination message buffer | 154 | ;; set up destination mail composition buffer |
| 108 | (if (and bufs | 155 | (if (and bufs |
| 109 | (y-or-n-p "Attach files to existing message buffer? ")) | 156 | (y-or-n-p "Attach files to existing mail composition buffer? ")) |
| 110 | (setq destination | 157 | (setq destination |
| 111 | (if (= (length bufs) 1) | 158 | (if (= (length bufs) 1) |
| 112 | (get-buffer (car bufs)) | 159 | (get-buffer (car bufs)) |
| 113 | (completing-read "Attach to which message buffer: " | 160 | (completing-read "Attach to which mail composition buffer: " |
| 114 | (mapcar | 161 | (mapcar |
| 115 | (lambda (b) | 162 | (lambda (b) |
| 116 | (cons b (get-buffer b))) | 163 | (cons b (get-buffer b))) |
| 117 | bufs) | 164 | bufs) |
| 118 | nil t))) | 165 | nil t))) |
| 119 | ;; setup a new gnus message buffer | 166 | ;; setup a new mail composition buffer |
| 120 | (gnus-setup-message 'message (message-mail)) | 167 | (if (eq gnus-dired-mail-mode 'gnus-user-agent) |
| 168 | (gnus-setup-message 'message (message-mail)) | ||
| 169 | ;; FIXME: Is this the right thing? | ||
| 170 | (compose-mail)) | ||
| 121 | (setq destination (current-buffer))) | 171 | (setq destination (current-buffer))) |
| 122 | 172 | ||
| 123 | ;; set buffer to destination buffer, and attach files | 173 | ;; set buffer to destination buffer, and attach files |
| @@ -151,7 +201,8 @@ If ARG is non-nil, open it in a new buffer." | |||
| 151 | (setq method | 201 | (setq method |
| 152 | (cdr (assoc 'viewer | 202 | (cdr (assoc 'viewer |
| 153 | (car (mailcap-mime-info mime-type | 203 | (car (mailcap-mime-info mime-type |
| 154 | 'all))))))) | 204 | 'all |
| 205 | 'no-decode))))))) | ||
| 155 | (let ((view-command (mm-mailcap-command method file-name nil))) | 206 | (let ((view-command (mm-mailcap-command method file-name nil))) |
| 156 | (message "viewing via %s" view-command) | 207 | (message "viewing via %s" view-command) |
| 157 | (start-process "*display*" | 208 | (start-process "*display*" |
| @@ -186,7 +237,8 @@ file to save in." | |||
| 186 | (mailcap-extension-to-mime | 237 | (mailcap-extension-to-mime |
| 187 | (match-string 0 file-name))) | 238 | (match-string 0 file-name))) |
| 188 | (stringp | 239 | (stringp |
| 189 | (setq method (mailcap-mime-info mime-type "print")))) | 240 | (setq method (mailcap-mime-info mime-type "print" |
| 241 | 'no-decode)))) | ||
| 190 | (call-process shell-file-name nil | 242 | (call-process shell-file-name nil |
| 191 | (generate-new-buffer " *mm*") | 243 | (generate-new-buffer " *mm*") |
| 192 | nil | 244 | nil |
| @@ -194,7 +246,10 @@ file to save in." | |||
| 194 | (mm-mailcap-command method file-name mime-type)) | 246 | (mm-mailcap-command method file-name mime-type)) |
| 195 | (with-temp-buffer | 247 | (with-temp-buffer |
| 196 | (insert-file-contents file-name) | 248 | (insert-file-contents file-name) |
| 197 | (gnus-print-buffer)) | 249 | (if (eq gnus-dired-mail-mode 'gnus-user-agent) |
| 250 | (gnus-print-buffer) | ||
| 251 | ;; FIXME: | ||
| 252 | (error "MIME print only implemeted via Gnus"))) | ||
| 198 | (ps-despool print-to)))) | 253 | (ps-despool print-to)))) |
| 199 | ((file-symlink-p file-name) | 254 | ((file-symlink-p file-name) |
| 200 | (error "File is a symlink to a nonexistent target")) | 255 | (error "File is a symlink to a nonexistent target")) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index d043a515f49..5843214e48a 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -1655,6 +1655,24 @@ if it is a string, only list groups matching REGEXP." | |||
| 1655 | (ticked (gnus-range-length (cdr (assq 'tick marked)))) | 1655 | (ticked (gnus-range-length (cdr (assq 'tick marked)))) |
| 1656 | (group-age (gnus-group-timestamp-delta group)) | 1656 | (group-age (gnus-group-timestamp-delta group)) |
| 1657 | (inhibit-read-only t)) | 1657 | (inhibit-read-only t)) |
| 1658 | ;; FIXME: http://thread.gmane.org/gmane.emacs.gnus.general/65451/focus=65465 | ||
| 1659 | ;; ====================================================================== | ||
| 1660 | ;; From: Richard Stallman | ||
| 1661 | ;; Subject: Re: Rewriting gnus-group-highlight-line (was: [...]) | ||
| 1662 | ;; Cc: ding@gnus.org | ||
| 1663 | ;; Date: Sat, 27 Oct 2007 19:41:20 -0400 | ||
| 1664 | ;; Message-ID: <E1IlvHM-0006TS-7t@fencepost.gnu.org> | ||
| 1665 | ;; | ||
| 1666 | ;; [...] | ||
| 1667 | ;; The kludge is that the alist elements contain expressions that refer | ||
| 1668 | ;; to local variables with short names. Perhaps write your own tiny | ||
| 1669 | ;; evaluator that handles just `and', `or', and numeric comparisons | ||
| 1670 | ;; and just a few specific variables. | ||
| 1671 | ;; ====================================================================== | ||
| 1672 | ;; | ||
| 1673 | ;; Similar for other evaluated variables. Grep for risky-local-variable | ||
| 1674 | ;; to find them! -- rsteib | ||
| 1675 | ;; | ||
| 1658 | ;; Eval the cars of the lists until we find a match. | 1676 | ;; Eval the cars of the lists until we find a match. |
| 1659 | (while (and list | 1677 | (while (and list |
| 1660 | (not (eval (caar list)))) | 1678 | (not (eval (caar list)))) |
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 52b5e350653..ac2b7237866 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | (autoload 'gnus-agent-expire "gnus-agent") | 36 | (autoload 'gnus-agent-expire "gnus-agent") |
| 37 | (autoload 'gnus-agent-regenerate-group "gnus-agent") | 37 | (autoload 'gnus-agent-regenerate-group "gnus-agent") |
| 38 | (autoload 'gnus-agent-read-servers-validate-native "gnus-agent") | 38 | (autoload 'gnus-agent-read-servers-validate-native "gnus-agent") |
| 39 | (autoload 'gnus-agent-possibly-synchronize-flags-server "gnus-agent") | ||
| 39 | 40 | ||
| 40 | (defcustom gnus-open-server-hook nil | 41 | (defcustom gnus-open-server-hook nil |
| 41 | "Hook called just before opening connection to the news server." | 42 | "Hook called just before opening connection to the news server." |
| @@ -278,6 +279,11 @@ If it is down, start it up (again)." | |||
| 278 | ;; prompting with "go offline?". This is only a concern | 279 | ;; prompting with "go offline?". This is only a concern |
| 279 | ;; when the agent's backend fails to open the server. | 280 | ;; when the agent's backend fails to open the server. |
| 280 | (gnus-open-server gnus-command-method)) | 281 | (gnus-open-server gnus-command-method)) |
| 282 | (when (and (eq (cadr elem) 'ok) gnus-agent | ||
| 283 | (gnus-agent-method-p gnus-command-method)) | ||
| 284 | (save-excursion | ||
| 285 | (gnus-agent-possibly-synchronize-flags-server | ||
| 286 | gnus-command-method))) | ||
| 281 | result))))) | 287 | result))))) |
| 282 | 288 | ||
| 283 | (defun gnus-close-server (gnus-command-method) | 289 | (defun gnus-close-server (gnus-command-method) |
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index 5778a02e168..2d64a76b6c6 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el | |||
| @@ -687,7 +687,6 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score" | |||
| 687 | (concat "options -n " | 687 | (concat "options -n " |
| 688 | (mapconcat 'identity command-line-args-left " ")))) | 688 | (mapconcat 'identity command-line-args-left " ")))) |
| 689 | (gnus-expert-user t) | 689 | (gnus-expert-user t) |
| 690 | (nnmail-spool-file nil) | ||
| 691 | (mail-sources nil) | 690 | (mail-sources nil) |
| 692 | (gnus-use-dribble-file nil) | 691 | (gnus-use-dribble-file nil) |
| 693 | (gnus-batch-mode t) | 692 | (gnus-batch-mode t) |
diff --git a/lisp/gnus/gnus-move.el b/lisp/gnus/gnus-move.el index 0a97f8d5bd6..cf5cde692ff 100644 --- a/lisp/gnus/gnus-move.el +++ b/lisp/gnus/gnus-move.el | |||
| @@ -47,8 +47,7 @@ Update the .newsrc.eld file to reflect the change of nntp server." | |||
| 47 | 47 | ||
| 48 | ;; First start Gnus. | 48 | ;; First start Gnus. |
| 49 | (let ((gnus-activate-level 0) | 49 | (let ((gnus-activate-level 0) |
| 50 | (mail-sources nil) | 50 | (mail-sources nil)) |
| 51 | (nnmail-spool-file nil)) | ||
| 52 | (gnus)) | 51 | (gnus)) |
| 53 | 52 | ||
| 54 | (save-excursion | 53 | (save-excursion |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index f5bf3a7ef65..735b9ed629b 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1101,7 +1101,10 @@ If VERY-WIDE, make a very wide reply." | |||
| 1101 | ((functionp gnus-confirm-mail-reply-to-news) | 1101 | ((functionp gnus-confirm-mail-reply-to-news) |
| 1102 | (funcall gnus-confirm-mail-reply-to-news gnus-newsgroup-name)) | 1102 | (funcall gnus-confirm-mail-reply-to-news gnus-newsgroup-name)) |
| 1103 | (t gnus-confirm-mail-reply-to-news))) | 1103 | (t gnus-confirm-mail-reply-to-news))) |
| 1104 | (y-or-n-p "Really reply by mail to article author? ")) | 1104 | (if (or wide very-wide) |
| 1105 | t ;; Ignore gnus-confirm-mail-reply-to-news for wide and very | ||
| 1106 | ;; wide replies. | ||
| 1107 | (y-or-n-p "Really reply by mail to article author? "))) | ||
| 1105 | (let* ((article | 1108 | (let* ((article |
| 1106 | (if (listp (car yank)) | 1109 | (if (listp (car yank)) |
| 1107 | (caar yank) | 1110 | (caar yank) |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index ca087f9ca4d..77e06ee04f8 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -280,7 +280,7 @@ The following commands are available: | |||
| 280 | ;; Insert the text. | 280 | ;; Insert the text. |
| 281 | (eval gnus-server-line-format-spec)) | 281 | (eval gnus-server-line-format-spec)) |
| 282 | (list 'gnus-server (intern gnus-tmp-name) | 282 | (list 'gnus-server (intern gnus-tmp-name) |
| 283 | 'gnus-named-server (intern (gnus-method-to-server method)))))) | 283 | 'gnus-named-server (intern (gnus-method-to-server method t)))))) |
| 284 | 284 | ||
| 285 | (defun gnus-enter-server-buffer () | 285 | (defun gnus-enter-server-buffer () |
| 286 | "Set up the server buffer." | 286 | "Set up the server buffer." |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 98994d5aaf7..7d6b91366e6 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -1669,7 +1669,7 @@ If SCAN, request a scan of that group as well." | |||
| 1669 | (defun gnus-get-unread-articles (&optional level) | 1669 | (defun gnus-get-unread-articles (&optional level) |
| 1670 | (setq gnus-server-method-cache nil) | 1670 | (setq gnus-server-method-cache nil) |
| 1671 | (let* ((newsrc (cdr gnus-newsrc-alist)) | 1671 | (let* ((newsrc (cdr gnus-newsrc-alist)) |
| 1672 | (level (or level gnus-activate-level (1+ gnus-level-subscribed))) | 1672 | (alevel (or level gnus-activate-level (1+ gnus-level-subscribed))) |
| 1673 | (foreign-level | 1673 | (foreign-level |
| 1674 | (min | 1674 | (min |
| 1675 | (cond ((and gnus-activate-foreign-newsgroups | 1675 | (cond ((and gnus-activate-foreign-newsgroups |
| @@ -1678,11 +1678,11 @@ If SCAN, request a scan of that group as well." | |||
| 1678 | ((numberp gnus-activate-foreign-newsgroups) | 1678 | ((numberp gnus-activate-foreign-newsgroups) |
| 1679 | gnus-activate-foreign-newsgroups) | 1679 | gnus-activate-foreign-newsgroups) |
| 1680 | (t 0)) | 1680 | (t 0)) |
| 1681 | level)) | 1681 | alevel)) |
| 1682 | (methods-cache nil) | 1682 | (methods-cache nil) |
| 1683 | (type-cache nil) | 1683 | (type-cache nil) |
| 1684 | scanned-methods info group active method retrieve-groups cmethod | 1684 | scanned-methods info group active method retrieve-groups cmethod |
| 1685 | method-type ignore) | 1685 | method-type) |
| 1686 | (gnus-message 6 "Checking new news...") | 1686 | (gnus-message 6 "Checking new news...") |
| 1687 | 1687 | ||
| 1688 | (while newsrc | 1688 | (while newsrc |
| @@ -1719,7 +1719,6 @@ If SCAN, request a scan of that group as well." | |||
| 1719 | 'foreign))) | 1719 | 'foreign))) |
| 1720 | (push (cons method method-type) type-cache)) | 1720 | (push (cons method method-type) type-cache)) |
| 1721 | 1721 | ||
| 1722 | (setq ignore nil) | ||
| 1723 | (cond ((and method (eq method-type 'foreign)) | 1722 | (cond ((and method (eq method-type 'foreign)) |
| 1724 | ;; These groups are foreign. Check the level. | 1723 | ;; These groups are foreign. Check the level. |
| 1725 | (if (<= (gnus-info-level info) foreign-level) | 1724 | (if (<= (gnus-info-level info) foreign-level) |
| @@ -1733,9 +1732,17 @@ If SCAN, request a scan of that group as well." | |||
| 1733 | (when (fboundp (intern (concat (symbol-name (car method)) | 1732 | (when (fboundp (intern (concat (symbol-name (car method)) |
| 1734 | "-request-update-info"))) | 1733 | "-request-update-info"))) |
| 1735 | (inline (gnus-request-update-info info method)))) | 1734 | (inline (gnus-request-update-info info method)))) |
| 1736 | (setq ignore t))) | 1735 | (if (and level |
| 1736 | ;; If `active' is nil that means the group has | ||
| 1737 | ;; never been read, the group should be marked | ||
| 1738 | ;; as having never been checked (see below). | ||
| 1739 | active | ||
| 1740 | (> (gnus-info-level info) level)) | ||
| 1741 | ;; Don't check groups of which levels are higher | ||
| 1742 | ;; than the one that a user specified. | ||
| 1743 | (setq active 'ignore)))) | ||
| 1737 | ;; These groups are native or secondary. | 1744 | ;; These groups are native or secondary. |
| 1738 | ((> (gnus-info-level info) level) | 1745 | ((> (gnus-info-level info) alevel) |
| 1739 | ;; We don't want these groups. | 1746 | ;; We don't want these groups. |
| 1740 | (setq active 'ignore)) | 1747 | (setq active 'ignore)) |
| 1741 | ;; Activate groups. | 1748 | ;; Activate groups. |
| @@ -1755,11 +1762,7 @@ If SCAN, request a scan of that group as well." | |||
| 1755 | ;; not required. | 1762 | ;; not required. |
| 1756 | (if (and | 1763 | (if (and |
| 1757 | (or nnmail-scan-directory-mail-source-once | 1764 | (or nnmail-scan-directory-mail-source-once |
| 1758 | (null (assq 'directory | 1765 | (null (assq 'directory mail-sources))) |
| 1759 | (or mail-sources | ||
| 1760 | (if (listp nnmail-spool-file) | ||
| 1761 | nnmail-spool-file | ||
| 1762 | (list nnmail-spool-file)))))) | ||
| 1763 | (member method scanned-methods)) | 1766 | (member method scanned-methods)) |
| 1764 | (setq active (gnus-activate-group group)) | 1767 | (setq active (gnus-activate-group group)) |
| 1765 | (setq active (gnus-activate-group group 'scan)) | 1768 | (setq active (gnus-activate-group group 'scan)) |
| @@ -1772,10 +1775,6 @@ If SCAN, request a scan of that group as well." | |||
| 1772 | ((eq active 'ignore) | 1775 | ((eq active 'ignore) |
| 1773 | ;; Don't do anything. | 1776 | ;; Don't do anything. |
| 1774 | ) | 1777 | ) |
| 1775 | ((and active ignore) | ||
| 1776 | ;; The level of the foreign group is higher than the specified | ||
| 1777 | ;; value. | ||
| 1778 | ) | ||
| 1779 | (active | 1778 | (active |
| 1780 | (inline (gnus-get-unread-articles-in-group info active t))) | 1779 | (inline (gnus-get-unread-articles-in-group info active t))) |
| 1781 | (t | 1780 | (t |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 214693ece8c..b082a8b152e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -2195,6 +2195,7 @@ increase the score of each group you read." | |||
| 2195 | "O" gnus-uu-decode-save | 2195 | "O" gnus-uu-decode-save |
| 2196 | "b" gnus-uu-decode-binhex | 2196 | "b" gnus-uu-decode-binhex |
| 2197 | "B" gnus-uu-decode-binhex | 2197 | "B" gnus-uu-decode-binhex |
| 2198 | "Y" gnus-uu-decode-yenc | ||
| 2198 | "p" gnus-uu-decode-postscript | 2199 | "p" gnus-uu-decode-postscript |
| 2199 | "P" gnus-uu-decode-postscript-and-save) | 2200 | "P" gnus-uu-decode-postscript-and-save) |
| 2200 | 2201 | ||
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index d3b13f3843a..3a045c2c234 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | (require 'message) | 35 | (require 'message) |
| 36 | (require 'gnus-msg) | 36 | (require 'gnus-msg) |
| 37 | (require 'mm-decode) | 37 | (require 'mm-decode) |
| 38 | (require 'yenc) | ||
| 38 | 39 | ||
| 39 | (defgroup gnus-extract nil | 40 | (defgroup gnus-extract nil |
| 40 | "Extracting encoded files." | 41 | "Extracting encoded files." |
| @@ -346,6 +347,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." | |||
| 346 | (defvar gnus-uu-file-name nil) | 347 | (defvar gnus-uu-file-name nil) |
| 347 | (defvar gnus-uu-uudecode-process nil) | 348 | (defvar gnus-uu-uudecode-process nil) |
| 348 | (defvar gnus-uu-binhex-article-name nil) | 349 | (defvar gnus-uu-binhex-article-name nil) |
| 350 | (defvar gnus-uu-yenc-article-name nil) | ||
| 349 | 351 | ||
| 350 | (defvar gnus-uu-work-dir nil) | 352 | (defvar gnus-uu-work-dir nil) |
| 351 | 353 | ||
| @@ -412,6 +414,17 @@ didn't work, and overwrite existing files. Otherwise, ask each time." | |||
| 412 | (mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir))) | 414 | (mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir))) |
| 413 | (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir)) | 415 | (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir)) |
| 414 | 416 | ||
| 417 | (defun gnus-uu-decode-yenc (n dir) | ||
| 418 | "Decode the yEnc-encoded current article." | ||
| 419 | (interactive | ||
| 420 | (list current-prefix-arg | ||
| 421 | (file-name-as-directory | ||
| 422 | (read-file-name "yEnc decode and save in dir: " | ||
| 423 | gnus-uu-default-dir | ||
| 424 | gnus-uu-default-dir)))) | ||
| 425 | (setq gnus-uu-yenc-article-name nil) | ||
| 426 | (gnus-uu-decode-with-method 'gnus-uu-yenc-article n dir nil t)) | ||
| 427 | |||
| 415 | (defun gnus-uu-decode-uu-view (&optional n) | 428 | (defun gnus-uu-decode-uu-view (&optional n) |
| 416 | "Uudecodes and views the current article." | 429 | "Uudecodes and views the current article." |
| 417 | (interactive "P") | 430 | (interactive "P") |
| @@ -1016,6 +1029,39 @@ When called interactively, prompt for REGEXP." | |||
| 1016 | (cons gnus-uu-binhex-article-name state) | 1029 | (cons gnus-uu-binhex-article-name state) |
| 1017 | state))) | 1030 | state))) |
| 1018 | 1031 | ||
| 1032 | ;; yEnc | ||
| 1033 | |||
| 1034 | (defun gnus-uu-yenc-article (buffer in-state) | ||
| 1035 | (save-excursion | ||
| 1036 | (set-buffer gnus-original-article-buffer) | ||
| 1037 | (widen) | ||
| 1038 | (let ((file-name (yenc-extract-filename)) | ||
| 1039 | state start-char) | ||
| 1040 | (when (not file-name) | ||
| 1041 | (setq state (list 'wrong-type))) | ||
| 1042 | |||
| 1043 | (if (memq 'wrong-type state) | ||
| 1044 | () | ||
| 1045 | (when (yenc-first-part-p) | ||
| 1046 | (setq gnus-uu-yenc-article-name | ||
| 1047 | (expand-file-name file-name gnus-uu-work-dir)) | ||
| 1048 | (push 'begin state)) | ||
| 1049 | (when (yenc-last-part-p) | ||
| 1050 | (push 'end state)) | ||
| 1051 | (unless state | ||
| 1052 | (push 'middle state)) | ||
| 1053 | (mm-with-unibyte-buffer | ||
| 1054 | (insert-buffer gnus-original-article-buffer) | ||
| 1055 | (yenc-decode-region (point-min) (point-max)) | ||
| 1056 | (when (and (member 'begin state) | ||
| 1057 | (file-exists-p gnus-uu-yenc-article-name)) | ||
| 1058 | (delete-file gnus-uu-yenc-article-name)) | ||
| 1059 | (mm-append-to-file (point-min) (point-max) | ||
| 1060 | gnus-uu-yenc-article-name))) | ||
| 1061 | (if (memq 'begin state) | ||
| 1062 | (cons file-name state) | ||
| 1063 | state)))) | ||
| 1064 | |||
| 1019 | ;; PostScript | 1065 | ;; PostScript |
| 1020 | 1066 | ||
| 1021 | (defun gnus-uu-decode-postscript-article (process-buffer in-state) | 1067 | (defun gnus-uu-decode-postscript-article (process-buffer in-state) |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 74d596ae761..bd96e52d65f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -3521,15 +3521,16 @@ that that variable is buffer-local to the summary buffers." | |||
| 3521 | (nth 1 method)))) | 3521 | (nth 1 method)))) |
| 3522 | method))) | 3522 | method))) |
| 3523 | 3523 | ||
| 3524 | (defsubst gnus-method-to-server (method) | 3524 | (defsubst gnus-method-to-server (method &optional nocache) |
| 3525 | (catch 'server-name | 3525 | (catch 'server-name |
| 3526 | (setq method (or method gnus-select-method)) | 3526 | (setq method (or method gnus-select-method)) |
| 3527 | 3527 | ||
| 3528 | ;; Perhaps it is already in the cache. | 3528 | ;; Perhaps it is already in the cache. |
| 3529 | (mapc (lambda (name-method) | 3529 | (unless nocache |
| 3530 | (if (equal (cdr name-method) method) | 3530 | (mapc (lambda (name-method) |
| 3531 | (throw 'server-name (car name-method)))) | 3531 | (if (equal (cdr name-method) method) |
| 3532 | gnus-server-method-cache) | 3532 | (throw 'server-name (car name-method)))) |
| 3533 | gnus-server-method-cache)) | ||
| 3533 | 3534 | ||
| 3534 | (mapc | 3535 | (mapc |
| 3535 | (lambda (server-alist) | 3536 | (lambda (server-alist) |
| @@ -4254,14 +4255,16 @@ Allow completion over sensible values." | |||
| 4254 | 4255 | ||
| 4255 | ;;; Agent functions | 4256 | ;;; Agent functions |
| 4256 | 4257 | ||
| 4257 | (defun gnus-agent-method-p (method) | 4258 | (defun gnus-agent-method-p (method-or-server) |
| 4258 | "Say whether METHOD is covered by the agent." | 4259 | "Say whether METHOD is covered by the agent." |
| 4259 | (or (eq (car gnus-agent-method-p-cache) method) | 4260 | (or (eq (car gnus-agent-method-p-cache) method-or-server) |
| 4260 | (setq gnus-agent-method-p-cache | 4261 | (let* ((method (if (stringp method-or-server) |
| 4261 | (cons method | 4262 | (gnus-server-to-method method-or-server) |
| 4262 | (member (if (stringp method) | 4263 | method-or-server)) |
| 4263 | method | 4264 | (server (gnus-method-to-server method t))) |
| 4264 | (gnus-method-to-server method)) gnus-agent-covered-methods)))) | 4265 | (setq gnus-agent-method-p-cache |
| 4266 | (cons method-or-server | ||
| 4267 | (member server gnus-agent-covered-methods))))) | ||
| 4265 | (cdr gnus-agent-method-p-cache)) | 4268 | (cdr gnus-agent-method-p-cache)) |
| 4266 | 4269 | ||
| 4267 | (defun gnus-online (method) | 4270 | (defun gnus-online (method) |
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 2e724163edb..39595b767ad 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el | |||
| @@ -58,15 +58,16 @@ | |||
| 58 | (list 'const (car a))) | 58 | (list 'const (car a))) |
| 59 | imap-stream-alist))) | 59 | imap-stream-alist))) |
| 60 | 60 | ||
| 61 | (defcustom mail-sources nil | 61 | (defcustom mail-sources '((file)) |
| 62 | "*Where the mail backends will look for incoming mail. | 62 | "Where the mail backends will look for incoming mail. |
| 63 | This variable is a list of mail source specifiers. | 63 | This variable is a list of mail source specifiers. |
| 64 | See Info node `(gnus)Mail Source Specifiers'." | 64 | See Info node `(gnus)Mail Source Specifiers'." |
| 65 | :group 'mail-source | 65 | :group 'mail-source |
| 66 | :version "23.0" ;; No Gnus | ||
| 66 | :link '(custom-manual "(gnus)Mail Source Specifiers") | 67 | :link '(custom-manual "(gnus)Mail Source Specifiers") |
| 67 | :type `(choice | 68 | :type `(choice |
| 68 | (const nil) | 69 | (const :tag "None" nil) |
| 69 | (repeat | 70 | (repeat :tag "List" |
| 70 | (choice :format "%[Value Menu%] %v" | 71 | (choice :format "%[Value Menu%] %v" |
| 71 | :value (file) | 72 | :value (file) |
| 72 | (cons :tag "Spool file" | 73 | (cons :tag "Spool file" |
diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 6839a6472b7..063b2ec2f44 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el | |||
| @@ -33,8 +33,14 @@ | |||
| 33 | ;;; Code: | 33 | ;;; Code: |
| 34 | 34 | ||
| 35 | (eval-when-compile (require 'cl)) | 35 | (eval-when-compile (require 'cl)) |
| 36 | (require 'mail-parse) | 36 | (autoload 'mail-header-parse-content-type "mail-parse") |
| 37 | (require 'mm-util) | 37 | |
| 38 | ;; `mm-delete-duplicates' is an alias for `delete-dups' in Emacs 22. | ||
| 39 | (defalias 'mailcap-delete-duplicates | ||
| 40 | (if (fboundp 'delete-dups) | ||
| 41 | 'delete-dups | ||
| 42 | (autoload 'mm-delete-duplicates "mm-util") | ||
| 43 | 'mm-delete-duplicates)) | ||
| 38 | 44 | ||
| 39 | (defgroup mailcap nil | 45 | (defgroup mailcap nil |
| 40 | "Definition of viewers for MIME types." | 46 | "Definition of viewers for MIME types." |
| @@ -722,7 +728,7 @@ If TEST is not given, it defaults to t." | |||
| 722 | t) | 728 | t) |
| 723 | (t nil)))) | 729 | (t nil)))) |
| 724 | 730 | ||
| 725 | (defun mailcap-mime-info (string &optional request) | 731 | (defun mailcap-mime-info (string &optional request no-decode) |
| 726 | "Get the MIME viewer command for STRING, return nil if none found. | 732 | "Get the MIME viewer command for STRING, return nil if none found. |
| 727 | Expects a complete content-type header line as its argument. | 733 | Expects a complete content-type header line as its argument. |
| 728 | 734 | ||
| @@ -732,7 +738,11 @@ entry) will be returned. If it is a string, then the mailcap field | |||
| 732 | corresponding to that string will be returned (print, description, | 738 | corresponding to that string will be returned (print, description, |
| 733 | whatever). If a number, then all the information for this specific | 739 | whatever). If a number, then all the information for this specific |
| 734 | viewer is returned. If `all', then all possible viewers for | 740 | viewer is returned. If `all', then all possible viewers for |
| 735 | this type is returned." | 741 | this type is returned. |
| 742 | |||
| 743 | If NO-DECODE is non-nil, don't decode STRING." | ||
| 744 | ;; NO-DECODE avoids calling `mail-header-parse-content-type' from | ||
| 745 | ;; `mail-parse.el' | ||
| 736 | (let ( | 746 | (let ( |
| 737 | major ; Major encoding (text, etc) | 747 | major ; Major encoding (text, etc) |
| 738 | minor ; Minor encoding (html, etc) | 748 | minor ; Minor encoding (html, etc) |
| @@ -746,7 +756,10 @@ this type is returned." | |||
| 746 | viewer ; The one and only viewer | 756 | viewer ; The one and only viewer |
| 747 | ctl) | 757 | ctl) |
| 748 | (save-excursion | 758 | (save-excursion |
| 749 | (setq ctl (mail-header-parse-content-type (or string "text/plain"))) | 759 | (setq ctl |
| 760 | (if no-decode | ||
| 761 | (list (or string "text/plain")) | ||
| 762 | (mail-header-parse-content-type (or string "text/plain")))) | ||
| 750 | (setq major (split-string (car ctl) "/")) | 763 | (setq major (split-string (car ctl) "/")) |
| 751 | (setq minor (cadr major) | 764 | (setq minor (cadr major) |
| 752 | major (car major)) | 765 | major (car major)) |
| @@ -766,7 +779,7 @@ this type is returned." | |||
| 766 | (setq viewer (car passed))) | 779 | (setq viewer (car passed))) |
| 767 | (cond | 780 | (cond |
| 768 | ((and (null viewer) (not (equal major "default")) request) | 781 | ((and (null viewer) (not (equal major "default")) request) |
| 769 | (mailcap-mime-info "default" request)) | 782 | (mailcap-mime-info "default" request no-decode)) |
| 770 | ((or (null request) (equal request "")) | 783 | ((or (null request) (equal request "")) |
| 771 | (mailcap-unescape-mime-test (cdr (assq 'viewer viewer)) info)) | 784 | (mailcap-unescape-mime-test (cdr (assq 'viewer viewer)) info)) |
| 772 | ((stringp request) | 785 | ((stringp request) |
| @@ -976,7 +989,7 @@ If FORCE, re-parse even if already parsed." | |||
| 976 | (defun mailcap-mime-types () | 989 | (defun mailcap-mime-types () |
| 977 | "Return a list of MIME media types." | 990 | "Return a list of MIME media types." |
| 978 | (mailcap-parse-mimetypes) | 991 | (mailcap-parse-mimetypes) |
| 979 | (mm-delete-duplicates | 992 | (mailcap-delete-duplicates |
| 980 | (nconc | 993 | (nconc |
| 981 | (mapcar 'cdr mailcap-mime-extensions) | 994 | (mapcar 'cdr mailcap-mime-extensions) |
| 982 | (apply | 995 | (apply |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 4fc0ee1a5b6..3aaa8c25745 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -273,7 +273,7 @@ included. Organization and User-Agent are optional." | |||
| 273 | :link '(custom-manual "(message)Mail Headers") | 273 | :link '(custom-manual "(message)Mail Headers") |
| 274 | :type 'regexp) | 274 | :type 'regexp) |
| 275 | 275 | ||
| 276 | (defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|^X-Payment:\\|^Approved:" | 276 | (defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-ID:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:\\|^X-Hashcash:\\|^X-Payment:\\|^Approved:" |
| 277 | "*Header lines matching this regexp will be deleted before posting. | 277 | "*Header lines matching this regexp will be deleted before posting. |
| 278 | It's best to delete old Path and Date headers before posting to avoid | 278 | It's best to delete old Path and Date headers before posting to avoid |
| 279 | any confusion." | 279 | any confusion." |
| @@ -588,21 +588,21 @@ Done before generating the new subject of a forward." | |||
| 588 | :type 'regexp) | 588 | :type 'regexp) |
| 589 | 589 | ||
| 590 | (defcustom message-cite-prefix-regexp | 590 | (defcustom message-cite-prefix-regexp |
| 591 | (if (string-match "[[:digit:]]" "1") ;; support POSIX? | 591 | (if (string-match "[[:digit:]]" "1") |
| 592 | "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>|}+]\\)+" | 592 | ;; Support POSIX? XEmacs 21.5.27 doesn't. |
| 593 | "\\([ \t]*[_.[:word:]]+>+\\|[ \t]*[]>|}]\\)+" | ||
| 593 | ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. | 594 | ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. |
| 594 | (let (non-word-constituents) | 595 | (let (non-word-constituents) |
| 595 | (with-syntax-table text-mode-syntax-table | 596 | (with-syntax-table text-mode-syntax-table |
| 596 | (setq non-word-constituents | 597 | (setq non-word-constituents |
| 597 | (concat | 598 | (concat |
| 598 | (if (string-match "\\w" "-") "" "-") | ||
| 599 | (if (string-match "\\w" "_") "" "_") | 599 | (if (string-match "\\w" "_") "" "_") |
| 600 | (if (string-match "\\w" ".") "" ".")))) | 600 | (if (string-match "\\w" ".") "" ".")))) |
| 601 | (if (equal non-word-constituents "") | 601 | (if (equal non-word-constituents "") |
| 602 | "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}+]\\)+" | 602 | "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}]\\)+" |
| 603 | (concat "\\([ \t]*\\(\\w\\|[" | 603 | (concat "\\([ \t]*\\(\\w\\|[" |
| 604 | non-word-constituents | 604 | non-word-constituents |
| 605 | "]\\)+>+\\|[ \t]*[]>|}+]\\)+")))) | 605 | "]\\)+>+\\|[ \t]*[]>|}]\\)+")))) |
| 606 | "*Regexp matching the longest possible citation prefix on a line." | 606 | "*Regexp matching the longest possible citation prefix on a line." |
| 607 | :version "22.1" | 607 | :version "22.1" |
| 608 | :group 'message-insertion | 608 | :group 'message-insertion |
| @@ -5559,7 +5559,9 @@ subscribed address (and not the additional To and Cc header contents)." | |||
| 5559 | (mapcar 'downcase | 5559 | (mapcar 'downcase |
| 5560 | (mapcar | 5560 | (mapcar |
| 5561 | 'car (mail-header-parse-addresses field)))))) | 5561 | 'car (mail-header-parse-addresses field)))))) |
| 5562 | (setq ace (downcase (idna-to-ascii rhs))) | 5562 | (setq ace (if (string-match "\\`[[:ascii:]]+\\'" rhs) |
| 5563 | rhs | ||
| 5564 | (downcase (idna-to-ascii rhs)))) | ||
| 5563 | (when (and (not (equal rhs ace)) | 5565 | (when (and (not (equal rhs ace)) |
| 5564 | (or (not (eq message-use-idna 'ask)) | 5566 | (or (not (eq message-use-idna 'ask)) |
| 5565 | (y-or-n-p (format "Replace %s with %s in %s:? " | 5567 | (y-or-n-p (format "Replace %s with %s in %s:? " |
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 18ff2ae0838..52d47b728ef 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el | |||
| @@ -272,7 +272,7 @@ If PROPERTIES is non-nil, PROPERTIES are applied to the buffer, | |||
| 272 | see `set-text-properties'. If PROPERTIES equals t, this means to | 272 | see `set-text-properties'. If PROPERTIES equals t, this means to |
| 273 | apply the face `mm-uu-extract'." | 273 | apply the face `mm-uu-extract'." |
| 274 | (let ((obuf (current-buffer)) | 274 | (let ((obuf (current-buffer)) |
| 275 | (coding-system | 275 | (coding-system |
| 276 | ;; Might not exist in non-MULE XEmacs | 276 | ;; Might not exist in non-MULE XEmacs |
| 277 | (when (boundp 'buffer-file-coding-system) | 277 | (when (boundp 'buffer-file-coding-system) |
| 278 | buffer-file-coding-system))) | 278 | buffer-file-coding-system))) |
| @@ -428,7 +428,12 @@ apply the face `mm-uu-extract'." | |||
| 428 | (cons 'filename file-name))))) | 428 | (cons 'filename file-name))))) |
| 429 | 429 | ||
| 430 | (defun mm-uu-yenc-extract () | 430 | (defun mm-uu-yenc-extract () |
| 431 | (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) | 431 | ;; This might not be exactly correct, but we sure can't get the |
| 432 | ;; binary data from the article buffer, since that's already in a | ||
| 433 | ;; non-binary charset. So get it from the original article buffer. | ||
| 434 | (mm-make-handle (save-excursion | ||
| 435 | (set-buffer gnus-original-article-buffer) | ||
| 436 | (mm-uu-copy-to-buffer start-point end-point)) | ||
| 432 | (list (or (and file-name | 437 | (list (or (and file-name |
| 433 | (string-match "\\.[^\\.]+$" file-name) | 438 | (string-match "\\.[^\\.]+$" file-name) |
| 434 | (mailcap-extension-to-mime | 439 | (mailcap-extension-to-mime |
diff --git a/lisp/gnus/nnkiboze.el b/lisp/gnus/nnkiboze.el index 78e35c410bb..06acca8c09d 100644 --- a/lisp/gnus/nnkiboze.el +++ b/lisp/gnus/nnkiboze.el | |||
| @@ -198,8 +198,7 @@ | |||
| 198 | "\"Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups\". | 198 | "\"Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups\". |
| 199 | Finds out what articles are to be part of the nnkiboze groups." | 199 | Finds out what articles are to be part of the nnkiboze groups." |
| 200 | (interactive) | 200 | (interactive) |
| 201 | (let ((nnmail-spool-file nil) | 201 | (let ((mail-sources nil) |
| 202 | (mail-sources nil) | ||
| 203 | (gnus-use-dribble-file nil) | 202 | (gnus-use-dribble-file nil) |
| 204 | (gnus-read-active-file t) | 203 | (gnus-read-active-file t) |
| 205 | (gnus-expert-user t)) | 204 | (gnus-expert-user t)) |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 8ff6d1d1459..e05c286b1ab 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -240,16 +240,11 @@ If non-nil, also update the cache when copy or move articles." | |||
| 240 | :group 'nnmail | 240 | :group 'nnmail |
| 241 | :type 'boolean) | 241 | :type 'boolean) |
| 242 | 242 | ||
| 243 | (defcustom nnmail-spool-file '((file)) | ||
| 244 | "*Where the mail backends will look for incoming mail. | ||
| 245 | This variable is a list of mail source specifiers. | ||
| 246 | This variable is obsolete; `mail-sources' should be used instead." | ||
| 247 | :group 'nnmail-files | ||
| 248 | :type 'sexp) | ||
| 249 | (make-obsolete-variable 'nnmail-spool-file | 243 | (make-obsolete-variable 'nnmail-spool-file |
| 250 | "This option is obsolete in Gnus 5.9. \ | 244 | "This option is obsolete in Gnus 5.9. \ |
| 251 | Use `mail-sources' instead.") | 245 | Use `mail-sources' instead.") |
| 252 | ;; revision 5.29 / p0-85 / Gnus 5.9 | 246 | ;; revision 5.29 / p0-85 / Gnus 5.9 |
| 247 | ;; Variable removed in No Gnus v0.7 | ||
| 253 | 248 | ||
| 254 | (defcustom nnmail-resplit-incoming nil | 249 | (defcustom nnmail-resplit-incoming nil |
| 255 | "*If non-nil, re-split incoming procmail sorted mail." | 250 | "*If non-nil, re-split incoming procmail sorted mail." |
| @@ -1765,10 +1760,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." | |||
| 1765 | (defun nnmail-get-new-mail (method exit-func temp | 1760 | (defun nnmail-get-new-mail (method exit-func temp |
| 1766 | &optional group spool-func) | 1761 | &optional group spool-func) |
| 1767 | "Read new incoming mail." | 1762 | "Read new incoming mail." |
| 1768 | (let* ((sources (or mail-sources | 1763 | (let* ((sources mail-sources) |
| 1769 | (if (listp nnmail-spool-file) | ||
| 1770 | nnmail-spool-file | ||
| 1771 | (list nnmail-spool-file)))) | ||
| 1772 | fetching-sources | 1764 | fetching-sources |
| 1773 | (group-in group) | 1765 | (group-in group) |
| 1774 | (i 0) | 1766 | (i 0) |
| @@ -1778,20 +1770,6 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." | |||
| 1778 | (when (and (nnmail-get-value "%s-get-new-mail" method) | 1770 | (when (and (nnmail-get-value "%s-get-new-mail" method) |
| 1779 | sources) | 1771 | sources) |
| 1780 | (while (setq source (pop sources)) | 1772 | (while (setq source (pop sources)) |
| 1781 | ;; Be compatible with old values. | ||
| 1782 | (cond | ||
| 1783 | ((stringp source) | ||
| 1784 | (setq source | ||
| 1785 | (cond | ||
| 1786 | ((string-match "^po:" source) | ||
| 1787 | (list 'pop :user (substring source (match-end 0)))) | ||
| 1788 | ((file-directory-p source) | ||
| 1789 | (list 'directory :path source)) | ||
| 1790 | (t | ||
| 1791 | (list 'file :path source))))) | ||
| 1792 | ((eq source 'procmail) | ||
| 1793 | (message "Invalid value for nnmail-spool-file: `procmail'") | ||
| 1794 | nil)) | ||
| 1795 | ;; Hack to only fetch the contents of a single group's spool file. | 1773 | ;; Hack to only fetch the contents of a single group's spool file. |
| 1796 | (when (and (eq (car source) 'directory) | 1774 | (when (and (eq (car source) 'directory) |
| 1797 | (null nnmail-scan-directory-mail-source-once) | 1775 | (null nnmail-scan-directory-mail-source-once) |
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 3ef8af0f10b..55d60ae3fb7 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el | |||
| @@ -99,6 +99,40 @@ quoted-printable and base64 respectively.") | |||
| 99 | (defvar rfc2047-encode-encoded-words t | 99 | (defvar rfc2047-encode-encoded-words t |
| 100 | "Whether encoded words should be encoded again.") | 100 | "Whether encoded words should be encoded again.") |
| 101 | 101 | ||
| 102 | (defvar rfc2047-allow-irregular-q-encoded-words t | ||
| 103 | "*Whether to decode irregular Q-encoded words.") | ||
| 104 | |||
| 105 | (eval-and-compile ;; Necessary to hard code them in `rfc2047-decode-region'. | ||
| 106 | (defconst rfc2047-encoded-word-regexp | ||
| 107 | "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\ | ||
| 108 | \\(B\\?[+/0-9A-Za-z]*=*\ | ||
| 109 | \\|Q\\?[ ->@-~]*\ | ||
| 110 | \\)\\?=" | ||
| 111 | "Regexp that matches encoded word." | ||
| 112 | ;; The patterns for the B encoding and the Q encoding, i.e. the ones | ||
| 113 | ;; beginning with "B" and "Q" respectively, are restricted into only | ||
| 114 | ;; the characters that those encodings may generally use. | ||
| 115 | ) | ||
| 116 | (defconst rfc2047-encoded-word-regexp-loose | ||
| 117 | "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\ | ||
| 118 | \\(B\\?[+/0-9A-Za-z]*=*\ | ||
| 119 | \\|Q\\?\\(?:\\?+[ -<>@-~]\\)?\\(?:[ ->@-~]+\\?+[ -<>@-~]\\)*[ ->@-~]*\\?*\ | ||
| 120 | \\)\\?=" | ||
| 121 | "Regexp that matches encoded word allowing loose Q encoding." | ||
| 122 | ;; The pattern for the Q encoding, i.e. the one beginning with "Q", | ||
| 123 | ;; is similar to: | ||
| 124 | ;; "Q\\?\\(\\?+[^\n=?]\\)?\\([^\n?]+\\?+[^\n=?]\\)*[^\n?]*\\?*" | ||
| 125 | ;; <--------1-------><----------2,3----------><--4--><-5-> | ||
| 126 | ;; They mean: | ||
| 127 | ;; 1. After "Q?", allow "?"s that follow a character other than "=". | ||
| 128 | ;; 2. Allow "=" after "Q?"; it isn't regarded as the terminator. | ||
| 129 | ;; 3. In the middle of an encoded word, allow "?"s that follow a | ||
| 130 | ;; character other than "=". | ||
| 131 | ;; 4. Allow any characters other than "?" in the middle of an | ||
| 132 | ;; encoded word. | ||
| 133 | ;; 5. At the end, allow "?"s. | ||
| 134 | )) | ||
| 135 | |||
| 102 | ;;; | 136 | ;;; |
| 103 | ;;; Functions for encoding RFC2047 messages | 137 | ;;; Functions for encoding RFC2047 messages |
| 104 | ;;; | 138 | ;;; |
| @@ -295,7 +329,7 @@ The buffer may be narrowed." | |||
| 295 | (goto-char (point-min)) | 329 | (goto-char (point-min)) |
| 296 | (or (and rfc2047-encode-encoded-words | 330 | (or (and rfc2047-encode-encoded-words |
| 297 | (prog1 | 331 | (prog1 |
| 298 | (search-forward "=?" nil t) | 332 | (re-search-forward rfc2047-encoded-word-regexp nil t) |
| 299 | (goto-char (point-min)))) | 333 | (goto-char (point-min)))) |
| 300 | (and charsets | 334 | (and charsets |
| 301 | (not (equal charsets (list (car message-posting-charset)))))))) | 335 | (not (equal charsets (list (car message-posting-charset)))))))) |
| @@ -530,10 +564,19 @@ By default, the string is treated as containing addresses (see | |||
| 530 | (rfc2047-encode-region (point-min) (point-max)) | 564 | (rfc2047-encode-region (point-min) (point-max)) |
| 531 | (buffer-string))) | 565 | (buffer-string))) |
| 532 | 566 | ||
| 567 | ;; From RFC 2047: | ||
| 568 | ;; 2. Syntax of encoded-words | ||
| 569 | ;; [...] | ||
| 570 | ;; While there is no limit to the length of a multiple-line header | ||
| 571 | ;; field, each line of a header field that contains one or more | ||
| 572 | ;; 'encoded-word's is limited to 76 characters. | ||
| 573 | ;; | ||
| 574 | ;; In `rfc2047-encode-parameter' it is bound to nil, so don't defconst it. | ||
| 533 | (defvar rfc2047-encode-max-chars 76 | 575 | (defvar rfc2047-encode-max-chars 76 |
| 534 | "Maximum characters of each header line that contain encoded-words. | 576 | "Maximum characters of each header line that contain encoded-words. |
| 535 | If it is nil, encoded-words will not be folded. Too small value may | 577 | According to RFC 2047, it is 76. If it is nil, encoded-words |
| 536 | cause an error. Don't change this for no particular reason.") | 578 | will not be folded. Too small value may cause an error. You |
| 579 | should not change this value.") | ||
| 537 | 580 | ||
| 538 | (defun rfc2047-encode-1 (column string cs encoder start crest tail | 581 | (defun rfc2047-encode-1 (column string cs encoder start crest tail |
| 539 | &optional eword) | 582 | &optional eword) |
| @@ -824,11 +867,6 @@ it, put the following line in your ~/.gnus.el file: | |||
| 824 | ;;; Functions for decoding RFC2047 messages | 867 | ;;; Functions for decoding RFC2047 messages |
| 825 | ;;; | 868 | ;;; |
| 826 | 869 | ||
| 827 | (eval-and-compile | ||
| 828 | (defconst rfc2047-encoded-word-regexp | ||
| 829 | "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\ | ||
| 830 | \\?\\(B\\|Q\\)\\?\\([!->@-~ ]*\\)\\?=")) | ||
| 831 | |||
| 832 | (defvar rfc2047-quote-decoded-words-containing-tspecials nil | 870 | (defvar rfc2047-quote-decoded-words-containing-tspecials nil |
| 833 | "If non-nil, quote decoded words containing special characters.") | 871 | "If non-nil, quote decoded words containing special characters.") |
| 834 | 872 | ||
| @@ -947,10 +985,12 @@ If ADDRESS-MIME is non-nil, strip backslashes which precede characters | |||
| 947 | other than `\"' and `\\' in quoted strings." | 985 | other than `\"' and `\\' in quoted strings." |
| 948 | (interactive "r") | 986 | (interactive "r") |
| 949 | (let ((case-fold-search t) | 987 | (let ((case-fold-search t) |
| 950 | (eword-regexp (eval-when-compile | 988 | (eword-regexp |
| 951 | ;; Ignore whitespace between encoded-words. | 989 | (if rfc2047-allow-irregular-q-encoded-words |
| 952 | (concat "[\n\t ]*\\(" rfc2047-encoded-word-regexp | 990 | (eval-when-compile |
| 953 | "\\)"))) | 991 | (concat "[\n\t ]*\\(" rfc2047-encoded-word-regexp-loose "\\)")) |
| 992 | (eval-when-compile | ||
| 993 | (concat "[\n\t ]*\\(" rfc2047-encoded-word-regexp "\\)")))) | ||
| 954 | b e match words) | 994 | b e match words) |
| 955 | (save-excursion | 995 | (save-excursion |
| 956 | (save-restriction | 996 | (save-restriction |
| @@ -966,7 +1006,7 @@ other than `\"' and `\\' in quoted strings." | |||
| 966 | (while match | 1006 | (while match |
| 967 | (push (list (match-string 2) ;; charset | 1007 | (push (list (match-string 2) ;; charset |
| 968 | (char-after (match-beginning 3)) ;; encoding | 1008 | (char-after (match-beginning 3)) ;; encoding |
| 969 | (match-string 4) ;; encoded-text | 1009 | (substring (match-string 3) 2) ;; encoded-text |
| 970 | (match-string 1)) ;; encoded-word | 1010 | (match-string 1)) ;; encoded-word |
| 971 | words) | 1011 | words) |
| 972 | ;; Look for the subsequent encoded-words. | 1012 | ;; Look for the subsequent encoded-words. |
diff --git a/lisp/gnus/yenc.el b/lisp/gnus/yenc.el index 7550186b35e..7843f6a9aa0 100644 --- a/lisp/gnus/yenc.el +++ b/lisp/gnus/yenc.el | |||
| @@ -55,6 +55,25 @@ | |||
| 55 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | 55 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
| 56 | 208 209 210 211 212 213]) | 56 | 208 209 210 211 212 213]) |
| 57 | 57 | ||
| 58 | (defun yenc-first-part-p () | ||
| 59 | "Say whether the buffer contains the first part of a yEnc file." | ||
| 60 | (save-excursion | ||
| 61 | (goto-char (point-min)) | ||
| 62 | (re-search-forward "^=ybegin part=1 " nil t))) | ||
| 63 | |||
| 64 | (defun yenc-last-part-p () | ||
| 65 | "Say whether the buffer contains the last part of a yEnc file." | ||
| 66 | (save-excursion | ||
| 67 | (goto-char (point-min)) | ||
| 68 | (let (total-size end-size) | ||
| 69 | (when (re-search-forward "^=ybegin.*size=\\([0-9]+\\)" nil t) | ||
| 70 | (setq total-size (match-string 1))) | ||
| 71 | (when (re-search-forward "^=ypart.*end=\\([0-9]+\\)" nil t) | ||
| 72 | (setq end-size (match-string 1))) | ||
| 73 | (and total-size | ||
| 74 | end-size | ||
| 75 | (string= total-size end-size))))) | ||
| 76 | |||
| 58 | ;;;###autoload | 77 | ;;;###autoload |
| 59 | (defun yenc-decode-region (start end) | 78 | (defun yenc-decode-region (start end) |
| 60 | "Yenc decode region between START and END using an internal decoder." | 79 | "Yenc decode region between START and END using an internal decoder." |
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 4e8535ab2a9..8e41c68720b 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el | |||
| @@ -1533,10 +1533,11 @@ or 'unseen. The IMAP command tag is returned." | |||
| 1533 | (imap-send-command (list "STATUS \"" | 1533 | (imap-send-command (list "STATUS \"" |
| 1534 | (imap-utf7-encode mailbox) | 1534 | (imap-utf7-encode mailbox) |
| 1535 | "\" " | 1535 | "\" " |
| 1536 | (format "%s" | 1536 | (upcase |
| 1537 | (if (listp items) | 1537 | (format "%s" |
| 1538 | items | 1538 | (if (listp items) |
| 1539 | (list items))))))) | 1539 | items |
| 1540 | (list items)))))))) | ||
| 1540 | 1541 | ||
| 1541 | (defun imap-mailbox-acl-get (&optional mailbox buffer) | 1542 | (defun imap-mailbox-acl-get (&optional mailbox buffer) |
| 1542 | "Get ACL on mailbox from server in BUFFER." | 1543 | "Get ACL on mailbox from server in BUFFER." |
| @@ -2524,7 +2525,7 @@ Return nil if no complete line has arrived." | |||
| 2524 | (while (and (not (eq (char-after) ?\))) | 2525 | (while (and (not (eq (char-after) ?\))) |
| 2525 | (or (forward-char) t) | 2526 | (or (forward-char) t) |
| 2526 | (looking-at "\\([A-Za-z]+\\) ")) | 2527 | (looking-at "\\([A-Za-z]+\\) ")) |
| 2527 | (let ((token (match-string 1))) | 2528 | (let ((token (upcase (match-string 1)))) |
| 2528 | (goto-char (match-end 0)) | 2529 | (goto-char (match-end 0)) |
| 2529 | (cond ((string= token "MESSAGES") | 2530 | (cond ((string= token "MESSAGES") |
| 2530 | (imap-mailbox-put 'messages (read (current-buffer)) mailbox)) | 2531 | (imap-mailbox-put 'messages (read (current-buffer)) mailbox)) |
diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 104cb991254..594212923c2 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el | |||
| @@ -85,26 +85,93 @@ and `gnutls-cli' (version 2.0.1) output." | |||
| 85 | Each entry in the list is tried until a connection is successful. | 85 | Each entry in the list is tried until a connection is successful. |
| 86 | %h is replaced with server hostname, %p with port to connect to. | 86 | %h is replaced with server hostname, %p with port to connect to. |
| 87 | The program should read input on stdin and write output to | 87 | The program should read input on stdin and write output to |
| 88 | stdout. Also see `tls-success' for what the program should output | 88 | stdout. |
| 89 | after successful negotiation." | 89 | |
| 90 | :type '(repeat string) | 90 | See `tls-checktrust' on how to check trusted root certs. |
| 91 | |||
| 92 | Also see `tls-success' for what the program should output after | ||
| 93 | successful negotiation." | ||
| 94 | :type | ||
| 95 | '(choice | ||
| 96 | (list :tag "Choose commands" | ||
| 97 | :value | ||
| 98 | ("gnutls-cli -p %p %h" | ||
| 99 | "gnutls-cli -p %p %h --protocols ssl3" | ||
| 100 | "openssl s_client -connect %h:%p -no_ssl2") | ||
| 101 | (set :inline t | ||
| 102 | ;; FIXME: add brief `:tag "..."' descriptions. | ||
| 103 | ;; (repeat :inline t :tag "Other" (string)) | ||
| 104 | ;; See `tls-checktrust': | ||
| 105 | (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h") | ||
| 106 | (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3") | ||
| 107 | (const "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2") | ||
| 108 | ;; No trust check: | ||
| 109 | (const "gnutls-cli -p %p %h") | ||
| 110 | (const "gnutls-cli -p %p %h --protocols ssl3") | ||
| 111 | (const "openssl s_client -connect %h:%p -no_ssl2")) | ||
| 112 | (repeat :inline t :tag "Other" (string))) | ||
| 113 | (const :tag "Default list of commands" | ||
| 114 | ("gnutls-cli -p %p %h" | ||
| 115 | "gnutls-cli -p %p %h --protocols ssl3" | ||
| 116 | "openssl s_client -connect %h:%p -no_ssl2")) | ||
| 117 | (list :tag "List of commands" | ||
| 118 | (repeat :tag "Command" (string)))) | ||
| 91 | :version "22.1" | 119 | :version "22.1" |
| 92 | :group 'tls) | 120 | :group 'tls) |
| 93 | 121 | ||
| 94 | (defcustom tls-process-connection-type nil | 122 | (defcustom tls-process-connection-type nil |
| 95 | "*Value for `process-connection-type' to use when starting TLS process." | 123 | "Value for `process-connection-type' to use when starting TLS process." |
| 96 | :version "22.1" | 124 | :version "22.1" |
| 97 | :type 'boolean | 125 | :type 'boolean |
| 98 | :group 'tls) | 126 | :group 'tls) |
| 99 | 127 | ||
| 100 | (defcustom tls-success "- Handshake was completed\\|SSL handshake has read " | 128 | (defcustom tls-success "- Handshake was completed\\|SSL handshake has read " |
| 101 | "*Regular expression indicating completed TLS handshakes. | 129 | "Regular expression indicating completed TLS handshakes. |
| 102 | The default is what GNUTLS's \"gnutls-cli\" or OpenSSL's | 130 | The default is what GNUTLS's \"gnutls-cli\" or OpenSSL's |
| 103 | \"openssl s_client\" outputs." | 131 | \"openssl s_client\" outputs." |
| 104 | :version "22.1" | 132 | :version "22.1" |
| 105 | :type 'regexp | 133 | :type 'regexp |
| 106 | :group 'tls) | 134 | :group 'tls) |
| 107 | 135 | ||
| 136 | (defcustom tls-checktrust nil | ||
| 137 | "Indicate if certificates should be checked against trusted root certs. | ||
| 138 | If this is `ask', the user can decide whether to accept an | ||
| 139 | untrusted certificate. You may have to adapt `tls-program' in | ||
| 140 | order to make this feature work properly, i.e., to ensure that | ||
| 141 | the external program knows about the root certificates you | ||
| 142 | consider trustworthy, e.g.: | ||
| 143 | |||
| 144 | \(setq tls-program | ||
| 145 | '(\"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h\" | ||
| 146 | \"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3\" | ||
| 147 | \"openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2\"))" | ||
| 148 | :type '(choice (const :tag "Always" t) | ||
| 149 | (const :tag "Never" nil) | ||
| 150 | (const :tag "Ask" ask)) | ||
| 151 | :version "23.0" ;; No Gnus | ||
| 152 | :group 'tls) | ||
| 153 | |||
| 154 | (defcustom tls-untrusted | ||
| 155 | "- Peer's certificate is NOT trusted\\|Verify return code: \\([^0] \\|.[^ ]\\)" | ||
| 156 | "Regular expression indicating failure of TLS certificate verification. | ||
| 157 | The default is what GNUTLS's \"gnutls-cli\" or OpenSSL's | ||
| 158 | \"openssl s_client\" return in the event of unsuccessful | ||
| 159 | verification." | ||
| 160 | :type 'regexp | ||
| 161 | :version "23.0" ;; No Gnus | ||
| 162 | :group 'tls) | ||
| 163 | |||
| 164 | (defcustom tls-hostmismatch | ||
| 165 | "# The hostname in the certificate does NOT match" | ||
| 166 | "Regular expression indicating a host name mismatch in certificate. | ||
| 167 | When the host name specified in the certificate doesn't match the | ||
| 168 | name of the host you are connecting to, gnutls-cli issues a | ||
| 169 | warning to this effect. There is no such feature in openssl. Set | ||
| 170 | this to nil if you want to ignore host name mismatches." | ||
| 171 | :type 'regexp | ||
| 172 | :version "23.0" ;; No Gnus | ||
| 173 | :group 'tls) | ||
| 174 | |||
| 108 | (defcustom tls-certtool-program (executable-find "certtool") | 175 | (defcustom tls-certtool-program (executable-find "certtool") |
| 109 | "Name of GnuTLS certtool. | 176 | "Name of GnuTLS certtool. |
| 110 | Used by `tls-certificate-information'." | 177 | Used by `tls-certificate-information'." |
| @@ -141,7 +208,7 @@ Returns a subprocess-object to represent the connection. | |||
| 141 | Input and output work as for subprocesses; `delete-process' closes it. | 208 | Input and output work as for subprocesses; `delete-process' closes it. |
| 142 | Args are NAME BUFFER HOST PORT. | 209 | Args are NAME BUFFER HOST PORT. |
| 143 | NAME is name for process. It is modified if necessary to make it unique. | 210 | NAME is name for process. It is modified if necessary to make it unique. |
| 144 | BUFFER is the buffer (or buffer-name) to associate with the process. | 211 | BUFFER is the buffer (or buffer name) to associate with the process. |
| 145 | Process output goes at end of that buffer, unless you specify | 212 | Process output goes at end of that buffer, unless you specify |
| 146 | an output stream or filter function to handle the output. | 213 | an output stream or filter function to handle the output. |
| 147 | BUFFER may be also nil, meaning that this process is not associated | 214 | BUFFER may be also nil, meaning that this process is not associated |
| @@ -177,25 +244,31 @@ Fourth arg PORT is an integer specifying a port to connect to." | |||
| 177 | (sit-for 1))) | 244 | (sit-for 1))) |
| 178 | (message "Opening TLS connection with `%s'...%s" cmd | 245 | (message "Opening TLS connection with `%s'...%s" cmd |
| 179 | (if done "done" "failed")) | 246 | (if done "done" "failed")) |
| 180 | (if (not done) | 247 | (if done |
| 181 | (delete-process process) | 248 | (setq done process) |
| 182 | ;; advance point to after all informational messages that | 249 | (delete-process process)))) |
| 183 | ;; `openssl s_client' and `gnutls' print | 250 | (when done |
| 184 | (let ((start-of-data nil)) | 251 | (save-excursion |
| 185 | (while | 252 | (set-buffer buffer) |
| 186 | (not (setq start-of-data | 253 | (when |
| 187 | ;; the string matching `tls-end-of-info' | 254 | (or |
| 188 | ;; might come in separate chunks from | 255 | (and tls-checktrust |
| 189 | ;; `accept-process-output', so start the | 256 | (progn |
| 190 | ;; search where `tls-success' ended | 257 | (goto-char (point-min)) |
| 191 | (save-excursion | 258 | (re-search-forward tls-untrusted nil t)) |
| 192 | (if (re-search-forward tls-end-of-info nil t) | 259 | (or |
| 193 | (match-end 0))))) | 260 | (and (not (eq tls-checktrust 'ask)) |
| 194 | (accept-process-output process 1)) | 261 | (message "The certificate presented by `%s' is NOT trusted." host)) |
| 195 | (if start-of-data | 262 | (not (yes-or-no-p |
| 196 | ;; move point to start of client data | 263 | (format "The certificate presented by `%s' is NOT trusted. Accept anyway? " host))))) |
| 197 | (goto-char start-of-data))) | 264 | (and tls-hostmismatch |
| 198 | (setq done process)))) | 265 | (progn |
| 266 | (goto-char (point-min)) | ||
| 267 | (re-search-forward tls-hostmismatch nil t)) | ||
| 268 | (not (yes-or-no-p | ||
| 269 | (format "Host name in certificate doesn't match `%s'. Connect anyway? " host))))) | ||
| 270 | (setq done nil) | ||
| 271 | (delete-process process)))) | ||
| 199 | (message "Opening TLS connection to `%s'...%s" | 272 | (message "Opening TLS connection to `%s'...%s" |
| 200 | host (if done "done" "failed"))) | 273 | host (if done "done" "failed"))) |
| 201 | (when use-temp-buffer | 274 | (when use-temp-buffer |