From 94e7a2b930f36170d578a9a5e4bda6012b300ed2 Mon Sep 17 00:00:00 2001 From: morioka Date: Thu, 12 Mar 1998 12:36:51 +0000 Subject: [PATCH] (mime-extract-current-entity): New function; copied from mime-file.el. --- mime-play.el | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/mime-play.el b/mime-play.el index a6a03de..0db221d 100644 --- a/mime-play.el +++ b/mime-play.el @@ -248,6 +248,39 @@ window.") ) +;;; @ file extraction +;;; + +(defun mime-extract-current-entity (beg end cal) + (goto-char beg) + (let* ((name + (save-restriction + (narrow-to-region beg end) + (mime-article/get-filename cal) + )) + (encoding (cdr (assq 'encoding cal))) + (filename + (if (and name (not (string-equal name ""))) + (expand-file-name name + (call-interactively + (function + (lambda (dir) + (interactive "DDirectory: ") + dir)))) + (call-interactively + (function + (lambda (file) + (interactive "FFilename: ") + (expand-file-name file)))))) + ) + (if (file-exists-p filename) + (or (yes-or-no-p (format "File %s exists. Save anyway? " filename)) + (error ""))) + (re-search-forward "\n\n") + (mime-write-decoded-region (match-end 0)(point-max) filename encoding) + )) + + ;;; @ mail/news message ;;; -- 1.7.10.4