(defun mime-save-situation-examples ()
(if (or mime-preview-situation-example-list
mime-acting-situation-example-list)
- (let ((file mime-situation-examples-file))
+ (let ((file mime-situation-examples-file)
+ print-length print-level)
(with-temp-buffer
(insert ";;; " (file-name-nondirectory file) "\n")
(insert "\n;; This file is generated automatically by "
(insert "\n;;; "
(file-name-nondirectory file)
" ends here.\n")
- (static-cond
+ (static-cond
((boundp 'buffer-file-coding-system)
(setq buffer-file-coding-system
mime-situation-examples-file-coding-system))
(setq file-coding-system
mime-situation-examples-file-coding-system)))
;; (setq buffer-file-coding-system
- ;; mime-situation-examples-file-coding-system)
+ ;; mime-situation-examples-file-coding-system)
(setq buffer-file-name file)
(save-buffer)))))
)))
)
(t
- (let ((media-type (mime-entity-media-type entity))
- (media-subtype (mime-entity-media-subtype entity))
- (charset (cdr (assoc "charset" params)))
- (encoding (mime-entity-encoding entity)))
+ (let* ((charset (cdr (assoc "charset" params)))
+ (encoding (mime-entity-encoding entity))
+ (rest (format " <%s/%s%s%s>"
+ (mime-entity-media-type entity)
+ (mime-entity-media-subtype entity)
+ (if charset
+ (concat "; " charset)
+ "")
+ (if encoding
+ (concat " (" encoding ")")
+ ""))))
(concat
num " " subject
- (let ((rest
- (format " <%s/%s%s%s>"
- media-type media-subtype
- (if charset
- (concat "; " charset)
- "")
- (if encoding
- (concat " (" encoding ")")
- ""))))
- (if (>= (+ (current-column)(length rest))(window-width))
- "\n\t")
- rest)))
+ (if (>= (+ (current-column)(length rest))(window-width))
+ "\n\t")
+ rest))
)))
(function mime-preview-play-current-entity))
))
;;; @@ utility
;;;
-(defun mime-preview-find-boundary-info (&optional get-mother)
+(defun mime-preview-find-boundary-info (&optional with-children)
"Return boundary information of current part.
-If GET-MOTHER, refer boundary surrounding current part and its branches."
+If WITH-CHILDREN, refer boundary surrounding current part and its branches."
(let (entity
p-beg p-end
entity-node-id len)
((null entity-node-id)
(setq p-end (point-max))
)
- (get-mother
+ (with-children
(save-excursion
(catch 'tag
(let (e i)
(if (functionp f)
(funcall f new-buf)
(message
- (format
- "Sorry, following method for %s is not implemented yet."
- mode))
+ "Sorry, following method for %s is not implemented yet."
+ mode)
))
)))
;;;
(defun mime-preview-toggle-display (type &optional display)
- (let ((situation (mime-preview-find-boundary-info))
+ (let ((situation (mime-preview-find-boundary-info t))
(sym (intern (concat "*" (symbol-name type))))
entity p-beg p-end)
(setq p-beg (aref situation 0)