* gnus-art.el (gnus-mime-save-part-and-strip): Clarify prompt.
[gnus] / lisp / gnus-art.el
index 2c50b8d..74821df 100644 (file)
@@ -4164,7 +4164,8 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
        (gnus-summary-edit-article-done
         ,(or (mail-header-references gnus-current-headers) "")
         ,(gnus-group-read-only-p)
-        ,gnus-summary-buffer no-highlight)))
+        ,gnus-summary-buffer no-highlight))
+     t)
     (gnus-article-edit-done)
     (gnus-summary-expand-window)
     (gnus-summary-show-article)
@@ -4185,7 +4186,7 @@ The current article has a complicated MIME structure, giving up..."))
         (id (get-text-property (point) 'gnus-part))
         file param
         (handles gnus-article-mime-handles))
-    (setq file (and data (mm-save-part data)))
+    (setq file (and data (mm-save-part data "Delete MIME part and save to: ")))
     (when file
       (with-current-buffer (mm-handle-buffer data)
        (erase-buffer)
@@ -4514,13 +4515,15 @@ If no internal viewer is available, use an external viewer."
     (if action-pair
        (funcall (cdr action-pair)))))
 
-(defun gnus-article-part-wrapper (n function)
+(defun gnus-article-part-wrapper (n function &optional no-handle)
   (with-current-buffer gnus-article-buffer
     (when (> n (length gnus-article-mime-handle-alist))
       (error "No such part"))
     (gnus-article-goto-part n)
-    (let ((handle (cdr (assq n gnus-article-mime-handle-alist))))
-      (funcall function handle))))
+    (if no-handle
+       (funcall function)
+      (let ((handle (cdr (assq n gnus-article-mime-handle-alist))))
+       (funcall function handle)))))
 
 (defun gnus-article-pipe-part (n)
   "Pipe MIME part N, which is the numerical prefix."
@@ -4558,6 +4561,18 @@ N is the numerical prefix."
   (interactive "p")
   (gnus-article-part-wrapper n 'gnus-mime-inline-part))
 
+(defun gnus-article-save-part-and-strip (n)
+  "Save MIME part N and replace it with an external body.
+N is the numerical prefix."
+  (interactive "p")
+  (gnus-article-part-wrapper n 'gnus-mime-save-part-and-strip t))
+
+(defun gnus-article-delete-part (n)
+  "Delete MIME part N and add some information about the removed part.
+N is the numerical prefix."
+  (interactive "p")
+  (gnus-article-part-wrapper n 'gnus-mime-delete-part t))
+
 (defun gnus-article-mime-match-handle-first (condition)
   (if condition
       (let (n)
@@ -5819,7 +5834,7 @@ groups."
        ,(or (mail-header-references gnus-current-headers) "")
        ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight))))
 
-(defun gnus-article-edit-article (start-func exit-func)
+(defun gnus-article-edit-article (start-func exit-func &optional quiet)
   "Start editing the contents of the current article buffer."
   (let ((winconf (current-window-configuration)))
     (set-buffer gnus-article-buffer)
@@ -5832,7 +5847,8 @@ groups."
     (gnus-configure-windows 'edit-article)
     (setq gnus-article-edit-done-function exit-func)
     (setq gnus-prev-winconf winconf)
-    (gnus-message 6 "C-c C-c to end edits")))
+    (unless quiet
+      (gnus-message 6 "C-c C-c to end edits"))))
 
 (defun gnus-article-edit-done (&optional arg)
   "Update the article edits and exit."