Sync up with Pterodactyl Gnus 0.36.
authoryamaoka <yamaoka>
Tue, 20 Oct 1998 22:55:13 +0000 (22:55 +0000)
committeryamaoka <yamaoka>
Tue, 20 Oct 1998 22:55:13 +0000 (22:55 +0000)
18 files changed:
lisp/ChangeLog
lisp/binhex.el
lisp/gnus-agent.el
lisp/gnus-art.el
lisp/gnus-draft.el
lisp/gnus-group.el
lisp/gnus-msg.el
lisp/gnus.el
lisp/mm-bodies.el
lisp/mm-decode.el
lisp/mm-uu.el [new file with mode: 0644]
lisp/nnheader.el
lisp/pop3.el
lisp/rfc1843.el
lisp/uudecode.el
texi/gnus-ja.texi
texi/gnus.texi
texi/message.texi

index cfe19aa..4f6afb0 100644 (file)
@@ -1,3 +1,36 @@
+Tue Oct 20 20:25:03 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+       * gnus.el: Pterodactyl Gnus v0.36 is released.
+
+1998-10-20 18:13:08  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-art.el (article-translate-strings): 
+       (gnus-article-dumbquotes-map): Don't dot.
+
+       * pop3.el (pop3-open-server): Set point right.
+
+       * mm-decode.el (mm-dissect-multipart): Dissect hierarchically. 
+       (mm-dissect-buffer): Ditto.
+       (mm-destroy-part): Ignore non-handles.
+       (mm-remove-part): Ditto.
+       (mm-destroy-parts): New function.
+       (mm-remove-parts): Ditto.
+
+       * gnus-art.el (gnus-mm-display-part): Don't move point.
+
+Tue Oct 20 02:16:36 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-uu.el : New file.
+       
+       * gnus-art.el (gnus-display-mime): Dissect uu stuffs.
+       
+       * mm-bodies.el (mm-decode-content-transfer-encoding): Encoding as
+       a function.
+
+1998-10-20 00:35:05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * mm-decode.el (mm-display-external): Check before selecting.
+
 Tue Oct 20 00:24:16 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * gnus.el: Pterodactyl Gnus v0.35 is released.
 Tue Oct 20 00:24:16 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * gnus.el: Pterodactyl Gnus v0.35 is released.
index 0c1cb02..3dcf6c5 100644 (file)
@@ -3,7 +3,7 @@
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Create Date: Oct 1, 1998
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Create Date: Oct 1, 1998
-;; $Revision: 1.1.2.1 $
+;; $Revision: 1.1.2.2 $
 ;; Time-stamp: <Tue Oct  6 23:48:38 EDT 1998 zsh>
 ;; Keywords: binhex
   
 ;; Time-stamp: <Tue Oct  6 23:48:38 EDT 1998 zsh>
 ;; Keywords: binhex
   
index 022cab6..11f751a 100644 (file)
@@ -1,4 +1,4 @@
-;;; gnus-agent.el --- unplugged support for Gnus
+;;; gnus-agent.el --- unplugged support for Semi-gnus
 ;; Copyright (C) 1997,98 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Copyright (C) 1997,98 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 45ae9cb..0e570d7 100644 (file)
@@ -565,23 +565,23 @@ displayed by the first non-nil matching CONTENT face."
   "Function used to decode headers.")
 
 (defvar gnus-article-dumbquotes-map
   "Function used to decode headers.")
 
 (defvar gnus-article-dumbquotes-map
-  '(("\202" . ",")
-    ("\203" . "f")
-    ("\204" . ",,")
-    ("\213" . "<")
-    ("\214" . "OE")
-    ("\205" . "...")
-    ("\221" . "`")
-    ("\222" . "'")
-    ("\223" . "``")
-    ("\224" . "''")
-    ("\225" . "*")
-    ("\226" . "-")
-    ("\227" . "-")
-    ("\231" . "(TM)")
-    ("\233" . ">")
-    ("\234" . "oe")
-    ("\264" . "'"))
+  '(("\202" ",")
+    ("\203" "f")
+    ("\204" ",,")
+    ("\213" "<")
+    ("\214" "OE")
+    ("\205" "...")
+    ("\221" "`")
+    ("\222" "'")
+    ("\223" "``")
+    ("\224" "''")
+    ("\225" "*")
+    ("\226" "-")
+    ("\227" "-")
+    ("\231" "(TM)")
+    ("\233" ">")
+    ("\234" "oe")
+    ("\264" "'"))
   "Table for MS-to-Latin1 translation.")
 
 ;;; Internal variables
   "Table for MS-to-Latin1 translation.")
 
 ;;; Internal variables
@@ -2223,7 +2223,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
     ;; Display message.
     (funcall method)
     ;; Associate this article with the current summary buffer.
     ;; Display message.
     (funcall method)
     ;; Associate this article with the current summary buffer.
-    (setq gnus-article-current-summary summary-buffer)
+    (setq gnus-article-current-summary (current-buffer))
     ;; Perform the article display hooks.
     (gnus-run-hooks 'gnus-article-display-hook)))
 
     ;; Perform the article display hooks.
     (gnus-run-hooks 'gnus-article-display-hook)))
 
@@ -2344,11 +2344,13 @@ If ALL-HEADERS is non-nil, no headers are hidden."
 (defun gnus-mm-display-part (handle)
   "Display HANDLE and fix MIME button."
   (let ((id (get-text-property (point) 'gnus-part))
 (defun gnus-mm-display-part (handle)
   "Display HANDLE and fix MIME button."
   (let ((id (get-text-property (point) 'gnus-part))
+       (point (point))
        buffer-read-only)
     (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point)))
     (gnus-insert-mime-button
        buffer-read-only)
     (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point)))
     (gnus-insert-mime-button
-     handle id (list (not (mm-handle-displayed-p handle)))))
-  (mm-display-part handle))
+     handle id (list (not (mm-handle-displayed-p handle))))
+    (mm-display-part handle)
+    (goto-char point)))
 
 (defun gnus-article-goto-part (n)
   "Go to MIME part N."
 
 (defun gnus-article-goto-part (n)
   "Go to MIME part N."
@@ -2392,60 +2394,70 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   (let ((url-standalone-mode (not gnus-plugged)))
     (gnus-article-press-button)))
 
   (let ((url-standalone-mode (not gnus-plugged)))
     (gnus-article-press-button)))
 
-(defun gnus-display-mime ()
+(defun gnus-display-mime (&optional ihandles)
   "Insert MIME buttons in the buffer."
   "Insert MIME buttons in the buffer."
-  (let (ct ctl)
-    (save-restriction
-      (mail-narrow-to-head)
-      (when (setq ct (mail-fetch-field "content-type"))
-       (setq ctl (condition-case ()
-                     (mail-header-parse-content-type ct) (error nil)))))
-    (let* ((handles (mm-dissect-buffer))
-          handle name type b e display)
-      (mapcar 'mm-destroy-part gnus-article-mime-handles)
-      (setq gnus-article-mime-handles handles
-           gnus-article-mime-handle-alist nil)
-      (when handles
+  (let* ((handles (or ihandles (mm-dissect-buffer) (mm-uu-dissect)))
+        handle name type b e display)
+    (when handles
+      (unless ihandles
+       ;; Top-level call; we clean up.
+       (mm-destroy-parts gnus-article-mime-handles)
+       (setq gnus-article-mime-handles handles
+             gnus-article-mime-handle-alist nil)
        (goto-char (point-min))
        (search-forward "\n\n" nil t)
        (goto-char (point-min))
        (search-forward "\n\n" nil t)
-       (delete-region (point) (point-max))
-       (if (not (equal (car ctl) "multipart/alternative"))
-           (while (setq handle (pop handles))
-             (setq display nil)
-             (when (and (mm-automatic-display-p
-                         (car (mm-handle-type handle)))
-                        (mm-inlinable-part-p (car (mm-handle-type handle)))
-                        (or (not (mm-handle-disposition handle))
-                            (equal (car (mm-handle-disposition handle))
-                                   "inline")))
-               (setq display t))
-             (let ((id (1+ (length gnus-article-mime-handle-alist))))
-               (push (cons id handle) gnus-article-mime-handle-alist)
-               (gnus-insert-mime-button handle id (list display)))
-             (insert "\n\n")
-             (when display
-               (forward-line -2)
-               (mm-display-part handle t)
-               (goto-char (point-max))))
-         ;; Here we have multipart/alternative
-         (gnus-mime-display-alternative handles))))))
+       (delete-region (point) (point-max)))
+      (if (stringp (car handles))
+         (if (equal (car handles) "multipart/alternative")
+             (gnus-mime-display-alternative (cdr handles))
+           (gnus-mime-display-mixed (cdr handles)))
+       (gnus-mime-display-single handles)))))
+
+(defun gnus-mime-display-mixed (handles)
+  (let (handle)
+    (while (setq handle (pop handles))
+      (gnus-mime-display-single handle))))
+
+(defun gnus-mime-display-single (handle)
+  (let (display)
+    (when (and (mm-automatic-display-p
+               (car (mm-handle-type handle)))
+              (mm-inlinable-part-p (car (mm-handle-type handle)))
+              (or (not (mm-handle-disposition handle))
+                  (equal (car (mm-handle-disposition handle))
+                         "inline")))
+      (setq display t))
+    (let ((id (1+ (length gnus-article-mime-handle-alist))))
+      (push (cons id handle) gnus-article-mime-handle-alist)
+      (gnus-insert-mime-button handle id (list display)))
+    (insert "\n\n")
+    (when display
+      (forward-line -2)
+      (mm-display-part handle t)
+      (goto-char (point-max)))))
 
 (defun gnus-mime-display-alternative (handles &optional preferred)
   (let* ((preferred (mm-preferred-alternative handles preferred))
         (ihandles handles)
 
 (defun gnus-mime-display-alternative (handles &optional preferred)
   (let* ((preferred (mm-preferred-alternative handles preferred))
         (ihandles handles)
-        handle buffer-read-only)
+        (point (point))
+        handle buffer-read-only from)
     (goto-char (point-min))
     (search-forward "\n\n" nil t)
     (delete-region (point) (point-max))
     (goto-char (point-min))
     (search-forward "\n\n" nil t)
     (delete-region (point) (point-max))
-    (mapcar 'mm-remove-part gnus-article-mime-handles)
-    (setq gnus-article-mime-handles handles)
+    (when preferred
+      ;; Top-level call; we clean up.
+      (mm-remove-parts gnus-article-mime-handles)
+      (setq gnus-article-mime-handles handles
+           gnus-article-mime-handle-alist nil))
     (while (setq handle (pop handles))
       (gnus-add-text-properties
     (while (setq handle (pop handles))
       (gnus-add-text-properties
-       (point)
+       (setq from (point))
        (progn
         (insert (format "[%c] %-18s"
                         (if (equal handle preferred) ?* ? )
        (progn
         (insert (format "[%c] %-18s"
                         (if (equal handle preferred) ?* ? )
-                        (car (mm-handle-type handle))))
+                        (if (stringp (car handle))
+                            (car handle)
+                          (car (mm-handle-type handle)))))
         (point))
        `(local-map ,gnus-mime-button-map
                   ,gnus-mouse-face-prop ,gnus-article-mouse-face
         (point))
        `(local-map ,gnus-mime-button-map
                   ,gnus-mouse-face-prop ,gnus-article-mouse-face
@@ -2454,12 +2466,20 @@ If ALL-HEADERS is non-nil, no headers are hidden."
                   gnus-callback
                   (lambda (handles)
                     (gnus-mime-display-alternative
                   gnus-callback
                   (lambda (handles)
                     (gnus-mime-display-alternative
-                     ',ihandles ,(car (mm-handle-type handle))))
+                     ',ihandles ,(if (stringp (car handle))
+                                     (car handle)
+                                   (car (mm-handle-type handle)))))
                   gnus-data ,handle))
                   gnus-data ,handle))
+      (widget-convert-button 'link from (point)
+                            :action 'gnus-widget-press-button
+                            :button-keymap gnus-widget-button-keymap)
       (insert "  "))
     (insert "\n\n")
     (when preferred
       (insert "  "))
     (insert "\n\n")
     (when preferred
-      (mm-display-part preferred))))
+      (if (stringp (car preferred))
+         (gnus-display-mime preferred)
+       (mm-display-part preferred)))
+    (goto-char point)))
 
 (defun gnus-article-wash-status ()
   "Return a string which display status of article washing."
 
 (defun gnus-article-wash-status ()
   "Return a string which display status of article washing."
index 0597ff6..f54bba4 100644 (file)
@@ -3,6 +3,7 @@
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;         Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
 ;; Keywords: mail, news, MIME, offline
 
 ;; This file is part of GNU Emacs.
 ;; Keywords: mail, news, MIME, offline
 
 ;; This file is part of GNU Emacs.
index ebd839f..4d3a312 100644 (file)
@@ -299,6 +299,18 @@ variable."
      gnus-group-news-3-empty-face)
     ((and (not mailp) (eq level 3)) .
      gnus-group-news-3-face)
      gnus-group-news-3-empty-face)
     ((and (not mailp) (eq level 3)) .
      gnus-group-news-3-face)
+    ((and (= unread 0) (not mailp) (eq level 4)) .
+     gnus-group-news-4-empty-face)
+    ((and (not mailp) (eq level 4)) .
+     gnus-group-news-4-face)
+    ((and (= unread 0) (not mailp) (eq level 5)) .
+     gnus-group-news-5-empty-face)
+    ((and (not mailp) (eq level 5)) .
+     gnus-group-news-5-face)
+    ((and (= unread 0) (not mailp) (eq level 6)) .
+     gnus-group-news-6-empty-face)
+    ((and (not mailp) (eq level 6)) .
+     gnus-group-news-6-face)
     ((and (= unread 0) (not mailp)) .
      gnus-group-news-low-empty-face)
     ((and (not mailp)) .
     ((and (= unread 0) (not mailp)) .
      gnus-group-news-low-empty-face)
     ((and (not mailp)) .
index df420e6..b7e7204 100644 (file)
@@ -5,6 +5,7 @@
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;     MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;     Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;     MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;     Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
+;;     Katsumi Yamaoka  <yamaoka@jpl.org>
 ;; Keywords: mail, news, MIME
 
 ;; This file is part of GNU Emacs.
 ;; Keywords: mail, news, MIME
 
 ;; This file is part of GNU Emacs.
index 648b718..2006b4a 100644 (file)
@@ -253,10 +253,10 @@ is restarted, and sometimes reloaded."
 (defconst gnus-product-name "T-gnus"
   "Product name of this version of gnus.")
 
 (defconst gnus-product-name "T-gnus"
   "Product name of this version of gnus.")
 
-(defconst gnus-version-number "6.10.024"
+(defconst gnus-version-number "6.10.025"
   "Version number for this version of gnus.")
 
   "Version number for this version of gnus.")
 
-(defconst gnus-original-version-number "0.35"
+(defconst gnus-original-version-number "0.36"
     "Version number for this version of Gnus.")
 
 (defconst gnus-original-product-name "Pterodactyl Gnus"
     "Version number for this version of Gnus.")
 
 (defconst gnus-original-product-name "Pterodactyl Gnus"
@@ -372,6 +372,72 @@ be set in `.emacs' instead."
      ()))
   "Level 3 empty newsgroup face.")
 
      ()))
   "Level 3 empty newsgroup face.")
 
+(defface gnus-group-news-4-face
+  '((((class color)
+      (background dark))
+     (:bold t))
+    (((class color)
+      (background light))
+     (:bold t))
+    (t
+     ()))
+  "Level 4 newsgroup face.")
+
+(defface gnus-group-news-4-empty-face
+  '((((class color)
+      (background dark))
+     ())
+    (((class color)
+      (background light))
+     ())
+    (t
+     ()))
+  "Level 4 empty newsgroup face.")
+
+(defface gnus-group-news-5-face
+  '((((class color)
+      (background dark))
+     (:bold t))
+    (((class color)
+      (background light))
+     (:bold t))
+    (t
+     ()))
+  "Level 5 newsgroup face.")
+
+(defface gnus-group-news-5-empty-face
+  '((((class color)
+      (background dark))
+     ())
+    (((class color)
+      (background light))
+     ())
+    (t
+     ()))
+  "Level 5 empty newsgroup face.")
+
+(defface gnus-group-news-6-face
+  '((((class color)
+      (background dark))
+     (:bold t))
+    (((class color)
+      (background light))
+     (:bold t))
+    (t
+     ()))
+  "Level 6 newsgroup face.")
+
+(defface gnus-group-news-6-empty-face
+  '((((class color)
+      (background dark))
+     ())
+    (((class color)
+      (background light))
+     ())
+    (t
+     ()))
+  "Level 6 empty newsgroup face.")
+
 (defface gnus-group-news-low-face
   '((((class color)
       (background dark))
 (defface gnus-group-news-low-face
   '((((class color)
       (background dark))
index c77276c..261d05b 100644 (file)
@@ -116,6 +116,10 @@ If no encoding was done, nil is returned."
     (condition-case ()
        (uudecode-decode-region (point-min) (point-max))
       (error nil)))
     (condition-case ()
        (uudecode-decode-region (point-min) (point-max))
       (error nil)))
+   ((functionp encoding)
+    (condition-case ()
+       (funcall encoding (point-min) (point-max))
+      (error nil)))
    (t
     (error "Can't decode encoding %s" encoding))))
 
    (t
     (error "Can't decode encoding %s" encoding))))
 
index 5a89631..24d3de7 100644 (file)
@@ -73,7 +73,7 @@
 
 (defvar mm-user-automatic-display
   '("text/plain" "text/enriched" "text/richtext" "text/html" "image/gif"
 
 (defvar mm-user-automatic-display
   '("text/plain" "text/enriched" "text/richtext" "text/html" "image/gif"
-    "message/delivery-status"))
+    "message/delivery-status" "multipart/.*"))
 
 (defvar mm-alternative-precedence
   '("text/plain" "text/enriched" "text/richtext" "text/html")
 
 (defvar mm-alternative-precedence
   '("text/plain" "text/enriched" "text/richtext" "text/html")
         result
         (cond
          ((equal type "multipart")
         result
         (cond
          ((equal type "multipart")
-          (mm-dissect-multipart ctl))
+          (cons (car ctl) (mm-dissect-multipart ctl)))
          (t
           (mm-dissect-singlepart
            ctl
          (t
           (mm-dissect-singlepart
            ctl
 (defun mm-dissect-singlepart (ctl cte &optional force cdl description)
   (when (or force
            (not (equal "text/plain" (car ctl))))
 (defun mm-dissect-singlepart (ctl cte &optional force cdl description)
   (when (or force
            (not (equal "text/plain" (car ctl))))
-    (let ((res (list (list (mm-copy-to-buffer) ctl cte nil cdl description))))
+    (let ((res (list (mm-copy-to-buffer) ctl cte nil cdl description)))
       (push (car res) mm-dissection-list)
       res)))
 
       (push (car res) mm-dissection-list)
       res)))
 
        (save-excursion
          (save-restriction
            (narrow-to-region start (point))
        (save-excursion
          (save-restriction
            (narrow-to-region start (point))
-           (setq parts (nconc (mm-dissect-buffer t) parts)))))
+           (setq parts (nconc (list (mm-dissect-buffer t)) parts)))))
       (forward-line 2)
       (setq start (point)))
     (when start
       (save-excursion
        (save-restriction
          (narrow-to-region start end)
       (forward-line 2)
       (setq start (point)))
     (when start
       (save-excursion
        (save-restriction
          (narrow-to-region start end)
-         (setq parts (nconc (mm-dissect-buffer t) parts)))))
+         (setq parts (nconc (list (mm-dissect-buffer t)) parts)))))
     (nreverse parts)))
 
 (defun mm-copy-to-buffer ()
     (nreverse parts)))
 
 (defun mm-copy-to-buffer ()
        (let ((cur (current-buffer)))
          (if (eq method 'mailcap-save-binary-file)
              (set-buffer (generate-new-buffer "*mm*"))
        (let ((cur (current-buffer)))
          (if (eq method 'mailcap-save-binary-file)
              (set-buffer (generate-new-buffer "*mm*"))
-           (select-window (get-buffer-window cur t))
+           (let ((win (get-buffer-window cur t)))
+             (when win
+               (select-window win)))
            (switch-to-buffer (generate-new-buffer "*mm*")))
          (buffer-disable-undo)
          (mm-set-buffer-file-coding-system 'no-conversion)
            (switch-to-buffer (generate-new-buffer "*mm*")))
          (buffer-disable-undo)
          (mm-set-buffer-file-coding-system 'no-conversion)
        (mm-handle-set-undisplayer handle (cons file process))
        (message "Displaying %s..." (format method file))))))
 
        (mm-handle-set-undisplayer handle (cons file process))
        (message "Displaying %s..." (format method file))))))
 
+(defun mm-remove-parts (handles)
+  "Remove the displayed MIME parts represented by HANDLE."
+  (if (and (listp handles)
+          (bufferp (car handles)))
+      (mm-remove-part handles)
+    (let (handle)
+      (while (setq handle (pop handles))
+       (cond
+        ((stringp handle)
+         )
+        ((and (listp handle)
+              (stringp (car handle)))
+         (mm-remove-parts (cdr handle)))
+        (t
+         (mm-remove-part handle)))))))
+
+(defun mm-destroy-parts (handles)
+  "Remove the displayed MIME parts represented by HANDLE."
+  (if (and (listp handles)
+          (bufferp (car handles)))
+      (mm-destroy-part handles)
+    (let (handle)
+      (while (setq handle (pop handles))
+       (cond
+        ((stringp handle)
+         )
+        ((and (listp handle)
+              (stringp (car handle)))
+         (mm-destroy-parts (cdr handle)))
+        (t
+         (mm-destroy-part handle)))))))
+
 (defun mm-remove-part (handle)
   "Remove the displayed MIME part represented by HANDLE."
 (defun mm-remove-part (handle)
   "Remove the displayed MIME part represented by HANDLE."
-  (let ((object (mm-handle-undisplayer handle)))
-    (condition-case ()
-       (cond
-        ;; Internally displayed part.
-        ((mm-annotationp object)
-         (delete-annotation object))
-        ((or (functionp object)
-             (and (listp object)
-                  (eq (car object) 'lambda)))
-         (funcall object))
-        ;; Externally displayed part.
-        ((consp object)
-         (condition-case ()
-             (delete-file (car object))
-           (error nil))
-         (condition-case ()
-             (delete-directory (file-name-directory (car object)))
-           (error nil))
-         (condition-case ()
-             (kill-process (cdr object))
-           (error nil)))
-        ((bufferp object)
-         (when (buffer-live-p object)
-           (kill-buffer object))))
-      (error nil))
-    (mm-handle-set-undisplayer handle nil)))
+  (when (listp handle)
+    (let ((object (mm-handle-undisplayer handle)))
+      (condition-case ()
+         (cond
+          ;; Internally displayed part.
+          ((mm-annotationp object)
+           (delete-annotation object))
+          ((or (functionp object)
+               (and (listp object)
+                    (eq (car object) 'lambda)))
+           (funcall object))
+          ;; Externally displayed part.
+          ((consp object)
+           (condition-case ()
+               (delete-file (car object))
+             (error nil))
+           (condition-case ()
+               (delete-directory (file-name-directory (car object)))
+             (error nil))
+           (condition-case ()
+               (kill-process (cdr object))
+             (error nil)))
+          ((bufferp object)
+           (when (buffer-live-p object)
+             (kill-buffer object))))
+       (error nil))
+      (mm-handle-set-undisplayer handle nil))))
 
 (defun mm-display-inline (handle)
   (let* ((type (car (mm-handle-type handle)))
 
 (defun mm-display-inline (handle)
   (let* ((type (car (mm-handle-type handle)))
@@ -326,9 +361,10 @@ This overrides entries in the mailcap file."
 
 (defun mm-destroy-part (handle)
   "Destroy the data structures connected to HANDLE."
 
 (defun mm-destroy-part (handle)
   "Destroy the data structures connected to HANDLE."
-  (mm-remove-part handle)
-  (when (buffer-live-p (mm-handle-buffer handle))
-    (kill-buffer (mm-handle-buffer handle))))
+  (when (listp handle)
+    (mm-remove-part handle)
+    (when (buffer-live-p (mm-handle-buffer handle))
+      (kill-buffer (mm-handle-buffer handle)))))
 
 (defun mm-handle-displayed-p (handle)
   "Say whether HANDLE is displayed or not."
 
 (defun mm-handle-displayed-p (handle)
   "Say whether HANDLE is displayed or not."
@@ -414,10 +450,14 @@ This overrides entries in the mailcap file."
     (while (setq p (pop prec))
       (setq h handles)
       (while h
     (while (setq p (pop prec))
       (setq h handles)
       (while h
-       (setq type (car (mm-handle-type (car h))))
+       (setq type
+             (if (stringp (caar h))
+                 (caar h)
+               (car (mm-handle-type (car h)))))
        (when (and (equal p type)
                   (mm-automatic-display-p type)
        (when (and (equal p type)
                   (mm-automatic-display-p type)
-                  (or (not (mm-handle-disposition (car h)))
+                  (or (stringp (caar h))
+                      (not (mm-handle-disposition (car h)))
                       (equal (car (mm-handle-disposition (car h)))
                              "inline")))
          (setq result (car h)
                       (equal (car (mm-handle-disposition (car h)))
                              "inline")))
          (setq result (car h)
diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el
new file mode 100644 (file)
index 0000000..c3448e4
--- /dev/null
@@ -0,0 +1,150 @@
+;;; mm-uu.el -- Return uu stuffs as mm handles
+;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
+
+;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
+;; $Revision: 1.1.2.1 $
+;; Keywords: news postscript uudecode binhex shar
+  
+;; This file is not part of GNU Emacs, but the same permissions
+;; apply.
+;;
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+
+;;; Code:
+
+(eval-and-compile
+  (autoload 'binhex-decode-region "binhex")
+  (autoload 'binhex-decode-region-external "binhex")
+  (autoload 'uudecode-decode-region "uudecode")
+  (autoload 'uudecode-decode-region-external "uudecode"))
+
+(defun mm-uu-copy-to-buffer (from to)
+  "Copy the contents of the current buffer to a fresh buffer."
+  (save-excursion
+    (let ((obuf (current-buffer)))
+      (set-buffer (generate-new-buffer " *mm-uu*"))
+      (insert-buffer-substring obuf from to)
+      (current-buffer))))
+
+;;; postscript
+
+(defconst mm-uu-postscript-begin-line "^%!PS-")
+(defconst mm-uu-postscript-end-line "^%%EOF$")
+
+(defconst mm-uu-uu-begin-line "^begin[ \t]+[0-7][0-7][0-7][ \t]+\\(.*\\)$")
+(defconst mm-uu-uu-end-line "^end[ \t]*$")
+(defvar mm-uu-decode-function 'uudecode-decode-region)
+
+(defconst mm-uu-binhex-begin-line
+  "^:...............................................................$")
+(defconst mm-uu-binhex-end-line ":$")
+(defvar mm-uu-binhex-decode-function 'binhex-decode-region)
+
+(defconst mm-uu-shar-begin-line "^#! */bin/sh")
+(defconst mm-uu-shar-end-line "^exit 0")
+
+(defvar mm-uu-begin-line 
+  (concat mm-uu-postscript-begin-line "\\|"
+         mm-uu-uu-begin-line "\\|"
+         mm-uu-binhex-begin-line "\\|"
+         mm-uu-shar-begin-line))
+
+(defvar mm-uu-identifier-alist
+  '((?% . postscript) (?b . uu) (?: . binhex) (?# . shar)))
+
+;;;### autoload
+
+(defun mm-uu-dissect ()
+  "Dissect the current buffer and return a list of uu handles."
+  (save-excursion
+    (save-restriction
+      (mail-narrow-to-head)
+      (goto-char (point-max)))
+    (let ((text-start (point)) start-char end-char 
+         type file-name end-line result)
+      (while (re-search-forward mm-uu-begin-line nil t)
+       (beginning-of-line)
+       (setq start-char (point))
+       (forward-line) ;; in case of failure
+       (setq type (cdr (assq (aref (match-string 0) 0) 
+                             mm-uu-identifier-alist)))
+       (setq file-name 
+             (if (eq type 'uu)
+                 (and (match-string 1)
+                      (let ((nnheader-file-name-translation-alist
+                             '((?/ . ?,) (? . ?_) (?* . ?_) (?$ . ?_))))
+                        (nnheader-translate-file-chars (match-string 1))))))
+       (setq end-line (symbol-value 
+                       (intern (concat "mm-uu-" (symbol-name type) 
+                                      "-end-line"))))
+       (when (re-search-forward end-line nil t)
+         (setq end-char (point))
+         (when (or (not (eq type 'binhex))
+                   (setq file-name 
+                         (condition-case nil
+                             (binhex-decode-region start-char end-char t)
+                           (error nil))))
+           (if (> start-char text-start)
+               (push
+                (list (mm-uu-copy-to-buffer text-start start-char) 
+                      '("text/plain") nil nil nil nil) 
+                result))
+           (push 
+            (cond
+             ((eq type 'postscript)
+              (list (mm-uu-copy-to-buffer start-char end-char) 
+                    '("application/postscript") nil nil nil nil))
+             ((eq type 'uu)
+              (list (mm-uu-copy-to-buffer start-char end-char) 
+                    (list (or (and file-name
+                                   (string-match "\\.[^\\.]+$" file-name) 
+                                   (mailcap-extension-to-mime 
+                                    (match-string 0 file-name)))
+                              "application/octet-stream"))
+                    mm-uu-decode-function nil 
+                    (if (and file-name (not (equal file-name "")))
+                        (list "attachment" (cons 'filename file-name)))
+                  file-name))
+             ((eq type 'binhex)
+              (list (mm-uu-copy-to-buffer start-char end-char) 
+                    (list (or (and file-name
+                                   (string-match "\\.[^\\.]+$" file-name) 
+                                   (mailcap-extension-to-mime 
+                                    (match-string 0 file-name)))
+                              "application/octet-stream"))
+                    mm-uu-binhex-decode-function nil 
+                    (if (and file-name (not (equal file-name "")))
+                        (list "attachment" (cons 'filename file-name)))
+                    file-name))
+             ((eq type 'shar)
+              (list (mm-uu-copy-to-buffer start-char end-char) 
+                    '("application/x-shar") nil nil nil nil))) 
+            result)
+           (setq text-start end-char))))
+      (if (and result
+              (> start-char text-start))
+         (push
+          (list (mm-uu-copy-to-buffer text-start (point-max)) 
+                '("text/plain") nil nil nil nil) 
+          result))
+      (nreverse result))))
+
+(provide 'mm-uu)
+
+;;; mm-uu.el ends here
index 4284a3b..25d0da4 100644 (file)
@@ -1,4 +1,4 @@
-;;; nnheader.el --- header access macros for Gnus and its backends
+;;; nnheader.el --- header access macros for Semi-gnus and its backends
 ;; Copyright (C) 1987,88,89,90,93,94,95,96,97,98 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;; Copyright (C) 1987,88,89,90,93,94,95,96,97,98 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
index 8c4c08f..b90aeba 100644 (file)
@@ -116,12 +116,14 @@ Returns the process associated with the connection."
   (let ((process-buffer
         (get-buffer-create (format "trace of POP session to %s" mailhost)))
        (process)
   (let ((process-buffer
         (get-buffer-create (format "trace of POP session to %s" mailhost)))
        (process)
-       (coding-system-for-read 'binary))
+       (coding-system-for-read 'binary)
+       (coding-system-for-write 'binary))
     (save-excursion
       (set-buffer process-buffer)
       (erase-buffer)
     (save-excursion
       (set-buffer process-buffer)
       (erase-buffer)
-      (setq process (open-network-stream "POP" process-buffer mailhost port))
       (setq pop3-read-point (point-min)))
       (setq pop3-read-point (point-min)))
+    (setq process
+         (open-network-stream "POP" process-buffer mailhost port))
     (let ((response (pop3-read-response process t)))
       (setq pop3-timestamp
            (substring response (or (string-match "<" response) 0)
     (let ((response (pop3-read-response process t)))
       (setq pop3-timestamp
            (substring response (or (string-match "<" response) 0)
index 6254755..e184e0b 100644 (file)
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; $Revision: 1.1.2.1 $
+;; $Revision: 1.1.2.2 $
 ;; Keywords: news HZ 
 ;; Time-stamp: <Tue Oct  6 23:48:49 EDT 1998 zsh>
   
 ;; Keywords: news HZ 
 ;; Time-stamp: <Tue Oct  6 23:48:49 EDT 1998 zsh>
   
index 0aab25c..3d03c5d 100644 (file)
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; $Revision: 1.3 $
+;; $Revision: 5.2 $
 ;; Keywords: uudecode
 
 ;; This file is not part of GNU Emacs, but the same permissions
 ;; Keywords: uudecode
 
 ;; This file is not part of GNU Emacs, but the same permissions
index 82ae1be..18aa390 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus-ja
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus-ja
-@settitle Semi-gnus 6.10.024 Manual
+@settitle Semi-gnus 6.10.025 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
 @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
 @tex
 
 @titlepage
-@title Semi-gnus 6.10.024 Manual
+@title Semi-gnus 6.10.025 Manual
 
 @author by Lars Magne Ingebrigtsen
 @author by members of Semi-gnus mailing-list
 
 @author by Lars Magne Ingebrigtsen
 @author by members of Semi-gnus mailing-list
@@ -399,7 +399,7 @@ Semi-gnus \e$B$O!"Bg$-$J3($,F~$C$F$$$?$j$5$^$6$^$J7A<0$rMQ$$$?$j$7$F$$$k$A$g$C\e(B
 \e$B$J8@8l7w$r:9JL$7$^$;$s!#$"$"!"%/%j%s%4%s$NJ}$O\e(B Unicode Next Generation\e$B$r\e(B
 \e$B$*BT$A$/$@$5$$!#\e(B
 
 \e$B$J8@8l7w$r:9JL$7$^$;$s!#$"$"!"%/%j%s%4%s$NJ}$O\e(B Unicode Next Generation\e$B$r\e(B
 \e$B$*BT$A$/$@$5$$!#\e(B
 
-\e$B$3$N@bL@=q$O\e(B Semi-gnus 6.10.024 \e$B$KBP1~$7$^$9!#\e(B
+\e$B$3$N@bL@=q$O\e(B Semi-gnus 6.10.025 \e$B$KBP1~$7$^$9!#\e(B
 
 @end ifinfo
 
 
 @end ifinfo
 
index 540b776..d037cc1 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Semi-gnus 6.10.024 Manual
+@settitle Semi-gnus 6.10.025 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 Semi-gnus 6.10.024 Manual
+@title Semi-gnus 6.10.025 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
 
 @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.
 
 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.024.
+This manual corresponds to Semi-gnus 6.10.025.
 
 @end ifinfo
 
 
 @end ifinfo
 
index fb7ec1f..fbcfabb 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
-@settitle Pterodactyl Message 0.35 Manual
+@settitle Pterodactyl Message 0.36 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.35 Manual
+@title Pterodactyl Message 0.36 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.35.  Message is
+This manual corresponds to Pterodactyl Message 0.36.  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.