aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog43
-rw-r--r--lisp/gnus/flow-fill.el2
-rw-r--r--lisp/gnus/gnus-cache.el5
-rw-r--r--lisp/gnus/gnus-msg.el4
-rw-r--r--lisp/gnus/gnus.el5
-rw-r--r--lisp/gnus/html2text.el5
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/mm-bodies.el11
-rw-r--r--lisp/gnus/mm-decode.el8
-rw-r--r--lisp/gnus/mm-util.el17
-rw-r--r--lisp/gnus/mml.el3
-rw-r--r--lisp/gnus/nnheader.el4
-rw-r--r--lisp/gnus/rfc2047.el35
13 files changed, 107 insertions, 37 deletions
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 @@
12004-09-27 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte.
4
52004-09-26 Jesper Harder <harder@ifa.au.dk>
6
7 * gnus-msg.el (gnus-post-news): Use blank Newsgroups line if
8 GROUP is a virtual group.
9
10 * mm-util.el (mm-charset-synonym-alist): Remove obsolete entries
11 for big5 and gb2312.
12
13 * rfc2047.el (rfc2047-pad-base64): Deal with more cases of invalid
14 padding.
15
16 * mm-bodies.el (mm-7bit-chars): Don't include \r.
17
18 * mml.el (mml-compute-boundary-1): Don't uncompress files.
19
20 * rfc2047.el (rfc2047-qp-or-base64): New function to reduce
21 dependencies.
22 (rfc2047-encode): Use it.
23
24 * flow-fill.el: Typo.
25
26 * mml.el (mml-generate-mime-1): Don't use format=flowed with
27 inline PGP.
28
29 * gnus.el (gnus-getenv-nntpserver): Strip whitespace.
30
31 * gnus-cache.el (gnus-cache-save-buffers): Check if buffer is
32 alive. Reported by Laurent Martelli <laurent@aopsys.com>.
33
34 * mm-util.el (mm-image-load-path): Handle nil in load-path.
35 From Christian Neukirchen <chneukirchen@yahoo.de>.
36
37 * html2text.el (html2text-replace-list): Add &amp; and &apos;.
38
39 * nnheader.el (nnheader-max-head-length): Increase to 8192.
40
41 * message.el (message-clone-locals): Clone sendmail and smtp
42 variables.
43
12004-09-23 Reiner Steib <Reiner.Steib@gmx.de> 442004-09-23 Reiner Steib <Reiner.Steib@gmx.de>
2 45
3 * gnus-msg.el (gnus-configure-posting-styles): Narrow to headers 46 * 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 @@
1;;; flow-fill.el --- interprete RFC2646 "flowed" text 1;;; flow-fill.el --- interpret RFC2646 "flowed" text
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4 4
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."
125 (overview-file (gnus-cache-file-name 125 (overview-file (gnus-cache-file-name
126 (car gnus-cache-buffer) ".overview"))) 126 (car gnus-cache-buffer) ".overview")))
127 ;; write the overview only if it was modified 127 ;; write the overview only if it was modified
128 (when (buffer-modified-p buffer) 128 (when (and (buffer-live-p buffer) (buffer-modified-p buffer))
129 (save-excursion 129 (with-current-buffer buffer
130 (set-buffer buffer)
131 (if (> (buffer-size) 0) 130 (if (> (buffer-size) 0)
132 ;; Non-empty overview, write it to a file. 131 ;; Non-empty overview, write it to a file.
133 (let ((coding-system-for-write 132 (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."
915 (not to-address))) 915 (not to-address)))
916 ;; This is news. 916 ;; This is news.
917 (if post 917 (if post
918 (message-news (or to-group group)) 918 (message-news
919 (or to-group
920 (and (not (gnus-virtual-group-p pgroup)) group)))
919 (set-buffer gnus-article-copy) 921 (set-buffer gnus-article-copy)
920 (gnus-msg-treat-broken-reply-to) 922 (gnus-msg-treat-broken-reply-to)
921 (message-followup (if (or newsgroup-p force-news) 923 (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
1104 (and (file-readable-p gnus-nntpserver-file) 1104 (and (file-readable-p gnus-nntpserver-file)
1105 (with-temp-buffer 1105 (with-temp-buffer
1106 (insert-file-contents gnus-nntpserver-file) 1106 (insert-file-contents gnus-nntpserver-file)
1107 (let ((name (buffer-string))) 1107 (when (re-search-forward "[^ \t\n\r]+" nil t)
1108 (unless (string-match "\\`[ \t\n]*$" name) 1108 (match-string 0))))))
1109 name))))))
1110 1109
1111(defcustom gnus-select-method 1110(defcustom gnus-select-method
1112 (condition-case nil 1111 (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 @@
1;;; html2text.el --- a simple html to plain text converter 1;;; html2text.el --- a simple html to plain text converter
2;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. 2;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
3 3
4;; Author: Joakim Hove <hove@phys.ntnu.no> 4;; Author: Joakim Hove <hove@phys.ntnu.no>
5 5
@@ -42,7 +42,8 @@
42(defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr))) 42(defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
43 43
44(defvar html2text-replace-list 44(defvar html2text-replace-list
45 '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")) 45 '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")
46 ("&amp;" . "&") ("&apos;" . "'"))
46 "The map of entity to text. 47 "The map of entity to text.
47 48
48This is an alist were each element is a dotted pair consisting of an 49This 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."
6685 (let ((locals (save-excursion 6685 (let ((locals (save-excursion
6686 (set-buffer buffer) 6686 (set-buffer buffer)
6687 (buffer-local-variables))) 6687 (buffer-local-variables)))
6688 (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address")) 6688 (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address"))
6689 (mapcar 6689 (mapcar
6690 (lambda (local) 6690 (lambda (local)
6691 (when (and (consp local) 6691 (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 @@
38(require 'rfc2047) 38(require 'rfc2047)
39(require 'mm-encode) 39(require 'mm-encode)
40 40
41;; 8bit treatment gets any char except: 0x32 - 0x7f, CR, LF, TAB, BEL, 41;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL,
42;; BS, vertical TAB, form feed, and ^_ 42;; BS, vertical TAB, form feed, and ^_
43(defvar mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f") 43;;
44;; Note that CR is *not* included, as that would allow a non-paired CR
45;; in the body contrary to RFC 2822:
46;;
47;; - CR and LF MUST only occur together as CRLF; they MUST NOT
48;; appear independently in the body.
49
50(defvar mm-7bit-chars "\x20-\x7f\n\t\x7\x8\xb\xc\x1f")
44 51
45(defcustom mm-body-charset-encoding-alist 52(defcustom mm-body-charset-encoding-alist
46 '((iso-2022-jp . 7bit) 53 '((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
623 "Copy the contents of the current buffer to a fresh buffer." 623 "Copy the contents of the current buffer to a fresh buffer."
624 (save-excursion 624 (save-excursion
625 (let ((obuf (current-buffer)) 625 (let ((obuf (current-buffer))
626 (multibyte enable-multibyte-characters)
627 beg) 626 beg)
628 (goto-char (point-min)) 627 (goto-char (point-min))
629 (search-forward-regexp "^\n" nil t) 628 (search-forward-regexp "^\n" nil t)
630 (setq beg (point)) 629 (setq beg (point))
631 (set-buffer (generate-new-buffer " *mm*")) 630 (set-buffer
632 ;; Preserve the data's unibyteness (for url-insert-file-contents). 631 ;; Preserve the data's unibyteness (for url-insert-file-contents).
633 (set-buffer-multibyte multibyte) 632 (let ((default-enable-multibyte-characters (mm-multibyte-p)))
633 (generate-new-buffer " *mm*")))
634 (insert-buffer-substring obuf beg) 634 (insert-buffer-substring obuf beg)
635 (current-buffer)))) 635 (current-buffer))))
636 636
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."
133 133
134(defvar mm-charset-synonym-alist 134(defvar mm-charset-synonym-alist
135 `( 135 `(
136 ;; Perfectly fine? A valid MIME name, anyhow.
137 ,@(unless (mm-coding-system-p 'big5)
138 '((big5 . cn-big5)))
139 ;; Not in XEmacs, but it's not a proper MIME charset anyhow. 136 ;; Not in XEmacs, but it's not a proper MIME charset anyhow.
140 ,@(unless (mm-coding-system-p 'x-ctext) 137 ,@(unless (mm-coding-system-p 'x-ctext)
141 '((x-ctext . ctext))) 138 '((x-ctext . ctext)))
142 ;; Apparently not defined in Emacs 20, but is a valid MIME name.
143 ,@(unless (mm-coding-system-p 'gb2312)
144 '((gb2312 . cn-gb-2312)))
145 ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_! 139 ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_!
146 ,@(unless (mm-coding-system-p 'iso-8859-15) 140 ,@(unless (mm-coding-system-p 'iso-8859-15)
147 '((iso-8859-15 . iso-8859-1))) 141 '((iso-8859-15 . iso-8859-1)))
@@ -785,11 +779,12 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
785(defun mm-image-load-path (&optional package) 779(defun mm-image-load-path (&optional package)
786 (let (dir result) 780 (let (dir result)
787 (dolist (path load-path (nreverse result)) 781 (dolist (path load-path (nreverse result))
788 (if (file-directory-p 782 (when (and path
789 (setq dir (concat (file-name-directory 783 (file-directory-p
790 (directory-file-name path)) 784 (setq dir (concat (file-name-directory
791 "etc/" (or package "gnus/")))) 785 (directory-file-name path))
792 (push dir result)) 786 "etc/" (or package "gnus/")))))
787 (push dir result))
793 (push path result)))) 788 (push path result))))
794 789
795;; Fixme: This doesn't look useful where it's used. 790;; 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."
450 ;; actually are hard newlines in the text. 450 ;; actually are hard newlines in the text.
451 (let (use-hard-newlines) 451 (let (use-hard-newlines)
452 (when (and (string= type "text/plain") 452 (when (and (string= type "text/plain")
453 (not (string= (cdr (assq 'sign cont)) "pgp"))
453 (or (null (assq 'format cont)) 454 (or (null (assq 'format cont))
454 (string= (cdr (assq 'format cont)) 455 (string= (cdr (assq 'format cont))
455 "flowed")) 456 "flowed"))
@@ -591,7 +592,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
591 (insert-buffer-substring (cdr (assq 'buffer cont)))) 592 (insert-buffer-substring (cdr (assq 'buffer cont))))
592 ((and (setq filename (cdr (assq 'filename cont))) 593 ((and (setq filename (cdr (assq 'filename cont)))
593 (not (equal (cdr (assq 'nofile cont)) "yes"))) 594 (not (equal (cdr (assq 'nofile cont)) "yes")))
594 (mm-insert-file-contents filename)) 595 (mm-insert-file-contents filename nil nil nil nil t))
595 (t 596 (t
596 (insert (cdr (assq 'contents cont))))) 597 (insert (cdr (assq 'contents cont)))))
597 (goto-char (point-min)) 598 (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 @@
1;;; nnheader.el --- header access macros for Gnus and its backends 1;;; nnheader.el --- header access macros for Gnus and its backends
2 2
3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
4;; 1997, 1998, 2000, 2001, 2002, 2003 4;; 1997, 1998, 2000, 2001, 2002, 2003, 2004
5;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
6 6
7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -58,7 +58,7 @@ they will keep on jabbering all the time."
58 :group 'gnus-server 58 :group 'gnus-server
59 :type 'boolean) 59 :type 'boolean)
60 60
61(defvar nnheader-max-head-length 4096 61(defvar nnheader-max-head-length 8192
62 "*Max length of the head of articles. 62 "*Max length of the head of articles.
63 63
64Value is an integer, nil, or t. nil means read in chunks of a file 64Value 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.")
126;;; Functions for encoding RFC2047 messages 126;;; Functions for encoding RFC2047 messages
127;;; 127;;;
128 128
129(defun rfc2047-qp-or-base64 ()
130 "Return the type with which to encode the buffer.
131This is either `base64' or `quoted-printable'."
132 (save-excursion
133 (let ((limit (min (point-max) (+ 2000 (point-min))))
134 (n8bit 0))
135 (goto-char (point-min))
136 (skip-chars-forward "\x20-\x7f\r\n\t" limit)
137 (while (< (point) limit)
138 (incf n8bit)
139 (forward-char 1)
140 (skip-chars-forward "\x20-\x7f\r\n\t" limit))
141 (if (or (< (* 6 n8bit) (- limit (point-min)))
142 ;; Don't base64, say, a short line with a single
143 ;; non-ASCII char when splitting parts by charset.
144 (= n8bit 1))
145 'quoted-printable
146 'base64))))
147
129(defun rfc2047-narrow-to-field () 148(defun rfc2047-narrow-to-field ()
130 "Narrow the buffer to the header on the current line." 149 "Narrow the buffer to the header on the current line."
131 (beginning-of-line) 150 (beginning-of-line)
@@ -411,7 +430,7 @@ By default, the region is treated as containing addresses (see
411 ;; encoding, choose the one that's shorter. 430 ;; encoding, choose the one that's shorter.
412 (save-restriction 431 (save-restriction
413 (narrow-to-region b e) 432 (narrow-to-region b e)
414 (if (eq (mm-qp-or-base64) 'base64) 433 (if (eq (rfc2047-qp-or-base64) 'base64)
415 'B 434 'B
416 'Q)))) 435 'Q))))
417 (start (concat 436 (start (concat
@@ -720,11 +739,15 @@ decodable."
720 ;; Be more liberal to accept buggy base64 strings. If 739 ;; Be more liberal to accept buggy base64 strings. If
721 ;; base64-decode-string accepts buggy strings, this function could 740 ;; base64-decode-string accepts buggy strings, this function could
722 ;; be aliased to identity. 741 ;; be aliased to identity.
723 (case (mod (length string) 4) 742 (if (= 0 (mod (length string) 4))
724 (0 string) 743 string
725 (1 string) ;; Error, don't pad it. 744 (when (string-match "=+$" string)
726 (2 (concat string "==")) 745 (setq string (substring string 0 (match-beginning 0))))
727 (3 (concat string "=")))) 746 (case (mod (length string) 4)
747 (0 string)
748 (1 string) ;; Error, don't pad it.
749 (2 (concat string "=="))
750 (3 (concat string "=")))))
728 751
729(defun rfc2047-decode (charset encoding string) 752(defun rfc2047-decode (charset encoding string)
730 "Decode STRING from the given MIME CHARSET in the given ENCODING. 753 "Decode STRING from the given MIME CHARSET in the given ENCODING.