Importing Pterodactyl Gnus 0.47.
authoryamaoka <yamaoka>
Sun, 15 Nov 1998 22:03:40 +0000 (22:03 +0000)
committeryamaoka <yamaoka>
Sun, 15 Nov 1998 22:03:40 +0000 (22:03 +0000)
lisp/ChangeLog
lisp/gnus.el
lisp/message.el
lisp/mm-util.el
lisp/mml.el
make.bat
texi/gnus.texi
texi/message.texi

index 074bb13..9123068 100644 (file)
@@ -1,3 +1,16 @@
+Sun Nov 15 22:01:55 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+       * gnus.el: Pterodactyl Gnus v0.47 is released.
+
+1998-11-15 20:11:33  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * 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  <larsi@menja.ifi.uio.no>
 
        * gnus.el: Pterodactyl Gnus v0.46 is released.
 Sun Nov 15 02:01:31 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * gnus.el: Pterodactyl Gnus v0.46 is released.
index 0d5a045..327ca8a 100644 (file)
@@ -254,7 +254,7 @@ is restarted, and sometimes reloaded."
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "0.46"
+(defconst gnus-version-number "0.47"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
index 7d43608..2864796 100644 (file)
@@ -4087,23 +4087,29 @@ regexp varstr."
            (format "MIME type for %s: " file)
            (mapcar (lambda (m) (list (cdr m))) mailcap-mime-extensions)
            nil nil type))))
            (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"
+  (insert (format "<#part type=%s filename=\"%s\"><#/part>\n"
                  type file)))
 
 (defun message-encode-message-body ()
   (message-goto-body)
                  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"))))))
     
 (run-hooks 'message-load-hook)
 
     
 (run-hooks 'message-load-hook)
 
index 699e183..e0d8920 100644 (file)
@@ -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."
 
 (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
       (find-charset-region b e)
     ;; We are in a unibyte buffer, so we futz around a bit.
     (save-excursion
index c31e7fd..5f4d8e3 100644 (file)
   "Parse the current buffer as an MML document."
   (let (struct)
     (while (and (not (eobp))
   "Parse the current buffer as an MML document."
   (let (struct)
     (while (and (not (eobp))
-               (not (looking-at "</multipart")))
+               (not (looking-at "</#multipart")))
       (cond
       (cond
-       ((looking-at "<multipart")
+       ((looking-at "<#multipart")
        (push (nconc (mml-read-tag) (mml-parse-1)) struct))
        (push (nconc (mml-read-tag) (mml-parse-1)) struct))
-       ((looking-at "<part")
+       ((looking-at "<#part")
        (push (nconc (mml-read-tag) (list (cons 'contents (mml-read-part))))
              struct))
        (t
        (push (nconc (mml-read-tag) (list (cons 'contents (mml-read-part))))
              struct))
        (t
@@ -67,7 +67,7 @@
 (defun mml-read-tag ()
   "Read a tag and return the contents."
   (let (contents name elem val)
 (defun mml-read-tag ()
   "Read a tag and return the contents."
   (let (contents name elem val)
-    (forward-char 1)
+    (forward-char 2)
     (setq name (buffer-substring (point) (progn (forward-sexp 1) (point))))
     (skip-chars-forward " \t\n")
     (while (not (looking-at ">"))
     (setq name (buffer-substring (point) (progn (forward-sexp 1) (point))))
     (skip-chars-forward " \t\n")
     (while (not (looking-at ">"))
 (defun mml-read-part ()
   "Return the buffer up till the next part, multipart or closing part or multipart."
   (let ((beg (point)))
 (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 "</?\\(multi\\)?part." nil t)
+    (if (re-search-forward "<#/?\\(multi\\)?part." nil t)
        (prog1
            (buffer-substring beg (match-beginning 0))
        (prog1
            (buffer-substring beg (match-beginning 0))
-         (unless (equal (match-string 0) "</part>")
+         (unless (equal (match-string 0) "<#/part>")
            (goto-char (match-beginning 0))))
       (buffer-substring beg (goto-char (point-max))))))
 
            (goto-char (match-beginning 0))))
       (buffer-substring beg (goto-char (point-max))))))
 
       (with-temp-buffer
        (if (setq filename (cdr (assq 'filename cont)))
            (insert-file-contents-literally filename)
       (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))
        (if (equal (car (split-string type "/")) "text")
            (setq charset (mm-encode-body)
                  encoding (mm-body-encoding))
        (mml-generate-mime-1 (pop cont)))
       (insert "--" mml-boundary "--\n")))
    (t
        (mml-generate-mime-1 (pop cont)))
       (insert "--" mml-boundary "--\n")))
    (t
-    (error "%S" cont))))
+    (error "Invalid element: %S" cont))))
 
 (provide 'mml)
 
 
 (provide 'mml)
 
index d183af9..4a6b8a0 100755 (executable)
--- a/make.bat
+++ b/make.bat
@@ -1,57 +1,57 @@
-@echo off
-
-rem Written by David Charlap <shamino@writeme.com>
-
-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 ^<emacs-dir^> [copy]
-echo.
-echo where: ^<emacs-dir^> 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\r
+\r
+rem Written by David Charlap <shamino@writeme.com>\r
+\r
+rem There are two catches, however.  The emacs.bat batch file may not exist\r
+rem in all distributions.  It is part of the Voelker build of Emacs 19.34\r
+rem (http://www.cs.washington.edu/homes/voelker/ntemacs.html).  If the user\r
+rem installs Gnus with some other build, he may have to replace calls to\r
+rem %1\emacs.bat with something else.\r
+rem \r
+rem Also, the emacs.bat file that Voelker ships does not accept more than 9\r
+rem parameters, so the attempts to compile the .texi files will fail.  To\r
+rem fix that (at least on NT.  I don't know about Win95), the following\r
+rem change should be made to emacs.bat:\r
+rem \r
+rem     %emacs_dir%\bin\emacs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+rem \r
+rem should become\r
+rem \r
+rem     %emacs_dir%\bin\emacs.exe %*\r
+rem \r
+rem which will allow the batch file to accept an unlimited number of\r
+rem parameters.\r
+\r
+if "%1" == "" goto usage\r
+\r
+cd lisp\r
+call %1\bin\emacs.bat -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile\r
+if not "%2" == "copy" goto info\r
+copy *.el* %1\lisp\r
+\r
+:info\r
+cd ..\texi\r
+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\r
+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\r
+if not "%2" == "copy" goto done\r
+copy gnus %1\info\r
+copy gnus-?? %1\info\r
+copy message %1\info\r
+\r
+:etc\r
+cd ..\etc\r
+copy gnus-tut.txt %1\etc\r
+\r
+:done\r
+cd ..\r
+goto end\r
+\r
+:usage\r
+echo Usage: make ^<emacs-dir^> [copy]\r
+echo.\r
+echo where: ^<emacs-dir^> is the directory you installed emacs in\r
+echo                    eg. d:\emacs\19.34\r
+echo        copy indicates that the compiled files should be copied to your\r
+echo             emacs lisp, info, and etc directories\r
+\r
+:end\r
index 84e29b3..d10eb96 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Pterodactyl Gnus 0.46 Manual
+@settitle Pterodactyl Gnus 0.47 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
 @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
 @tex
 
 @titlepage
-@title Pterodactyl Gnus 0.46 Manual
+@title Pterodactyl Gnus 0.47 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
 
 @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.
 
 spool or your mbox file.  All at the same time, if you want to push your
 luck.
 
-This manual corresponds to Pterodactyl Gnus 0.46.
+This manual corresponds to Pterodactyl Gnus 0.47.
 
 @end ifinfo
 
 
 @end ifinfo
 
index 5bdae93..f75be29 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
-@settitle Pterodactyl Message 0.46 Manual
+@settitle Pterodactyl Message 0.47 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
 @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
 @tex
 
 @titlepage
-@title Pterodactyl Message 0.46 Manual
+@title Pterodactyl Message 0.47 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -83,7 +83,7 @@ Message mode buffers.
 * Key Index::         List of Message mode keys.
 @end menu
 
 * Key Index::         List of Message mode keys.
 @end menu
 
-This manual corresponds to Pterodactyl Message 0.46.  Message is
+This manual corresponds to Pterodactyl Message 0.47.  Message is
 distributed with the Gnus distribution bearing the same version number
 as this manual.
 
 distributed with the Gnus distribution bearing the same version number
 as this manual.