+2003-12-14 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * mime-play.el (mime-mailcap-method-sentinel): Restore deleting
+ directory routine and protection of 1st arg of `message' dropped
+ in the last change.
+ (mime-mailcap-delete-played-files): Ditto.
+
2003-12-12 ARISAWA Akihiro <ari@mbf.sphere.ne.jp>
* mime-play.el (mime-play-delete-file-immediately): New user option.
(mime-format-mailcap-command
method
(cons (cons 'filename name) situation)))
- (coding-system-for-read mime-play-messages-coding-system))
+ (coding-system-for-read mime-play-messages-coding-system))
(start-process command mime-echo-buffer-name
shell-file-name shell-command-switch command))))
(set-alist 'mime-mailcap-method-filename-alist process name)
(defun mime-mailcap-method-sentinel (process event)
(when mime-play-delete-file-immediately
(let ((file (cdr (assq process mime-mailcap-method-filename-alist))))
- (if (file-exists-p file)
- (delete-file file)))
+ (when (file-exists-p file)
+ (ignore-errors
+ (delete-file file)
+ (delete-directory (file-name-directory file)))))
(remove-alist 'mime-mailcap-method-filename-alist process))
- (message (format "%s %s" process event)))
+ (message "%s %s" process event))
(defun mime-mailcap-delete-played-files ()
(dolist (elem mime-mailcap-method-filename-alist)
(when (file-exists-p (cdr elem))
- (delete-file (cdr elem)))))
+ (ignore-errors
+ (delete-file (cdr elem))
+ (delete-directory (file-name-directory (cdr elem)))))))
(add-hook 'kill-emacs-hook 'mime-mailcap-delete-played-files)