From: Katsumi Yamaoka Date: Tue, 30 Aug 2005 06:06:44 +0000 (+0000) Subject: * gnus-art.el (gnus-mime-save-part-and-strip): Clarify prompt. X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=e522dcc738f3cbfa4a1a5814813e1c3196a87af4 * gnus-art.el (gnus-mime-save-part-and-strip): Clarify prompt. Suggested by Dan Christensen. * mm-decode.el (mm-save-part): Enable change of prompt. --- diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index aa16a2166..74821df6e 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4186,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) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 2a03738f9..4af88ee28 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -1092,8 +1092,9 @@ string if you do not like underscores." (setq filename (gnus-replace-in-string filename "[<>|]" "")) (gnus-replace-in-string filename "^[.-]+" "")) -(defun mm-save-part (handle) - "Write HANDLE to a file." +(defun mm-save-part (handle &optional prompt) + "Write HANDLE to a file. +PROMPT overrides the default one used to ask user for a file name." (let* ((name (mail-content-type-get (mm-handle-type handle) 'name)) (filename (mail-content-type-get (mm-handle-disposition handle) 'filename)) @@ -1103,7 +1104,7 @@ string if you do not like underscores." (file-name-nondirectory filename)))) (setq file (mm-with-multibyte - (read-file-name "Save MIME part to: " + (read-file-name (or prompt "Save MIME part to: ") (or mm-default-directory default-directory) nil nil (or filename name "")))) (setq mm-default-directory (file-name-directory file))