From: Miles Bader Date: Mon, 27 Sep 2004 07:44:44 +0000 (+0000) Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575 X-Git-Tag: ttn-vms-21-2-B4~4793 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4dd4ae8939a407d9fa989ef0abb02f56151fe66;p=emacs.git Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-34 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-35 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-36 Update from CVS --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1148ec5618e..e680b48542c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,46 @@ +2004-09-27 Katsumi Yamaoka + + * mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte. + +2004-09-26 Jesper Harder + + * gnus-msg.el (gnus-post-news): Use blank Newsgroups line if + GROUP is a virtual group. + + * mm-util.el (mm-charset-synonym-alist): Remove obsolete entries + for big5 and gb2312. + + * rfc2047.el (rfc2047-pad-base64): Deal with more cases of invalid + padding. + + * mm-bodies.el (mm-7bit-chars): Don't include \r. + + * mml.el (mml-compute-boundary-1): Don't uncompress files. + + * rfc2047.el (rfc2047-qp-or-base64): New function to reduce + dependencies. + (rfc2047-encode): Use it. + + * flow-fill.el: Typo. + + * mml.el (mml-generate-mime-1): Don't use format=flowed with + inline PGP. + + * gnus.el (gnus-getenv-nntpserver): Strip whitespace. + + * gnus-cache.el (gnus-cache-save-buffers): Check if buffer is + alive. Reported by Laurent Martelli . + + * mm-util.el (mm-image-load-path): Handle nil in load-path. + From Christian Neukirchen . + + * html2text.el (html2text-replace-list): Add & and '. + + * nnheader.el (nnheader-max-head-length): Increase to 8192. + + * message.el (message-clone-locals): Clone sendmail and smtp + variables. + 2004-09-23 Reiner Steib * gnus-msg.el (gnus-configure-posting-styles): Narrow to headers diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el index a22f2a5af07..8a8098727fe 100644 --- a/lisp/gnus/flow-fill.el +++ b/lisp/gnus/flow-fill.el @@ -1,4 +1,4 @@ -;;; flow-fill.el --- interprete RFC2646 "flowed" text +;;; flow-fill.el --- interpret RFC2646 "flowed" text ;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index bc09b3a2368..99e77b18f68 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -125,9 +125,8 @@ it's not cached." (overview-file (gnus-cache-file-name (car gnus-cache-buffer) ".overview"))) ;; write the overview only if it was modified - (when (buffer-modified-p buffer) - (save-excursion - (set-buffer buffer) + (when (and (buffer-live-p buffer) (buffer-modified-p buffer)) + (with-current-buffer buffer (if (> (buffer-size) 0) ;; Non-empty overview, write it to a file. (let ((coding-system-for-write diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 496bce4bf21..33531e7f8a4 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -915,7 +915,9 @@ header line with the old Message-ID." (not to-address))) ;; This is news. (if post - (message-news (or to-group group)) + (message-news + (or to-group + (and (not (gnus-virtual-group-p pgroup)) group))) (set-buffer gnus-article-copy) (gnus-msg-treat-broken-reply-to) (message-followup (if (or newsgroup-p force-news) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 3b7c8c916d8..b12d769718a 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1104,9 +1104,8 @@ Check the NNTPSERVER environment variable and the (and (file-readable-p gnus-nntpserver-file) (with-temp-buffer (insert-file-contents gnus-nntpserver-file) - (let ((name (buffer-string))) - (unless (string-match "\\`[ \t\n]*$" name) - name)))))) + (when (re-search-forward "[^ \t\n\r]+" nil t) + (match-string 0)))))) (defcustom gnus-select-method (condition-case nil diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index f2aefbef993..6f1ef3b0289 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el @@ -1,5 +1,5 @@ ;;; html2text.el --- a simple html to plain text converter -;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Joakim Hove @@ -42,7 +42,8 @@ (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr))) (defvar html2text-replace-list - '((" " . " ") (">" . ">") ("<" . "<") (""" . "\"")) + '((" " . " ") (">" . ">") ("<" . "<") (""" . "\"") + ("&" . "&") ("'" . "'")) "The map of entity to text. This is an alist were each element is a dotted pair consisting of an diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 21c386b86ce..8e5edbc048a 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -6685,7 +6685,7 @@ regexp VARSTR." (let ((locals (save-excursion (set-buffer buffer) (buffer-local-variables))) - (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address")) + (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address")) (mapcar (lambda (local) (when (and (consp local) diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el index 7e95ef3986b..b3148fe04ac 100644 --- a/lisp/gnus/mm-bodies.el +++ b/lisp/gnus/mm-bodies.el @@ -38,9 +38,16 @@ (require 'rfc2047) (require 'mm-encode) -;; 8bit treatment gets any char except: 0x32 - 0x7f, CR, LF, TAB, BEL, +;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL, ;; BS, vertical TAB, form feed, and ^_ -(defvar mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f") +;; +;; Note that CR is *not* included, as that would allow a non-paired CR +;; in the body contrary to RFC 2822: +;; +;; - CR and LF MUST only occur together as CRLF; they MUST NOT +;; appear independently in the body. + +(defvar mm-7bit-chars "\x20-\x7f\n\t\x7\x8\xb\xc\x1f") (defcustom mm-body-charset-encoding-alist '((iso-2022-jp . 7bit) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index ff05393415d..51ec38dc387 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -623,14 +623,14 @@ Postpone undisplaying of viewers for types in "Copy the contents of the current buffer to a fresh buffer." (save-excursion (let ((obuf (current-buffer)) - (multibyte enable-multibyte-characters) beg) (goto-char (point-min)) (search-forward-regexp "^\n" nil t) (setq beg (point)) - (set-buffer (generate-new-buffer " *mm*")) - ;; Preserve the data's unibyteness (for url-insert-file-contents). - (set-buffer-multibyte multibyte) + (set-buffer + ;; Preserve the data's unibyteness (for url-insert-file-contents). + (let ((default-enable-multibyte-characters (mm-multibyte-p))) + (generate-new-buffer " *mm*"))) (insert-buffer-substring obuf beg) (current-buffer)))) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 5a4650db1b5..c608820c8ed 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -133,15 +133,9 @@ In XEmacs, also return non-nil if CS is a coding system object." (defvar mm-charset-synonym-alist `( - ;; Perfectly fine? A valid MIME name, anyhow. - ,@(unless (mm-coding-system-p 'big5) - '((big5 . cn-big5))) ;; Not in XEmacs, but it's not a proper MIME charset anyhow. ,@(unless (mm-coding-system-p 'x-ctext) '((x-ctext . ctext))) - ;; Apparently not defined in Emacs 20, but is a valid MIME name. - ,@(unless (mm-coding-system-p 'gb2312) - '((gb2312 . cn-gb-2312))) ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_! ,@(unless (mm-coding-system-p 'iso-8859-15) '((iso-8859-15 . iso-8859-1))) @@ -785,11 +779,12 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'." (defun mm-image-load-path (&optional package) (let (dir result) (dolist (path load-path (nreverse result)) - (if (file-directory-p - (setq dir (concat (file-name-directory - (directory-file-name path)) - "etc/" (or package "gnus/")))) - (push dir result)) + (when (and path + (file-directory-p + (setq dir (concat (file-name-directory + (directory-file-name path)) + "etc/" (or package "gnus/"))))) + (push dir result)) (push path result)))) ;; Fixme: This doesn't look useful where it's used. diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 21633fb4152..c2c5bbf91e3 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -450,6 +450,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." ;; actually are hard newlines in the text. (let (use-hard-newlines) (when (and (string= type "text/plain") + (not (string= (cdr (assq 'sign cont)) "pgp")) (or (null (assq 'format cont)) (string= (cdr (assq 'format cont)) "flowed")) @@ -591,7 +592,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (insert-buffer-substring (cdr (assq 'buffer cont)))) ((and (setq filename (cdr (assq 'filename cont))) (not (equal (cdr (assq 'nofile cont)) "yes"))) - (mm-insert-file-contents filename)) + (mm-insert-file-contents filename nil nil nil nil t)) (t (insert (cdr (assq 'contents cont))))) (goto-char (point-min)) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 0ff82c69523..1b6ec636734 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -1,7 +1,7 @@ ;;; nnheader.el --- header access macros for Gnus and its backends ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002, 2003 +;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA @@ -58,7 +58,7 @@ they will keep on jabbering all the time." :group 'gnus-server :type 'boolean) -(defvar nnheader-max-head-length 4096 +(defvar nnheader-max-head-length 8192 "*Max length of the head of articles. Value is an integer, nil, or t. nil means read in chunks of a file diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 978bec3c361..cbb5a1fc5b0 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el @@ -126,6 +126,25 @@ quoted-printable and base64 respectively.") ;;; Functions for encoding RFC2047 messages ;;; +(defun rfc2047-qp-or-base64 () + "Return the type with which to encode the buffer. +This is either `base64' or `quoted-printable'." + (save-excursion + (let ((limit (min (point-max) (+ 2000 (point-min)))) + (n8bit 0)) + (goto-char (point-min)) + (skip-chars-forward "\x20-\x7f\r\n\t" limit) + (while (< (point) limit) + (incf n8bit) + (forward-char 1) + (skip-chars-forward "\x20-\x7f\r\n\t" limit)) + (if (or (< (* 6 n8bit) (- limit (point-min))) + ;; Don't base64, say, a short line with a single + ;; non-ASCII char when splitting parts by charset. + (= n8bit 1)) + 'quoted-printable + 'base64)))) + (defun rfc2047-narrow-to-field () "Narrow the buffer to the header on the current line." (beginning-of-line) @@ -411,7 +430,7 @@ By default, the region is treated as containing addresses (see ;; encoding, choose the one that's shorter. (save-restriction (narrow-to-region b e) - (if (eq (mm-qp-or-base64) 'base64) + (if (eq (rfc2047-qp-or-base64) 'base64) 'B 'Q)))) (start (concat @@ -720,11 +739,15 @@ decodable." ;; Be more liberal to accept buggy base64 strings. If ;; base64-decode-string accepts buggy strings, this function could ;; be aliased to identity. - (case (mod (length string) 4) - (0 string) - (1 string) ;; Error, don't pad it. - (2 (concat string "==")) - (3 (concat string "=")))) + (if (= 0 (mod (length string) 4)) + string + (when (string-match "=+$" string) + (setq string (substring string 0 (match-beginning 0)))) + (case (mod (length string) 4) + (0 string) + (1 string) ;; Error, don't pad it. + (2 (concat string "==")) + (3 (concat string "="))))) (defun rfc2047-decode (charset encoding string) "Decode STRING from the given MIME CHARSET in the given ENCODING. diff --git a/man/ChangeLog b/man/ChangeLog index 3e7b9d88183..ca597e17064 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,11 @@ +2004-09-26 Jesper Harder + + * sieve.texi (Manage Sieve API): nil -> @code{nil}. + * pgg.texi (User Commands, Backend methods): do. + * gnus.texi: Markup fixes. + (Setting Process Marks): Fix `M P a' entry. + * emacs-mime: Fixes. + 2004-09-23 Reiner Steib * gnus-faq.texi ([5.12]): Fix code example for FQDN in Message-Ids diff --git a/man/emacs-mime.texi b/man/emacs-mime.texi index f30eec7e0fb..d60e40ebbd0 100644 --- a/man/emacs-mime.texi +++ b/man/emacs-mime.texi @@ -328,7 +328,7 @@ you could say something like: @item mm-inline-large-images @vindex mm-inline-large-images -When displaying inline images that are larger than the window, XEmacs +When displaying inline images that are larger than the window, Emacs does not enable scrolling, which means that you cannot see the whole image. To prevent this, the library tries to determine the image size before displaying it inline, and if it doesn't fit the window, the diff --git a/man/gnus.texi b/man/gnus.texi index aa3c3d09c5c..c94845c7a8b 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -6206,7 +6206,7 @@ Mark all series that have already had some articles marked @item M P a @kindex M P a (Summary) @findex gnus-uu-mark-all -Mark all articles in series order (@code{gnus-uu-mark-series}). +Mark all articles in series order (@code{gnus-uu-mark-all}). @item M P b @kindex M P b (Summary) @@ -16625,7 +16625,7 @@ follows: This instructs the @code{imap.el} package to log any exchanges with the server. The log is stored in the buffer @samp{*imap-log*}. Look for error messages, which sometimes are tagged with the keyword -@code{BAD} - but when submitting a bug, make sure to include all the +@code{BAD}---but when submitting a bug, make sure to include all the data. @node Other Sources @@ -18300,8 +18300,8 @@ placeholders if you care (See @code{gnus-auto-goto-ignores}). While it may be obvious to all, the only headers and articles available while unplugged are those headers and articles that were fetched into the Agent while previously plugged. To put it another -way, "If you forget to fetch something while plugged, you might have a -less than satisfying unplugged session". For this reason, the Agent +way, ``If you forget to fetch something while plugged, you might have a +less than satisfying unplugged session''. For this reason, the Agent adds two visual effects to your summary buffer. These effects display the download status of each article so that you always know which articles will be available when unplugged. @@ -20490,8 +20490,8 @@ something like: ... @end example -Then that means "score on the from header of the grandparent of the -current article". An indirection is quite fast, but it's better to say: +Then that means ``score on the from header of the grandparent of the +current article''. An indirection is quite fast, but it's better to say: @example (1- @@ -22710,7 +22710,7 @@ entering a group. Thus, entering a group with unseen or unread articles becomes the substitute for checking incoming mail. Whether only unseen articles or all unread articles will be processed is determined by the @code{spam-autodetect-recheck-messages}. When set -to t, unread messages will be rechecked. +to @code{t}, unread messages will be rechecked. @code{spam-autodetect} grants the user at once more and less control of spam filtering. The user will have more control over each group's diff --git a/man/pgg.texi b/man/pgg.texi index dc786c51609..8593a9e64a2 100644 --- a/man/pgg.texi +++ b/man/pgg.texi @@ -135,8 +135,9 @@ would be asked about the recipients. If encryption is successful, it replaces the current region contents (in the accessible portion) with the resulting data. -If optional argument @var{sign} is non-nil, the function is request to -do a combined sign and encrypt. This currently only work with GnuPG. +If optional argument @var{sign} is non-@code{nil}, the function is +request to do a combined sign and encrypt. This currently only work +with GnuPG. @end deffn @deffn Command pgg-decrypt-region start end @@ -301,9 +302,9 @@ keyrings. @deffn Method pgg-scheme-encrypt-region scheme start end recipients &optional sign Encrypt the current region between @var{start} and @var{end} for -@var{recipients}. If @var{sign} is non-nil, do a combined sign and -encrypt. If encryption is successful, it returns @code{t}, otherwise -@code{nil}. +@var{recipients}. If @var{sign} is non-@code{nil}, do a combined sign +and encrypt. If encryption is successful, it returns @code{t}, +otherwise @code{nil}. @end deffn @deffn Method pgg-scheme-decrypt-region scheme start end diff --git a/man/sieve.texi b/man/sieve.texi index d70941bf229..a41463c5316 100644 --- a/man/sieve.texi +++ b/man/sieve.texi @@ -277,7 +277,7 @@ Sets the default port to use, the suggested port number is @code{2000}. @item sieve-manage-log @vindex sieve-manage-log -If non-nil, should be a string naming a buffer where a protocol trace +If non-@code{nil}, should be a string naming a buffer where a protocol trace is dumped (for debugging purposes). @end table @@ -313,7 +313,8 @@ List scripts on the server. @item sieve-manage-havespace @findex sieve-manage-havespace -Returns non-nil iff server have roam for a script of given size. +Returns non-@code{nil} iff server have roam for a script of given +size. @item sieve-manage-getscript @findex sieve-manage-getscript