;;; @ content decoder
;;;
+;;;###autoload
(defun mime-preview-play-current-entity (&optional ignore-examples mode)
"Play current entity.
It decodes current entity to call internal or external method. The
(cons match example)
))
+;;;###autoload
(defun mime-play-entity (entity &optional situation ignored-method)
"Play entity specified by ENTITY.
It decodes the entity to call internal or external method. The method
is selected from variable `mime-acting-condition'. If MODE is
specified, play as it. Default MODE is \"play\"."
(let (method ret)
+ (in-calist-package 'mime-view)
(setq ret
(mime-delq-null-situation
(ctree-find-calist mime-acting-condition
window.")
(defun mime-show-echo-buffer (&rest forms)
- "Show mime-echo buffer to display MIME-playing information."
+ "Show mime-echo buffer to display MIME-playing information.
+It returns the list of window, start and end positions of inserted text.
+A window height of the buffer `mime-echo-buffer-name' will be determined
+by `mime-echo-window-height' (its value or its return value) whenever
+this function is called."
(get-buffer-create mime-echo-buffer-name)
(let ((the-win (selected-window))
- (win (get-buffer-window mime-echo-buffer-name)))
- (unless win
+ (win (get-buffer-window mime-echo-buffer-name))
+ (height (if (functionp mime-echo-window-height)
+ (funcall mime-echo-window-height)
+ mime-echo-window-height))
+ start)
+ (if win
+ (progn
+ (select-window win)
+ (enlarge-window (- height (window-height)))
+ )
(unless (and mime-echo-window-is-shared-with-bbdb
(condition-case nil
- (setq win (get-buffer-window bbdb-buffer-name))
+ (select-window
+ (setq win (get-buffer-window bbdb-buffer-name))
+ )
(error nil)))
(select-window (get-buffer-window (or mime-preview-buffer
(current-buffer))))
- (setq win (split-window-vertically
- (- (window-height)
- (if (functionp mime-echo-window-height)
- (funcall mime-echo-window-height)
- mime-echo-window-height)
- )))
- )
- (set-window-buffer win mime-echo-buffer-name)
- )
- (select-window win)
- (goto-char (point-max))
+ (let ((window-min-height 1))
+ (setq win (split-window-vertically (- (window-height) height)))
+ )
+ (set-window-buffer win mime-echo-buffer-name)
+ (select-window win)
+ ))
+ (goto-char (setq start (point-max)))
(if forms
- (insert (apply (function format) forms))
- )
- (select-window the-win)
- ))
+ (let ((buffer-read-only nil))
+ (insert (apply (function format) forms))
+ ))
+ (prog1
+ (list win start (point))
+ (select-window the-win)
+ )))
;;; @ file name
;;;
(defun mime-store-message/partial-piece (entity cal)
- (goto-char (mime-entity-point-min entity))
(let* ((root-dir
(expand-file-name
(concat "m-prts-" (user-login-name)) temporary-file-directory))
(number (cdr (assoc "number" cal)))
(total (cdr (assoc "total" cal)))
file
- (mother mime-preview-buffer)
+ (mother (current-buffer))
)
(or (file-exists-p root-dir)
(make-directory root-dir)