From: morioka Date: Wed, 28 Jul 1999 11:16:03 +0000 (+0000) Subject: (mime-raw-find-entity-from-point): Deleted. X-Git-Tag: remi-1_13_2~27 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cb60e451e042b1018eb87b8987f2fb79011b9b01;p=elisp%2Fsemi.git (mime-raw-find-entity-from-point): Deleted. (mime-raw-buffer): Deleted. (mime-preview-original-major-mode): Add new optional argument `point'; refer text-property `mime-view-situation' instead of using `mime-entity-buffer'. (mime-raw-point-to-entity-node-id): Deleted. (mime-raw-point-to-entity-number): Deleted. (mime-raw-flatten-message-info): Deleted. (mime-display-entity): Add text-property `mime-view-situation' to each entity. --- diff --git a/mime-view.el b/mime-view.el index 80ef939..245684c 100644 --- a/mime-view.el +++ b/mime-view.el @@ -82,24 +82,25 @@ major-mode or t. t means default. REPRESENTATION-TYPE must be `binary' or `cooked'.") -(defun mime-raw-find-entity-from-point (point &optional message-info) - "Return entity from POINT in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (or message-info - (setq message-info mime-message-structure)) - (if (and (<= (mime-entity-point-min message-info) point) - (<= point (mime-entity-point-max message-info))) - (let ((children (mime-entity-children message-info))) - (catch 'tag - (while children - (let ((ret - (mime-raw-find-entity-from-point point (car children)))) - (if ret - (throw 'tag ret) - )) - (setq children (cdr children))) - message-info)))) +;; (defun mime-raw-find-entity-from-point (point &optional message-info) +;; "Return entity from POINT in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (or message-info +;; (setq message-info mime-message-structure)) +;; (if (and (<= (mime-entity-point-min message-info) point) +;; (<= point (mime-entity-point-max message-info))) +;; (let ((children (mime-entity-children message-info))) +;; (catch 'tag +;; (while children +;; (let ((ret +;; (mime-raw-find-entity-from-point point (car children)))) +;; (if ret +;; (throw 'tag ret) +;; )) +;; (setq children (cdr children))) +;; message-info)))) +;; (make-obsolete 'mime-raw-find-entity-from-point "don't use it.") ;;; @ in preview-buffer (presentation space) @@ -111,15 +112,15 @@ If current MIME-preview buffer is generated by other buffer, such as message/partial, it is called `mother-buffer'.") (make-variable-buffer-local 'mime-mother-buffer) -(defvar mime-raw-buffer nil - "Raw buffer corresponding with the (MIME-preview) buffer.") -(make-variable-buffer-local 'mime-raw-buffer) +;; (defvar mime-raw-buffer nil +;; "Raw buffer corresponding with the (MIME-preview) buffer.") +;; (make-variable-buffer-local 'mime-raw-buffer) (defvar mime-preview-original-window-configuration nil "Window-configuration before mime-view-mode is called.") (make-variable-buffer-local 'mime-preview-original-window-configuration) -(defun mime-preview-original-major-mode (&optional recursive) +(defun mime-preview-original-major-mode (&optional recursive point) "Return major-mode of original buffer. If optional argument RECURSIVE is non-nil and current buffer has mime-mother-buffer, it returns original major-mode of the @@ -129,11 +130,8 @@ mother-buffer." (set-buffer mime-mother-buffer) (mime-preview-original-major-mode recursive) ) - (save-excursion - (set-buffer - (mime-entity-buffer - (get-text-property (point-min) 'mime-view-entity))) - major-mode))) + (cdr (assq 'original-major-mode + (get-text-property (or point (point)) 'mime-view-situation))))) ;;; @ entity information @@ -228,30 +226,34 @@ mother-buffer." "")) -(defsubst mime-raw-point-to-entity-node-id (point &optional message-info) - "Return entity-node-id from POINT in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (mime-entity-node-id (mime-raw-find-entity-from-point point message-info))) - -(defsubst mime-raw-point-to-entity-number (point &optional message-info) - "Return entity-number from POINT in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (mime-entity-number (mime-raw-find-entity-from-point point message-info))) - -(defun mime-raw-flatten-message-info (&optional message-info) - "Return list of entity in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (or message-info - (setq message-info mime-message-structure)) - (let ((dest (list message-info)) - (rcl (mime-entity-children message-info))) - (while rcl - (setq dest (nconc dest (mime-raw-flatten-message-info (car rcl)))) - (setq rcl (cdr rcl))) - dest)) +;; (defsubst mime-raw-point-to-entity-node-id (point &optional message-info) +;; "Return entity-node-id from POINT in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (mime-entity-node-id (mime-raw-find-entity-from-point point message-info))) + +;; (make-obsolete 'mime-raw-point-to-entity-node-id "don't use it.") + +;; (defsubst mime-raw-point-to-entity-number (point &optional message-info) +;; "Return entity-number from POINT in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (mime-entity-number (mime-raw-find-entity-from-point point message-info))) + +;; (make-obsolete 'mime-raw-point-to-entity-number "don't use it.") + +;; (defun mime-raw-flatten-message-info (&optional message-info) +;; "Return list of entity in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (or message-info +;; (setq message-info mime-message-structure)) +;; (let ((dest (list message-info)) +;; (rcl (mime-entity-children message-info))) +;; (while rcl +;; (setq dest (nconc dest (mime-raw-flatten-message-info (car rcl)))) +;; (setq rcl (cdr rcl))) +;; dest)) ;;; @ presentation of preview @@ -805,6 +807,7 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (setq ne (point-max)) (widen) (put-text-property nb ne 'mime-view-entity entity) + (put-text-property nb ne 'mime-view-situation situation) (put-text-property nbb ne 'mime-view-entity-body entity) (goto-char ne) (if children