+1998-06-10 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-edit.el (mime-edit-enclose-region-internal): Abolish unused
+ local variable.
+
+1998-06-09 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * MIME-View-API-ja.ol (entity): Add description of
+ `mime-entity-number'.
+
+ * mime-play.el (mime-method-to-display-caesar): Use
+ `mime-entity-number'.
+
+ * mime-parse.el (mime-entity-number): New function.
+
+1998-06-09 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * MIME-View-API-ja.ol (entity-button): Modify description of
+ `mime-view-insert-entity-button'.
+
+ * mime-view.el (mime-view-insert-entity-button): Change interface.
+ (mime-view-display-entity): Modify for
+ `mime-view-insert-entity-button'.
+
1998-06-09 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+ * MIME-View-API-ja.ol (entity-button): Modify description of
+ `mime-view-entity-button-visible-p'.
+
+ * mime-view.el (mime-view-entity-button-visible-p): Change
+ interface.
+ (mime-view-display-entity): Modify for
+ `mime-view-entity-button-visible-p'.
+
+1998-06-09 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * MIME-View-API-ja.ol: Add description of `mime-entity-parent' and
+ abolish description `mime-raw-entity-parent'.
+
* mime-view.el (mime-entity-parent): New function; abolish
`mime-raw-entity-parent'.
(mime-view-entity-button-visible-p): Use `mime-entity-parent'
entity \e$B$N@8@.;R!#\e(B
+[\e$B4X?t\e(B] mime-entity-number (ENTITY)
+
+ ENTITY \e$B$N\e(B entity-number \e$B$rJV$9!#\e(B
+
+
[\e$B4X?t\e(B] mime-entity-parent (ENTITY &optional MESSAGE-INFO)
ENTITY \e$B$N?F$N\e(B entity \e$B$rJV$9!#\e(B
** entity-button
-[\e$B4X?t\e(B] mime-view-entity-button-visible-p (ENTITY MESSAGE-INFO)
+[\e$B4X?t\e(B] mime-view-entity-button-visible-p (ENTITY)
\e$BHs\e(B nil \e$B$N>l9g!"\e(Bentity-button \e$B$rI=<($9$k$3$H$rI=$9!#\e(B
-[\e$B4X?t\e(B] mime-view-insert-entity-button (ENTITY MESSAGE-INFO SUBJECT)
+[\e$B4X?t\e(B] mime-view-insert-entity-button (ENTITY SUBJECT)
ENTITY \e$B$N\e(B entity-button \e$B$rA^F~$9$k!#\e(B
(defun mime-edit-enclose-region-internal (type beg end)
(save-excursion
(goto-char beg)
- (let ((current (point)))
- (save-restriction
- (narrow-to-region beg end)
- (insert (format "--<<%s>>-{\n" type))
- (goto-char (point-max))
- (insert (format "--}-<<%s>>\n" type))
- (goto-char (point-max))
+ (save-restriction
+ (narrow-to-region beg end)
+ (insert (format "--<<%s>>-{\n" type))
+ (goto-char (point-max))
+ (insert (format "--}-<<%s>>\n" type))
+ (goto-char (point-max))
+ )
+ (or (looking-at mime-edit-beginning-tag-regexp)
+ (eobp)
+ (insert (mime-make-text-tag) "\n")
)
- (or (looking-at mime-edit-beginning-tag-regexp)
- (eobp)
- (insert (mime-make-text-tag) "\n")
- )
- )))
+ ))
(defun mime-edit-enclose-quote-region (beg end)
(interactive "*r")
(defsubst mime-entity-encoding (entity) (aref entity 8))
(defsubst mime-entity-children (entity) (aref entity 9))
+(defsubst mime-entity-number (entity)
+ (reverse (mime-entity-node-id entity)))
+
(defalias 'mime-entity-point-min 'mime-entity-header-start)
(defalias 'mime-entity-point-max 'mime-entity-body-end)
+
(defsubst mime-entity-media-type (entity)
(mime-content-type-primary-type (mime-entity-content-type entity)))
(defsubst mime-entity-media-subtype (entity)
(mime-content-type-subtype (mime-entity-content-type entity)))
(defsubst mime-entity-parameters (entity)
(mime-content-type-parameters (mime-entity-content-type entity)))
+
(defsubst mime-entity-type/subtype (entity-info)
(mime-type/subtype-string (mime-entity-media-type entity-info)
(mime-entity-media-subtype entity-info)))
"Internal method for mime-view to display ROT13-47-48 message."
(let* ((entity (mime-raw-find-entity-from-point start))
(new-name (format "%s-%s" (buffer-name)
- (reverse (mime-entity-node-id entity))))
+ (mime-entity-number entity)))
(mother mime-preview-buffer))
(let ((pwin (or (get-buffer-window mother)
(get-largest-window)))
(setq children (cdr children)))
message-info))))
+(defsubst mime-entity-parent (entity &optional message-info)
+ "Return mother entity of ENTITY.
+If optional argument MESSAGE-INFO is not specified,
+`mime-raw-message-info' in buffer of ENTITY is used."
+ (mime-raw-find-entity-from-node-id
+ (cdr (mime-entity-node-id entity))
+ (or message-info
+ (save-excursion
+ (set-buffer (mime-entity-buffer entity))
+ mime-raw-message-info))))
+
(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,
"Return entity-number from POINT in mime-raw-buffer.
If optional argument MESSAGE-INFO is not specified,
`mime-raw-message-info' is used."
- (reverse (mime-raw-point-to-entity-node-id point message-info)))
-
-(defsubst mime-raw-entity-parent (entity &optional message-info)
- "Return mother entity of ENTITY.
-If optional argument MESSAGE-INFO is not specified,
-`mime-raw-message-info' is used."
- (mime-raw-find-entity-from-node-id (cdr (mime-entity-node-id entity))
- message-info))
+ (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.
;;; @@@ predicate function
;;;
-(defun mime-view-entity-button-visible-p (entity message-info)
+(defun mime-view-entity-button-visible-p (entity)
"Return non-nil if header of ENTITY is visible.
Please redefine this function if you want to change default setting."
(let ((media-type (mime-entity-media-type entity))
(or (not (eq media-type 'application))
(and (not (eq media-subtype 'x-selection))
(or (not (eq media-subtype 'octet-stream))
- (let ((mother-entity
- (mime-raw-entity-parent entity message-info)))
+ (let ((mother-entity (mime-entity-parent entity)))
(or (not (eq (mime-entity-media-type mother-entity)
'multipart))
(not (eq (mime-entity-media-subtype mother-entity)
;;; @@@ entity button generator
;;;
-(defun mime-view-insert-entity-button (entity message-info subj)
+(defun mime-view-insert-entity-button (entity subject)
"Insert entity-button of ENTITY."
(let ((entity-node-id (mime-entity-node-id entity))
(params (mime-entity-parameters entity)))
(setq access-type (cdr access-type))
(if server
(format "%s %s ([%s] %s)"
- num subj access-type (cdr server))
+ num subject access-type (cdr server))
(let ((site (cdr (assoc "site" params)))
(dir (cdr (assoc "directory" params)))
)
(format "%s %s ([%s] %s:%s)"
- num subj access-type site dir)
+ num subject access-type site dir)
)))
)
(t
(charset (cdr (assoc "charset" params)))
(encoding (mime-entity-encoding entity)))
(concat
- num " " subj
+ num " " subject
(let ((rest
(format " <%s/%s%s%s>"
media-type media-subtype
(setq nb (point))
(narrow-to-region nb nb)
(or button-is-invisible
- (if (mime-view-entity-button-visible-p entity message-info)
- (mime-view-insert-entity-button entity message-info subj)
+ (if (mime-view-entity-button-visible-p entity)
+ (mime-view-insert-entity-button entity subj)
))
(if header-is-visible
(save-restriction
(t
(when button-is-invisible
(goto-char (point-max))
- (mime-view-insert-entity-button entity message-info subj)
+ (mime-view-insert-entity-button entity subj)
)
(or header-is-visible
(progn