From: yamaoka Date: Thu, 3 Sep 1998 22:21:30 +0000 (+0000) Subject: Importing pgnus-0.14. X-Git-Tag: pgnus-0_14~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8660674d510b8127a29ee96eb2cfa91e92572463;p=elisp%2Fgnus.git- Importing pgnus-0.14. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 689cade..66181a3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +Thu Sep 3 15:23:22 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.14 is released. + +1998-09-03 15:08:30 Lars Magne Ingebrigtsen + + * mm-bodies.el (mm-body-encoding): Go through the buffer to make + sure we have 7bit. + +1998-09-02 14:38:18 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-post-method): Use opened servers, and remove + ducplicates. + (gnus-inews-insert-mime-headers): Removed. + + * message.el (message-caesar-region): Protect against MULE chars. + +1998-09-02 00:36:23 Hallvard B. Furuseth + + * mm-util.el (if): fset the right function. + +1998-09-02 00:31:53 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-decode-charset): Use real + read-coding-system. + +1998-09-01 17:58:40 Lars Magne Ingebrigtsen + + * mm-bodies.el (mm-decode-body): Protect against malformed + base64. + (mm-decode-body): Check that buffer-file-coding-system is + non-nil. + Tue Sep 1 10:29:33 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.13 is released. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index eb61973..8c21772 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -495,14 +495,16 @@ If SILENT, don't prompt the user." (list gnus-post-method))) gnus-secondary-select-methods (mapcar 'cdr gnus-server-alist) + gnus-opened-servers (list gnus-select-method) (list group-method))) method-alist post-methods method) ;; Weed out all mail methods. (while methods (setq method (gnus-server-get-method "" (pop methods))) - (when (or (gnus-method-option-p method 'post) - (gnus-method-option-p method 'post-mail)) + (when (and (or (gnus-method-option-p method 'post) + (gnus-method-option-p method 'post-mail)) + (not (member method post-methods))) (push method post-methods))) ;; Create a name-method alist. (setq method-alist @@ -568,36 +570,6 @@ If SILENT, don't prompt the user." (concat " - \"" xemacs-codename "\"")))) (t emacs-version)))) -;; Written by "Mr. Per Persson" . -(defun gnus-inews-insert-mime-headers () - "Insert MIME headers. -Assumes ISO-Latin-1 is used iff 8-bit characters are present." - (goto-char (point-min)) - (let ((mail-header-separator - (progn - (goto-char (point-min)) - (if (and (search-forward (concat "\n" mail-header-separator "\n") - nil t) - (not (search-backward "\n\n" nil t))) - mail-header-separator - "")))) - (or (mail-position-on-field "Mime-Version") - (insert "1.0") - (cond ((save-restriction - (widen) - (goto-char (point-min)) - (re-search-forward "[^\000-\177]" nil t)) - (or (mail-position-on-field "Content-Type") - (insert "text/plain; charset=ISO-8859-1")) - (or (mail-position-on-field "Content-Transfer-Encoding") - (insert "8bit"))) - (t (or (mail-position-on-field "Content-Type") - (insert "text/plain; charset=US-ASCII")) - (or (mail-position-on-field "Content-Transfer-Encoding") - (insert "7bit"))))))) - -(custom-add-option 'message-header-hook 'gnus-inews-insert-mime-headers) - ;;; ;;; Gnus Mail Functions diff --git a/lisp/gnus.el b/lisp/gnus.el index ecc0eb4..f609c82 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,7 +250,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.13" +(defconst gnus-version-number "0.14" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) diff --git a/lisp/lpath.el b/lisp/lpath.el index 2afa7dc..4172f10 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -32,7 +32,9 @@ decode-coding-string mail-aliases-setup mm-copy-tree url-view-url w3-prepare-buffer set-buffer-multibyte - find-non-ascii-charset-region char-charset)) + find-non-ascii-charset-region char-charset + mule-write-region-no-coding-system + find-charset-region)) (maybe-bind '(global-face-data mark-active transient-mark-mode mouse-selection-click-count mouse-selection-click-count-buffer buffer-display-table @@ -40,7 +42,7 @@ gnus-newsgroup-name gnus-article-x-face-too-ugly mail-mode-hook enable-multibyte-characters adaptive-fill-first-line-regexp adaptive-fill-regexp - url-current-mime-headers))) + url-current-mime-headers buffer-file-coding-system))) (maybe-bind '(mail-mode-hook enable-multibyte-characters browse-url-browser-function adaptive-fill-first-line-regexp adaptive-fill-regexp diff --git a/lisp/message.el b/lisp/message.el index 70ef73c..260246d 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1624,8 +1624,9 @@ text was killed." ;; text properties. (while (< b e) (subst-char-in-region - b (1+ b) (char-after b) - (aref message-caesar-translation-table (char-after b))) + (when (< (char-after b) 255) + b (1+ b) (char-after b) + (aref message-caesar-translation-table (char-after b)))) (incf b)))) (defun message-make-caesar-translation-table (n) diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index 5b33ac9..511d437 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -24,7 +24,11 @@ ;;; Code: +(eval-and-compile + (if (not (fboundp 'base64-encode-string)) + (require 'base64))) (require 'mm-util) +(require 'qp) (defun mm-encode-body () "Encode a body. @@ -66,7 +70,20 @@ If no encoding was done, nil is returned." (defun mm-body-encoding () "Return the encoding of the current buffer." - (if (null (delq 'ascii (find-charset-region (point-min) (point-max)))) + (if (and + (null (delq 'ascii (find-charset-region (point-min) (point-max)))) + ;;;!!!The following is necessary because the function + ;;;!!!above seems to return the wrong result under Emacs 20.3. + ;;;!!!Sometimes. + (save-excursion + (let (found) + (goto-char (point-min)) + (while (and (not found) + (not (eobp))) + (when (> (char-int (following-char)) 127) + (setq found t)) + (forward-char 1)) + (not found)))) '7bit '8bit)) @@ -83,7 +100,9 @@ The characters in CHARSET should then be decoded." ((eq encoding 'quoted-printable) (quoted-printable-decode-region (point-min) (point-max))) ((eq encoding 'base64) - (base64-decode-region (point-min) (point-max))) + (condition-case () + (base64-decode-region (point-min) (point-max)) + (error nil))) ((memq encoding '(7bit 8bit binary)) ) (t @@ -92,6 +111,7 @@ The characters in CHARSET should then be decoded." (let (mule-charset) (when (and charset (setq mule-charset (mm-charset-to-coding-system charset)) + buffer-file-coding-system (not (mm-coding-system-equal buffer-file-coding-system mule-charset))) (mm-decode-coding-region (point-min) (point-max) mule-charset)))))) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 48ad195..9ae62a7 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -24,36 +24,6 @@ ;;; Code: -(eval-and-compile - (if (fboundp 'decode-coding-string) - (fset 'mm-decode-coding-string 'decode-coding-string) - (fset 'mm-decode-coding-string (lambda (s a) s)))) - -(eval-and-compile - (if (fboundp 'encode-coding-string) - (fset 'mm-encode-coding-string 'encode-coding-string) - (fset 'mm-encode-coding-string (lambda (s a) s)))) - -(eval-and-compile - (if (fboundp 'encode-coding-region) - (fset 'mm-encode-coding-region 'encode-coding-region) - (fset 'mm-encode-coding-string 'ignore))) - -(eval-and-compile - (if (fboundp 'decode-coding-region) - (fset 'mm-decode-coding-region 'decode-coding-region) - (fset 'mm-decode-coding-string 'ignore))) - -(eval-and-compile - (if (fboundp 'coding-system-list) - (fset 'mm-coding-system-list 'coding-system-list) - (fset 'mm-coding-system-list 'ignore))) - -(eval-and-compile - (if (fboundp 'coding-system-equal) - (fset 'mm-coding-system-equal 'coding-system-equal) - (fset 'mm-coding-system-equal 'equal))) - (defvar mm-mime-mule-charset-alist '((us-ascii ascii) (iso-8859-1 latin-iso8859-1) @@ -91,6 +61,41 @@ chinese-cns11643-7)) "Alist of MIME-charset/MULE-charsets.") + +(eval-and-compile + (if (fboundp 'decode-coding-string) + (fset 'mm-decode-coding-string 'decode-coding-string) + (fset 'mm-decode-coding-string (lambda (s a) s))) + + (if (fboundp 'encode-coding-string) + (fset 'mm-encode-coding-string 'encode-coding-string) + (fset 'mm-encode-coding-string (lambda (s a) s))) + + (if (fboundp 'encode-coding-region) + (fset 'mm-encode-coding-region 'encode-coding-region) + (fset 'mm-encode-coding-region 'ignore)) + + (if (fboundp 'decode-coding-region) + (fset 'mm-decode-coding-region 'decode-coding-region) + (fset 'mm-decode-coding-region 'ignore)) + + (if (fboundp 'coding-system-list) + (fset 'mm-coding-system-list 'coding-system-list) + (fset 'mm-coding-system-list 'ignore)) + + (if (fboundp 'coding-system-equal) + (fset 'mm-coding-system-equal 'coding-system-equal) + (fset 'mm-coding-system-equal 'equal)) + + (if (fboundp 'read-coding-system) + (fset 'mm-read-coding-system 'read-coding-system) + (defun mm-read-coding-system (prompt) + "Prompt the user for a coding system." + (completing-read + prompt (mapcar (lambda (s) (list (symbol-name (car s)))) + mm-mime-mule-charset-alist))))) + + (defvar mm-charset-coding-system-alist (let ((rest '((us-ascii . iso-8859-1) @@ -107,6 +112,7 @@ dest) "Charset/coding system alist.") + (defun mm-mule-charset-to-mime-charset (charset) "Return the MIME charset corresponding to MULE CHARSET." (let ((alist mm-mime-mule-charset-alist) @@ -172,12 +178,6 @@ used as the line break code type of the coding system." (when (string-match "charset *= *\"? *\\([-0-9a-zA-Z_]+\\)\"? *$" header) (intern (downcase (match-string 1 header))))) -(defun mm-read-coding-system (prompt) - "Prompt the user for a coding system." - (completing-read - prompt (mapcar (lambda (s) (list (symbol-name (car s)))) - mm-mime-mule-charset-alist))) - (provide 'mm-util) ;;; mm-util.el ends here diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index a85f6a5..69e4f27 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -24,7 +24,9 @@ ;;; Code: -(require 'base64) +(eval-and-compile + (if (not (fboundp 'base64-encode-string)) + (require 'base64))) (require 'qp) (require 'mm-util) diff --git a/make.bat b/make.bat index d183af9..4a6b8a0 100755 --- a/make.bat +++ b/make.bat @@ -1,57 +1,57 @@ -@echo off - -rem Written by David Charlap - -rem There are two catches, however. The emacs.bat batch file may not exist -rem in all distributions. It is part of the Voelker build of Emacs 19.34 -rem (http://www.cs.washington.edu/homes/voelker/ntemacs.html). If the user -rem installs Gnus with some other build, he may have to replace calls to -rem %1\emacs.bat with something else. -rem -rem Also, the emacs.bat file that Voelker ships does not accept more than 9 -rem parameters, so the attempts to compile the .texi files will fail. To -rem fix that (at least on NT. I don't know about Win95), the following -rem change should be made to emacs.bat: -rem -rem %emacs_dir%\bin\emacs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 -rem -rem should become -rem -rem %emacs_dir%\bin\emacs.exe %* -rem -rem which will allow the batch file to accept an unlimited number of -rem parameters. - -if "%1" == "" goto usage - -cd lisp -call %1\bin\emacs.bat -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile -if not "%2" == "copy" goto info -copy *.el* %1\lisp - -:info -cd ..\texi -call %1\bin\emacs.bat -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer -call %1\bin\emacs.bat -batch -q -no-site-file message.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer -if not "%2" == "copy" goto done -copy gnus %1\info -copy gnus-?? %1\info -copy message %1\info - -:etc -cd ..\etc -copy gnus-tut.txt %1\etc - -:done -cd .. -goto end - -:usage -echo Usage: make ^ [copy] -echo. -echo where: ^ is the directory you installed emacs in -echo eg. d:\emacs\19.34 -echo copy indicates that the compiled files should be copied to your -echo emacs lisp, info, and etc directories - -:end +@echo off + +rem Written by David Charlap + +rem There are two catches, however. The emacs.bat batch file may not exist +rem in all distributions. It is part of the Voelker build of Emacs 19.34 +rem (http://www.cs.washington.edu/homes/voelker/ntemacs.html). If the user +rem installs Gnus with some other build, he may have to replace calls to +rem %1\emacs.bat with something else. +rem +rem Also, the emacs.bat file that Voelker ships does not accept more than 9 +rem parameters, so the attempts to compile the .texi files will fail. To +rem fix that (at least on NT. I don't know about Win95), the following +rem change should be made to emacs.bat: +rem +rem %emacs_dir%\bin\emacs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 +rem +rem should become +rem +rem %emacs_dir%\bin\emacs.exe %* +rem +rem which will allow the batch file to accept an unlimited number of +rem parameters. + +if "%1" == "" goto usage + +cd lisp +call %1\bin\emacs.bat -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile +if not "%2" == "copy" goto info +copy *.el* %1\lisp + +:info +cd ..\texi +call %1\bin\emacs.bat -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer +call %1\bin\emacs.bat -batch -q -no-site-file message.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer +if not "%2" == "copy" goto done +copy gnus %1\info +copy gnus-?? %1\info +copy message %1\info + +:etc +cd ..\etc +copy gnus-tut.txt %1\etc + +:done +cd .. +goto end + +:usage +echo Usage: make ^ [copy] +echo. +echo where: ^ is the directory you installed emacs in +echo eg. d:\emacs\19.34 +echo copy indicates that the compiled files should be copied to your +echo emacs lisp, info, and etc directories + +:end diff --git a/texi/gnus.texi b/texi/gnus.texi index 7368230..cb36fdd 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Pterodactyl Gnus 0.13 Manual +@settitle Pterodactyl Gnus 0.14 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -318,7 +318,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Gnus 0.13 Manual +@title Pterodactyl Gnus 0.14 Manual @author by Lars Magne Ingebrigtsen @page @@ -354,7 +354,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. -This manual corresponds to Pterodactyl Gnus 0.13. +This manual corresponds to Pterodactyl Gnus 0.14. @end ifinfo diff --git a/texi/message.texi b/texi/message.texi index 2293858..b011b53 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.13 Manual +@settitle Pterodactyl Message 0.14 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.13 Manual +@title Pterodactyl Message 0.14 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.13. Message is +This manual corresponds to Pterodactyl Message 0.14. Message is distributed with the Gnus distribution bearing the same version number as this manual has.