+1998-06-08 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-play.el (mime-delq-null-situation): New function.
+ (mime-raw-play-entity): Use `mime-delq-null-situation'.
+
+1998-06-08 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * TODO (Better implementation for multipart/alternative): done.
+
+ * NEWS (type-subtype-score): New section.
+
+1998-06-07 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-view.el (mime-raw-message-info): Modify DOC-string.
+
+ * MIME-View-API-ja.ol: Modify for SEMI 1.5.
+
+1998-06-07 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-edit.el (mime-edit-touched-flag): Define by `defvar'.
+ (mime-edit-mode): Don't check `mime-edit-touched-flag' is bound or
+ not.
+
+ * mime-edit.el (mime-edit-find-inmost): Abolish unused local
+ variables.
+
+1998-06-07 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-text.el (mime-text-insert-decoded-body): Don't refer
+ `mime-raw-buffer'.
+
+ * mime-parse.el: Change format of `mime-entity' to add `buffer'.
+
+1998-06-07 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-play.el: When it is compiled, require 'bbdb or define
+ `bbdb-buffer-name' to avoid compiler warning.
+
+ (mime-method-to-display-caesar): Abolish unused local variable.
+
+ Use `eval-buffer' to eval contents of
+ `mime-acting-situation-examples-file'.
+
+1998-06-07 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mime-text.el: Move definition of variable
+ `mime-raw-representation-type' to mime-view.el.
+
+ * mime-view.el: Move definition of variable
+ `mime-raw-representation-type' from mime-text.el.
+ (mime-raw-message-info): Modify DOC-string.
+
+ * MIME-View-API-ja.ol: New file.
+
+\f
1998-06-05 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* WEMI: Version 1.5.1 (Odawara) released.
# Makefile for WEMI.
#
-VERSION = 1.5.1
+VERSION = 1.5.2
PACKAGE = wemi
SHELL = /bin/sh
* Changes in SEMI 1.5
+** type-subtype-score
+
+ Now MIME-View chooses one entity to display body in
+multipart/alternative. In this mechanism,
+`mime-view-type-subtype-score-alist' is used to specify priority of
+each entity.
+
+ Variable `mime-view-type-subtype-score-alist' is alist of
+TYPE-SUBTYPE vs. SCORE. TYPE-SUBTYPE is cons pair (TYPE . SUBTYPE),
+symbol TYPE or t. TYPE and SUBTYPE are symbol. `t' means default.
+SCORE is integer. Larger number is larger priority.
+
+
** text presentation
Change text presentation mechanism. In anything older than SEMI
* MIME-View
-** Better implementation for multipart/alternative
-
** dynamic configuration for 'mime-preview-condition
** Don't use filter-model
1.4.6 Ny\e-Dþzen \e$(BF~A1\e(B\e-A
1.5.0 Nishi-Ny\e-Dþzen \e$(B@>F~A1\e(B\e-A
1.5.1 Ikuji \e$(B@8CO\e(B
------ Kurobe \e$(B9uIt\e(B
+1.5.2 Kurobe \e$(B9uIt\e(B
----- Uozu \e$(B5{DE\e(B ; <=> \e$(BIY;3COJ}E4F;\e(B
: : :
----- Namerikawa \e$(B3j@n\e(B ; <=> \e$(BIY;3COJ}E4F;\e(B
1.4.6 K\e-Dòzu\e-A \e$(B9qI\DE\e(B ; = JR \e$(B8fEB>l@~\e(B
1.5.0 Kamonomiya \e$B3{5\\e(B
1.5.1 Odawara \e$(B>.ED86\e(B ; <=> \e$(B>.ED5^!"H":,EP;3E4F;!"0KF&H":,E4F;\e(B
------ Hayakawa \e$BAa@n\e(B
+1.5.2 Hayakawa \e$BAa@n\e(B
----- Nebukawa \e$B:,I\@n\e(B
----- Manazuru \e$B??Da\e(B
----- Yugawara \e$BEr2O86\e(B
;;; @ functions
;;;
+(defvar mime-edit-touched-flag nil)
+
;;;###autoload
(defun mime-edit-mode ()
"MIME minor mode for editing the tagged MIME message.
(interactive)
(if mime-edit-mode-flag
(mime-edit-exit)
- (if (and (boundp 'mime-edit-touched-flag)
- mime-edit-touched-flag)
+ (if mime-edit-touched-flag
(mime-edit-again)
(make-local-variable 'mime-edit-touched-flag)
(setq mime-edit-touched-flag t)
(let ((bb (match-beginning 0))
(be (match-end 0))
(type (buffer-substring (match-beginning 1)(match-end 1)))
- end-exp eb ee)
+ end-exp eb)
(setq end-exp (format "--}-<<%s>>\n" type))
(widen)
(if (re-search-forward end-exp nil t)
- (progn
- (setq eb (match-beginning 0))
- (setq ee (match-end 0))
- )
+ (setq eb (match-beginning 0))
(setq eb (point-max))
- (setq ee (point-max))
)
(narrow-to-region be eb)
(goto-char be)
(if (re-search-forward mime-edit-multipart-beginning-regexp nil t)
- (let (ret)
+ (progn
(narrow-to-region (match-beginning 0)(point-max))
(mime-edit-find-inmost)
)
;;; @ message parser
;;;
-(defsubst make-mime-entity (node-id header-start header-end
- body-start body-end
- content-type content-disposition
- encoding children)
- (vector node-id
- header-start header-end body-start body-end
+(defsubst make-mime-entity (buffer
+ node-id
+ header-start header-end body-start body-end
+ content-type content-disposition
+ encoding children)
+ (vector buffer
+ node-id header-start header-end body-start body-end
content-type content-disposition encoding children))
-(defsubst mime-entity-node-id (entity) (aref entity 0))
-(defsubst mime-entity-header-start (entity) (aref entity 1))
-(defsubst mime-entity-header-end (entity) (aref entity 2))
-(defsubst mime-entity-body-start (entity) (aref entity 3))
-(defsubst mime-entity-body-end (entity) (aref entity 4))
-(defsubst mime-entity-content-type (entity) (aref entity 5))
-(defsubst mime-entity-content-disposition (entity) (aref entity 6))
-(defsubst mime-entity-encoding (entity) (aref entity 7))
-(defsubst mime-entity-children (entity) (aref entity 8))
+(defsubst mime-entity-buffer (entity) (aref entity 0))
+(defsubst mime-entity-node-id (entity) (aref entity 1))
+(defsubst mime-entity-header-start (entity) (aref entity 2))
+(defsubst mime-entity-header-end (entity) (aref entity 3))
+(defsubst mime-entity-body-start (entity) (aref entity 4))
+(defsubst mime-entity-body-end (entity) (aref entity 5))
+(defsubst mime-entity-content-type (entity) (aref entity 6))
+(defsubst mime-entity-content-disposition (entity) (aref entity 7))
+(defsubst mime-entity-encoding (entity) (aref entity 8))
+(defsubst mime-entity-children (entity) (aref entity 9))
(defalias 'mime-entity-point-min 'mime-entity-header-start)
(defalias 'mime-entity-point-max 'mime-entity-body-end)
)
(setq children (cons ret children))
)
- (make-mime-entity node-id
- header-start header-end
- body-start body-end
+ (make-mime-entity (current-buffer) node-id
+ header-start header-end body-start body-end
content-type content-disposition encoding
(nreverse children))
))
(memq (mime-content-type-subtype content-type)
'(rfc822 news)
))
- (make-mime-entity node-id
- header-start header-end
- body-start body-end
+ (make-mime-entity (current-buffer) node-id
+ header-start header-end body-start body-end
content-type content-disposition encoding
(save-restriction
(narrow-to-region body-start body-end)
))
)
(t
- (make-mime-entity node-id
- header-start header-end
- body-start body-end
+ (make-mime-entity (current-buffer) node-id
+ header-start header-end body-start body-end
content-type content-disposition encoding nil)
))
))
(require 'alist)
(require 'filename)
-(eval-when-compile (require 'mime-text))
-
+(eval-when-compile
+ (require 'mime-text)
+ (condition-case nil
+ (require 'bbdb)
+ (error (defvar bbdb-buffer-name nil))
+ ))
(defvar mime-acting-situation-examples nil)
)))
)
+(defsubst mime-delq-null-situation (situations field)
+ (let (dest)
+ (while situations
+ (let ((situation (car situations)))
+ (if (assq field situation)
+ (setq dest (cons situation dest))
+ ))
+ (setq situations (cdr situations)))
+ dest))
+
(defun mime-raw-play-entity (entity-info &optional mode)
"Play entity specified by ENTITY-INFO.
It decodes the entity to call internal or external method. The method
cal)
cal))
(setq ret
- (or (ctree-find-calist mime-acting-condition ret
- mime-view-find-every-acting-situation)
- (ctree-find-calist mime-acting-condition cal
- mime-view-find-every-acting-situation)
+ (or (mime-delq-null-situation
+ (ctree-find-calist mime-acting-condition ret
+ mime-view-find-every-acting-situation)
+ 'method)
+ (mime-delq-null-situation
+ (ctree-find-calist mime-acting-condition cal
+ mime-view-find-every-acting-situation)
+ 'method)
))
(cond ((cdr ret)
(setq ret (select-menu-alist
(defun mime-method-to-display-caesar (start end cal)
"Internal method for mime-view to display ROT13-47-48 message."
(let* ((entity (mime-raw-find-entity-from-point start))
- (cnum (reverse (mime-entity-node-id entity)))
- (new-name (format "%s-%s" (buffer-name) cnum))
- (the-buf (current-buffer))
- (mother mime-preview-buffer)
- (charset (cdr (assoc "charset" cal)))
- (encoding (cdr (assq 'encoding cal)))
- (mode major-mode))
+ (new-name (format "%s-%s" (buffer-name)
+ (reverse (mime-entity-node-id entity))))
+ (mother mime-preview-buffer))
(let ((pwin (or (get-buffer-window mother)
(get-largest-window)))
- (buf (get-buffer-create new-name))
- )
+ (buf (get-buffer-create new-name)))
(set-window-buffer pwin buf)
(set-buffer buf)
(select-window pwin)
(set-buffer buffer)
(erase-buffer)
(insert-file-contents file)
- (eval-current-buffer)
+ (eval-buffer)
;; format check
(or (eq (car mime-acting-situation-examples) 'type)
(setq mime-acting-situation-examples nil))
(autoload 'widget-convert-text "wid-edit")
-;;; @ buffer local variables in raw-buffer
-;;;
-
-(defvar mime-raw-representation-type nil
- "Representation-type of mime-raw-buffer.
-It must be nil, `binary' or `cooked'.
-If it is nil, `mime-raw-representation-type-alist' is used as default
-value.
-Notice that this variable is usually used as buffer local variable in
-raw-buffer.")
-
-(make-variable-buffer-local 'mime-raw-representation-type)
-
-
;;; @ code conversion
;;;
MIME-encoding is value of field 'encoding of SITUATION. It must be
'nil or string. MIME-charset is value of field \"charset\" of
SITUATION. It must be symbol."
- (let ((presentation-type
+ (let* ((buffer (mime-entity-buffer entity))
+ (presentation-type
(save-excursion
- (set-buffer mime-raw-buffer)
+ (set-buffer buffer)
(or mime-raw-representation-type
(cdr (or (assq major-mode mime-raw-representation-type-alist)
(assq t mime-raw-representation-type-alist)))
))))
(save-restriction
- (insert-buffer-substring mime-raw-buffer
+ (insert-buffer-substring buffer
(mime-entity-body-start entity)
(mime-entity-body-end entity))
(let ((encoding (mime-entity-encoding entity)))
Following is a list of slots of the structure:
-node-id reversed entity-number (list of integers)
-point-min beginning point of region in raw-buffer
-point-max end point of region in raw-buffer
-type media-type (symbol)
-subtype media-subtype (symbol)
-type/subtype media-type/subtype (string or nil)
-parameters parameter of Content-Type field (association list)
-encoding Content-Transfer-Encoding (string or nil)
-children entities included in this entity (list of content-infos)
+buffer buffer includes this entity (buffer).
+node-id node-id (list of integers)
+header-start minimum point of header in raw-buffer
+header-end maximum point of header in raw-buffer
+body-start minimum point of body in raw-buffer
+body-end maximum point of body in raw-buffer
+content-type content-type (content-type)
+content-disposition content-disposition (content-disposition)
+encoding Content-Transfer-Encoding (string or nil)
+children entities included in this entity (list of entity)
If an entity includes other entities in its body, such as multipart or
message/rfc822, `mime-entity' structures of them are included in
`children', so the `mime-entity' structure become a tree.")
(make-variable-buffer-local 'mime-raw-message-info)
+
(defvar mime-preview-buffer nil
"MIME-preview buffer corresponding with the (raw) buffer.")
(make-variable-buffer-local 'mime-preview-buffer)
+
+(defvar mime-raw-representation-type nil
+ "Representation-type of mime-raw-buffer.
+It must be nil, `binary' or `cooked'.
+If it is nil, `mime-raw-representation-type-alist' is used as default
+value.
+Notice that this variable is usually used as buffer local variable in
+raw-buffer.")
+
+(make-variable-buffer-local 'mime-raw-representation-type)
+
(defvar mime-raw-representation-type-alist
'((mime-show-message-mode . binary)
(mime-temp-message-mode . binary)
(eval-when-compile (require 'cl))
-(defconst mime-module-version '("WEMI" "Odawara" 1 5 1)
+(defconst mime-module-version '("WEMI" "Hayakawa" 1 5 2)
"Implementation name, version name and numbers of MIME-kernel package.")
(autoload 'mule-caesar-region "mule-caesar"