]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575
authorMiles Bader <miles@gnu.org>
Mon, 27 Sep 2004 07:44:44 +0000 (07:44 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 27 Sep 2004 07:44:44 +0000 (07:44 +0000)
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

18 files changed:
lisp/gnus/ChangeLog
lisp/gnus/flow-fill.el
lisp/gnus/gnus-cache.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus.el
lisp/gnus/html2text.el
lisp/gnus/message.el
lisp/gnus/mm-bodies.el
lisp/gnus/mm-decode.el
lisp/gnus/mm-util.el
lisp/gnus/mml.el
lisp/gnus/nnheader.el
lisp/gnus/rfc2047.el
man/ChangeLog
man/emacs-mime.texi
man/gnus.texi
man/pgg.texi
man/sieve.texi

index 1148ec5618e5f968958899dc3e39f9c32119d9a0..e680b48542c28ffbd5ad938c7f20cd060641dd22 100644 (file)
@@ -1,3 +1,46 @@
+2004-09-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte.
+
+2004-09-26  Jesper Harder  <harder@ifa.au.dk>
+
+       * 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 <laurent@aopsys.com>.
+
+       * mm-util.el (mm-image-load-path): Handle nil in load-path.
+       From Christian Neukirchen <chneukirchen@yahoo.de>.
+
+       * html2text.el (html2text-replace-list): Add &amp; and &apos;.
+
+       * nnheader.el (nnheader-max-head-length): Increase to 8192.
+
+       * message.el (message-clone-locals): Clone sendmail and smtp
+       variables.
+
 2004-09-23  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-msg.el (gnus-configure-posting-styles): Narrow to headers
index a22f2a5af07ce2741ad3409e08c269efa3b6d5a7..8a8098727fe4e597c651b14c4057b82cc0be71df 100644 (file)
@@ -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.
 
index bc09b3a23688f8b3ad806751d562cafff4e54f20..99e77b18f68aeed777bbfb6e7c3c8894dd5cbacb 100644 (file)
@@ -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
index 496bce4bf218353c312b4c10d1c3595551738c22..33531e7f8a49e53d4843309fd2a6cd7894bb6c2e 100644 (file)
@@ -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)
index 3b7c8c916d80b0e3629239491f5912fee8c02945..b12d769718a0df6e7d88e09184b93d522dca56b1 100644 (file)
@@ -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
index f2aefbef9938ab9e585325068fc87f7d8aa63b13..6f1ef3b0289bb314407fc12cad79efff1a9e17b4 100644 (file)
@@ -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 <hove@phys.ntnu.no>
 
@@ -42,7 +42,8 @@
 (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
 
 (defvar html2text-replace-list
-  '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\""))
+  '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")
+    ("&amp;" . "&") ("&apos;" . "'"))
   "The map of entity to text.
 
 This is an alist were each element is a dotted pair consisting of an
index 21c386b86ce7ea278c31786b929b2d3f44e3d7c4..8e5edbc048a7e4cb3f7600dc82ddeda176fb4587 100644 (file)
@@ -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)
index 7e95ef3986bc2177985ddce2d2a5e539dad533af..b3148fe04ac9c05f600c603b2e53eed2a3090454 100644 (file)
 (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)
index ff05393415d4d6dc0bd20af406897e3294ecddb8..51ec38dc387d786d6b1419433a93f9852348bddf 100644 (file)
@@ -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))))
 
index 5a4650db1b54c3c770cde4dc69854f0e0cbb87a9..c608820c8ed569dba53ca38ddc0298de56852ba4 100644 (file)
@@ -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.
index 21633fb4152adcc1be534f8e32dcb56ca625d0d7..c2c5bbf91e3ce121c9fb9da8fe2a4f6aa1486415 100644 (file)
@@ -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))
index 0ff82c69523b58642a85fa6d429211f04de3cbb3..1b6ec63673454b77dd7b30b080e0f04aa3d95da2 100644 (file)
@@ -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 <umerin@flab.flab.fujitsu.junet>
@@ -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
index 978bec3c361d915285267475da7fcae006c3f400..cbb5a1fc5b071c503ae960dc1bc0e593a1c15f7c 100644 (file)
@@ -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.
index 3e7b9d881836b0d850b249793ba6762896242f88..ca597e170647bc4f4517942a477d82d7865b3758 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-26  Jesper Harder  <harder@ifa.au.dk>
+
+       * 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  <Reiner.Steib@gmx.de>
 
        * gnus-faq.texi ([5.12]): Fix code example for FQDN in Message-Ids
index f30eec7e0fb1bcd15c6c620e7b9fb3ce51ebdf92..d60e40ebbd0231d2c29ff15aece001ad034e9be8 100644 (file)
@@ -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
index aa3c3d09c5c7c92f0f0220a6f2d49c6988369aad..c94845c7a8ba979e74cd495fbd2555d7c63cc6eb 100644 (file)
@@ -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
index dc786c5160918e3dd2a498b89731565ff80651b0..8593a9e64a261c4aae9f6b01148f03f2a68dd258 100644 (file)
@@ -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
index d70941bf2296c199e99f88fb7af3d2d4d79fc865..a41463c5316726708b976efdc5cbce669ec74567 100644 (file)
@@ -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