* mm-decode.el (mm-complicated-handles): New function reviving former
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 10 Mar 2004 11:52:08 +0000 (11:52 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 10 Mar 2004 11:52:08 +0000 (11:52 +0000)
 definition of mm-multiple-handles.

* gnus-art.el (gnus-mime-save-part-and-strip): Use it.
(gnus-mime-delete-part): Use it.

lisp/ChangeLog
lisp/gnus-art.el
lisp/mm-decode.el

index 401bcac..bfd61c3 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-decode.el (mm-complicated-handles): New function reviving
+       former definition of mm-multiple-handles.
+
+       * gnus-art.el (gnus-mime-save-part-and-strip): Use it.
+       (gnus-mime-delete-part): Use it.
+
 2004-03-09  Kevin Greiner <kgreiner@xpediantsolutions.com>
 
        * gnus-agent.el (gnus-agent-read-local): Bind
index 81da9ce..448751c 100644 (file)
@@ -3988,6 +3988,9 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
   (gnus-article-check-buffer)
   (when (gnus-group-read-only-p)
     (error "The current group does not support deleting of parts"))
+  (when (mm-complicated-handles gnus-article-mime-handles)
+    (error "\
+The current article has a complicated MIME structure, giving up..."))
   (when (gnus-yes-or-no-p "\
 Deleting parts may malfunction or destroy the article; continue? ")
     (let* ((data (get-text-property (point) 'gnus-data))
@@ -4019,6 +4022,9 @@ Replace it with some information about the removed part."
   (gnus-article-check-buffer)
   (when (gnus-group-read-only-p)
     (error "The current group does not support deleting of parts"))
+  (when (mm-complicated-handles gnus-article-mime-handles)
+    (error "\
+The current article has a complicated MIME structure, giving up..."))
   (when (gnus-yes-or-no-p "\
 Deleting parts may malfunction or destroy the article; continue? ")
     (let* ((data (get-text-property (point) 'gnus-data))
index d41906f..e259120 100644 (file)
@@ -1455,6 +1455,10 @@ If RECURSIVE, search recursively."
        (or (listp (car handles))
           (stringp (car handles)))))
 
+(defun mm-complicated-handles (handles)
+  (and (listp (car handles))
+       (> (length handles) 1)))
+
 (defun mm-merge-handles (handles1 handles2)
   (append
    (if (listp (car handles1))