From 5d3ea918d898e72f7038df7fb6aadd08fd396082 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 15 Nov 1998 23:18:15 +0000 Subject: [PATCH] Sync up with Pterodactyl Gnus 0.47. --- ChangeLog | 6 ++++++ README.ichikawa | 2 +- lisp/ChangeLog | 13 ++++++++++++ lisp/gnus.el | 4 ++-- lisp/message.el | 57 +++++++++++++++++++++++++++----------------------- lisp/mm-util.el | 3 ++- lisp/mml.el | 22 ++++++++++++------- texi/gnus-ja.texi | 6 +++--- texi/gnus.texi | 6 +++--- texi/message-ja.texi | 6 +++--- texi/message.texi | 6 +++--- 11 files changed, 81 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bd33e6..6ac781a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-11-16 Katsumi Yamaoka + + * lisp/gnus.el (gnus-version-number): Update to 6.10.032. + + * Sync up with Pterodactyl Gnus 0.47. + 1998-11-15 Tatsuya Ichikawa * lisp/gnus.el (gnus-version-number): Update to 6.10.031. diff --git a/README.ichikawa b/README.ichikawa index ed27928..b0d0846 100644 --- a/README.ichikawa +++ b/README.ichikawa @@ -31,4 +31,4 @@ NEWS: * T-gnus 6.8.19 is the last version Gnus 5.6 base. After this , T-gnus 6.10 - this is based on Pterodactyl Gnus. - The latest T-gnus is T-gnus 6.10.029 (Based on pgnus-0.42). + The latest T-gnus is T-gnus 6.10.032 (Based on pgnus-0.47). diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ddb0e7..3075085 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +Sun Nov 15 22:01:55 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.47 is released. + +1998-11-15 20:11:33 Lars Magne Ingebrigtsen + + * message.el (message-encode-message-body): Insert MIME warning. + + * mml.el (mml-read-tag): Look for #tag. + + * mm-util.el (mm-find-charset-region): Check whether + enable-multibyte-characters is bound. + Sun Nov 15 02:01:31 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.46 is released. diff --git a/lisp/gnus.el b/lisp/gnus.el index e54be29..7e875c7 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -259,10 +259,10 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "T-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.10.031" +(defconst gnus-version-number "6.10.032" "Version number for this version of gnus.") -(defconst gnus-original-version-number "0.46" +(defconst gnus-original-version-number "0.47" "Version number for this version of Gnus.") (defconst gnus-original-product-name "Pterodactyl Gnus" diff --git a/lisp/message.el b/lisp/message.el index f977cf2..846f11e 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4687,20 +4687,39 @@ regexp varstr." ;;; MIME functions ;;; +(defun message-insert-mime-part (file type) + "Insert a multipart/alternative part into the buffer." + (interactive + (let* ((file (read-file-name "Insert file: " nil nil t)) + (type (mm-default-file-encoding file))) + (list file + (completing-read + (format "MIME type for %s: " file) + (mapcar (lambda (m) (list (cdr m))) mailcap-mime-extensions) + nil nil type)))) + (insert (format "<#part type=%s filename=\"%s\"><#/part>\n" + type file))) + (defun message-encode-message-body () (message-goto-body) - (narrow-to-region (point) (point-max)) - (let ((new (mml-generate-mime))) - (delete-region (point-min) (point-max)) - (insert new) - (goto-char (point-min)) - (widen) - (forward-line -1) - (let ((beg (point)) - (line (buffer-substring (point) (progn (forward-line 1) (point))))) - (delete-region beg (point)) - (insert "Mime-Version: 1.0\n") - (insert line)))) + (save-restriction + (narrow-to-region (point) (point-max)) + (let ((new (mml-generate-mime))) + (delete-region (point-min) (point-max)) + (insert new) + (goto-char (point-min)) + (widen) + (forward-line -1) + (let ((beg (point)) + (line (buffer-substring (point) (progn (forward-line 1) (point))))) + (delete-region beg (point)) + (insert "Mime-Version: 1.0\n") + (search-forward "\n\n") + (insert line) + (when (save-excursion + (re-search-backward "^Content-Type: multipart/" nil t)) + (insert "This is a MIME multipart message. If you are reading\n") + (insert "this, you shouldn't.\n\n")))))) (defvar message-save-buffer " *encoding") (defun message-save-drafts () @@ -4717,20 +4736,6 @@ regexp varstr." (set-buffer buffer) (set-buffer-modified-p nil))) -(defun message-insert-mime-part (file type) - "Insert a multipart/alternative part into the buffer." - (interactive - (let* ((file (read-file-name "Insert file: " nil nil t)) - (type (mm-default-file-encoding file))) - (list file - (completing-read - (format "MIME type for %s: " file) - (mapcar (lambda (m) (list (cdr m))) mailcap-mime-extensions) - nil nil type)))) - (insert (format "\n" - type file))) - - (run-hooks 'message-load-hook) (provide 'message) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 699e183..e0d8920 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -224,7 +224,8 @@ See also `with-temp-file' and `with-output-to-string'." (defun mm-find-charset-region (b e) "Return a list of charsets in the region." - (if enable-multibyte-characters + (if (and (boundp 'enable-multibyte-characters) + enable-multibyte-characters) (find-charset-region b e) ;; We are in a unibyte buffer, so we futz around a bit. (save-excursion diff --git a/lisp/mml.el b/lisp/mml.el index c31e7fd..5f4d8e3 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -50,11 +50,11 @@ "Parse the current buffer as an MML document." (let (struct) (while (and (not (eobp)) - (not (looking-at "")) @@ -84,10 +84,10 @@ (defun mml-read-part () "Return the buffer up till the next part, multipart or closing part or multipart." (let ((beg (point))) - (if (re-search-forward "") + (unless (equal (match-string 0) "<#/part>") (goto-char (match-beginning 0)))) (buffer-substring beg (goto-char (point-max)))))) @@ -113,7 +113,13 @@ (with-temp-buffer (if (setq filename (cdr (assq 'filename cont))) (insert-file-contents-literally filename) - (insert (cdr (assq 'contents cont)))) + (save-restriction + (narrow-to-region (point) (point)) + (insert (cdr (assq 'contents cont))) + (goto-char (point-min)) + (while (re-search-forward "<#!+\\(part\\|multipart\\)" nil t) + (delete-region (+ (match-beginning 0) 2) + (+ (match-beginning 0) 3))))) (if (equal (car (split-string type "/")) "text") (setq charset (mm-encode-body) encoding (mm-body-encoding)) @@ -141,7 +147,7 @@ (mml-generate-mime-1 (pop cont))) (insert "--" mml-boundary "--\n"))) (t - (error "%S" cont)))) + (error "Invalid element: %S" cont)))) (provide 'mml) diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 7ea1150..6f9911b 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus-ja -@settitle Semi-gnus 6.10.031 Manual +@settitle Semi-gnus 6.10.032 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -345,7 +345,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.10.031 Manual +@title Semi-gnus 6.10.032 Manual @author by Lars Magne Ingebrigtsen @author by members of Semi-gnus mailing-list @@ -399,7 +399,7 @@ Semi-gnus $B$O!"Bg$-$J3($,F~$C$F$$$?$j$5$^$6$^$J7A<0$rMQ$$$?$j$7$F$$$k$A$g$C(B $B$J8@8l7w$r:9JL$7$^$;$s!#$"$"!"%/%j%s%4%s$NJ}$O(B Unicode Next Generation$B$r(B $B$*BT$A$/$@$5$$!#(B -$B$3$N@bL@=q$O(B Semi-gnus 6.10.031 $B$KBP1~$7$^$9!#(B +$B$3$N@bL@=q$O(B Semi-gnus 6.10.032 $B$KBP1~$7$^$9!#(B @end ifinfo diff --git a/texi/gnus.texi b/texi/gnus.texi index 81253af..561ee24 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.10.031 Manual +@settitle Semi-gnus 6.10.032 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 Semi-gnus 6.10.031 Manual +@title Semi-gnus 6.10.032 Manual @author by Lars Magne Ingebrigtsen @page @@ -361,7 +361,7 @@ internationalization/localization and multiscript features based on MULE API. So Semi-gnus does not discriminate various language communities. Oh, if you are a Klingon, please wait Unicode Next Generation. -This manual corresponds to Semi-gnus 6.10.031. +This manual corresponds to Semi-gnus 6.10.032. @end ifinfo diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 4b2f803..dcb57b7 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message-ja -@settitle Message 6.10.029 Manual +@settitle Message 6.10.032 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -60,7 +60,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Message 6.10.029 Manual +@title Message 6.10.032 Manual @author by Lars Magne Ingebrigtsen @translated by members of Semi-gnus mailing-list @@ -112,7 +112,7 @@ Gnus $B$NA4$F$N%a%C%;!<%8$N:n@.(B ($B%a!<%k$H%K%e!<%9$NN>J}(B) $B$O%a%C%;!< * Key Index:: $B%a%C%;!<%8%b!<%I%-!<$N0lMw!#(B @end menu -$B$3$N%^%K%e%"%k$O(B Message 6.10.029 $B$KBP1~$7$^$9!#(BMessage $B$O$3$N%^%K%e%"%k$H(B +$B$3$N%^%K%e%"%k$O(B Message 6.10.032 $B$KBP1~$7$^$9!#(BMessage $B$O$3$N%^%K%e%"%k$H(B $BF1$8HGHV9f$N(B Gnus $B$NG[I[$H6&$KG[I[$5$l$^$9!#(B diff --git a/texi/message.texi b/texi/message.texi index af1a484..7939ace 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.46 Manual +@settitle Message 6.10.032 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.46 Manual +@title Message 6.10.032 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.46. Message is +This manual corresponds to Message 6.10.032. Message is distributed with the Gnus distribution bearing the same version number as this manual. -- 1.7.10.4