From: morioka Date: Mon, 11 May 1998 16:13:58 +0000 (+0000) Subject: Sync up with REMI 1.4.0-pre1. X-Git-Tag: semi-1_4_3~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e276ba5bc8fc87fa65cf8e2881a216f798f5cb3;p=elisp%2Fsemi.git Sync up with REMI 1.4.0-pre1. --- diff --git a/ChangeLog b/ChangeLog index 0de4662..c1837d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +1998-05-11 MORIOKA Tomohiko + + * Makefile (PACKAGE): New variable. + (tar): Use $(PACKAGE). + +1998-05-11 MORIOKA Tomohiko + + * mime-parse.el: Change data format of mime-content-type. + +1998-05-11 MORIOKA Tomohiko + + * mime-edit.el (mime-edit-decode-buffer): Use + 'mime-content-type-primary-type, 'mime-content-type-subtype and + 'mime-content-type-parameters. + +1998-05-11 MORIOKA Tomohiko + + * mime-parse.el (mime-content-type-primary-type): New function. + (mime-content-type-subtype): New function. + (mime-content-type-parameters): New function. + (mime-parse-message): Use 'mime-content-type-primary-type, + 'mime-content-type-subtype and 'mime-content-type-parameters. + 1998-05-10 MORIOKA Tomohiko * mime-parse.el: Abolish function 'symbol-concat because it is not @@ -37,7 +60,7 @@ 1998-05-06 MORIOKA Tomohiko - * SEMI: Version 1.4.1 (-DÒmi) released.-A + * SEMI: Version 1.4.1 (-DÒmi)-A released. * README.en (Required environment): Modify for FLIM 1.2.0. @@ -197,7 +220,7 @@ 1998-04-25 MORIOKA Tomohiko - * SEMI: Version 1.3.2 (N-Dò) was released.-A + * SEMI: Version 1.3.2 (N-Dò)-A was released. * mime-edit.el (mime-edit-mode-entity-prefix): New variable. (mime-edit-mode-entity-map): New variable. @@ -852,7 +875,7 @@ 1998-03-13 MORIOKA Tomohiko - * SEMI: Version 1.0.2 (Nonoichi-K-Dòdaimae) was released.-A + * SEMI: Version 1.0.2 (Nonoichi-K-Dòdaimae)-A was released. 1998-03-12 MORIOKA Tomohiko @@ -964,7 +987,7 @@ 1998-02-25 MORIOKA Tomohiko - * SEMI: Version 1.0.0 (Nukaj-Dþtaku-mae) was released.-A + * SEMI: Version 1.0.0 (Nukaj-Dþtaku-mae)-A was released. * SEMI-ELS: Remove mime-tar.el. @@ -1101,7 +1124,7 @@ 1997-11-16 MORIOKA Tomohiko - * SEMI: Version 0.116 (D-Dòhòji) was released.-A + * SEMI: Version 0.116 (D-Dòhòji)-A was released. 1997-11-15 MORIOKA Tomohiko diff --git a/Makefile b/Makefile index 92454e7..193b8a2 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ # Makefile for SEMI kernel. # -VERSION = 1.4.2 +VERSION = 1.4.3 +PACKAGE = semi SHELL = /bin/sh MAKE = make @@ -57,14 +58,14 @@ clean: tar: cvs commit - sh -c 'cvs tag -RF semi-`echo $(VERSION) \ + sh -c 'cvs tag -RF $(PACKAGE)-`echo $(VERSION) \ | sed s/\\\\./_/ | sed s/\\\\./_/`; \ cd /tmp; \ cvs -d :pserver:anonymous@chamonix.jaist.ac.jp:/hare/cvs/root \ - export -d semi-$(VERSION) \ - -r semi-`echo $(VERSION) \ + export -d $(PACKAGE)-$(VERSION) \ + -r $(PACKAGE)-`echo $(VERSION) \ | sed s/\\\\./_/ | sed s/\\\\./_/` semi' - $(RM) /tmp/semi-$(VERSION)/ftp.in - cd /tmp; $(TAR) cvzf semi-$(VERSION).tar.gz semi-$(VERSION) - cd /tmp; $(RM) -r semi-$(VERSION) + $(RM) /tmp/$(PACKAGE)-$(VERSION)/ftp.in + cd /tmp; $(TAR) cvzf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) + cd /tmp; $(RM) -r $(PACKAGE)-$(VERSION) sed "s/VERSION/$(VERSION)/" < ftp.in > ftp diff --git a/mime-edit.el b/mime-edit.el index b9f0d3e..4209551 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -2553,10 +2553,9 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (goto-char (point-min)) (let ((ctl (mime-read-Content-Type))) (if ctl - (let ((type (car ctl)) - (stype (car (cdr ctl))) - (params (cdr (cdr ctl))) - ) + (let ((type (mime-content-type-primary-type ctl)) + (stype (mime-content-type-subtype ctl)) + (params (mime-content-type-parameters ctl))) (cond ((and (eq type 'application)(eq stype 'pgp-signature)) (delete-region (point-min)(point-max)) diff --git a/mime-parse.el b/mime-parse.el index c460932..f656abb 100644 --- a/mime-parse.el +++ b/mime-parse.el @@ -68,6 +68,10 @@ (substring str e) )))) + +;;; @ Content-Type +;;; + (defun mime-parse-Content-Type (string) "Parse STRING as field-body of Content-Type field. Return value is @@ -87,9 +91,35 @@ are string." (setq dest (cons (car ret) dest) string (cdr ret)) ) - (cons (intern type) (cons (intern subtype) (nreverse dest))) + (list* (cons 'type (intern type)) + (cons 'subtype (intern subtype)) + (nreverse dest)) ))) +(defun mime-read-Content-Type () + "Read field-body of Content-Type field from current-buffer, +and return parsed it. Format of return value is as same as +`mime-parse-Content-Type'." + (let ((str (std11-field-body "Content-Type"))) + (if str + (mime-parse-Content-Type str) + ))) + +(defsubst mime-content-type-primary-type (content-type) + "Return primary-type of CONTENT-TYPE." + (cdr (car content-type))) + +(defsubst mime-content-type-subtype (content-type) + "Return primary-type of CONTENT-TYPE." + (cdr (cadr content-type))) + +(defsubst mime-content-type-parameters (content-type) + "Return primary-type of CONTENT-TYPE." + (cddr content-type)) + + +;;; @ Content-Disposition +;;; (defconst mime-disposition-type-regexp mime-token-regexp) @@ -108,19 +138,18 @@ are string." (cons ctype (nreverse dest)) ))) - -;;; @ field reader -;;; - -(defun mime-read-Content-Type () - "Read field-body of Content-Type field from current-buffer, -and return parsed it. Format of return value is as same as -`mime-parse-Content-Type'." - (let ((str (std11-field-body "Content-Type"))) +(defun mime/Content-Disposition () + "Read field-body of Content-Disposition field from current-buffer, +and return parsed it. [mime-parse.el]" + (let ((str (std11-field-body "Content-Disposition"))) (if str - (mime-parse-Content-Type str) + (mime-parse-Content-Disposition str) ))) + +;;; @ Content-Transfer-Encoding +;;; + (defun mime/Content-Transfer-Encoding (&optional default-encoding) "Read field-body of Content-Transfer-Encoding field from current-buffer, and return it. @@ -136,14 +165,6 @@ If is is not found, return DEFAULT-ENCODING. [mime-parse.el]" default-encoding) )) -(defun mime/Content-Disposition () - "Read field-body of Content-Disposition field from current-buffer, -and return parsed it. [mime-parse.el]" - (let ((str (std11-field-body "Content-Disposition"))) - (if str - (mime-parse-Content-Disposition str) - ))) - ;;; @ message parser ;;; @@ -222,11 +243,10 @@ DEFAULT-CTL is used when an entity does not have valid Content-Type field. Its format must be as same as return value of mime-{parse|read}-Content-Type." (setq default-ctl (or (mime-read-Content-Type) default-ctl)) - (let ((primtype (car default-ctl)) - (subtype (car (cdr default-ctl))) - (params (cdr (cdr default-ctl))) - (encoding (or (mime/Content-Transfer-Encoding) default-encoding)) - ) + (let ((primtype (mime-content-type-primary-type default-ctl)) + (subtype (mime-content-type-subtype default-ctl)) + (params (mime-content-type-parameters default-ctl)) + (encoding (or (mime/Content-Transfer-Encoding) default-encoding))) (let ((boundary (assoc "boundary" params))) (cond (boundary (setq boundary (std11-strip-quoted-string (cdr boundary)))