From: keiichi Date: Fri, 22 Jan 1999 06:51:32 +0000 (+0000) Subject: Sync up with semi-1_13. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=bbb414eff561f548a3da75fb5e3ca55f82ed998e;p=elisp%2Fsemi.git Sync up with semi-1_13. --- diff --git a/Makefile b/Makefile index a60d1dc..9fc4a6a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # PACKAGE = semi -API = 1.12 +API = 1.13 RELEASE = 0 TAR = tar @@ -61,7 +61,8 @@ tar: $(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 | sed "s/API/$(API)/" > ftp + sed "s/VERSION/$(VERSION)/" < ftp.in | sed "s/API/$(API)/" \ + | sed "s/PACKAGE/$(PACKAGE)/" > ftp release: -$(RM) $(ARC_DIR)/$(PACKAGE)-$(VERSION).tar.gz diff --git a/NEWS b/NEWS index f4c2d8e..c2301b9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,36 @@ SEMI NEWS --- history of major-changes. -Copyright (C) 1998 Free Software Foundation, Inc. +Copyright (C) 1998,1999 Free Software Foundation, Inc. +* Changes in SEMI 1.13 + +** Function `mime-play-entity' + +Function `mime-play-entity' was renamed from `mime-raw-play-entity' +and changed interface. + +Current interface is: + + mime-play-entity (entity &optional situation mode + ignore-examples ignored-method) + + +** Now acting-method must not expect to run in raw-buffer + +Function `mime-play-entity' was changed to permit to run in any buffer +(may be called in preview-buffer). So each acting-method is called in +any buffer. + + + +* Changes in SEMI 1.12 + +There are no user-visible changes. + +** New function `eliminate-top-spaces' + +Now mime-edit has it. + + * Changes in SEMI 1.11 ** New function `mime-edit-decode-message-in-buffer' diff --git a/VERSION b/VERSION index 12069ca..f6146b0 100644 --- a/VERSION +++ b/VERSION @@ -72,7 +72,8 @@ 1.10.2 Higashi-Kanazawa $(BEl6bBt(B 1.11.0 Kanazawa $(B6bBt(B ; <=> $(BKLN&E4F;(B $(BKLE46bBt(B 1.12.0 Nishi-Kanazawa $(B@>6bBt(B ; <=> $(BKLN&E4F;(B $(B?7@>6bBt(B -1.12.1 [JR] Nonoichi $(BLn!9;T(B +1.12.1 [JR] Nonoichi [JR] $(BLn!9;T(B +1.13.0 Matt-Dò-A $(B>>G$(B : : : ------- Tsuruga $(BFX2l(B ; = JR $(B>.IM@~(B ------- Shin-Hikida $(B?7I%ED(B @@ -134,7 +135,7 @@ 1.11.0 Okitsu $(B6=DE(B 1.12.0 Shimizu $(B@6?e(B 1.12.1 Kusanagi $(BApFe(B ------- Shizuoka $(B@E2,(B +1.13.0 Shizuoka $(B@E2,(B ------ Abekawa $(B0BG\@n(B ------ Mochimune $(BMQ=!(B ------ Yaizu $(B>FDE(B diff --git a/mime-pgp.el b/mime-pgp.el index 0facca0..6bc1c13 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -1,6 +1,6 @@ ;;; mime-pgp.el --- mime-view internal methods for PGP. -;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko +;; Copyright (C) 1995,1996,1997,1998,1999 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Created: 1995/12/7 @@ -52,8 +52,9 @@ (defun mime-verify-multipart/signed (entity situation) "Internal method to verify multipart/signed." - (mime-raw-play-entity + (mime-play-entity (nth 1 (mime-entity-children entity)) ; entity-info of signature + nil (cdr (assq 'mode situation)) ; play-mode )) @@ -67,13 +68,13 @@ (get-largest-window))) (new-name (format "%s-%s" (buffer-name) (mime-entity-number entity))) - (the-buf (current-buffer)) (mother mime-preview-buffer) representation-type) (set-buffer (get-buffer-create new-name)) (erase-buffer) - (insert-buffer-substring - the-buf (mime-entity-point-min entity) (mime-entity-point-max entity)) + (insert-buffer-substring (mime-entity-buffer entity) + (mime-entity-point-min entity) + (mime-entity-point-max entity)) (cond ((progn (goto-char (point-min)) (re-search-forward "^-+BEGIN PGP SIGNED MESSAGE-+$" nil t)) @@ -156,10 +157,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (defun mime-verify-application/pgp-signature (entity situation) "Internal method to check PGP/MIME signature." - (let* ((start (mime-entity-point-min entity)) - (end (mime-entity-point-max entity)) - (encoding (cdr (assq 'encoding situation))) - (entity-node-id (mime-raw-point-to-entity-node-id start)) + (let* ((entity-node-id (mime-entity-node-id entity)) (mother (mime-entity-parent entity)) (knum (car entity-node-id)) (onum (if (> knum 0) @@ -172,11 +170,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") ) (mime-write-entity orig-entity orig-file) (save-excursion (mime-show-echo-buffer)) - (mime-write-decoded-region (save-excursion - (goto-char start) - (and (search-forward "\n\n") - (match-end 0)) - ) end sig-file encoding) + (mime-write-entity-content entity sig-file) (or (mime-pgp-check-signature mime-echo-buffer-name orig-file) (let (pgp-id) (save-excursion diff --git a/mime-play.el b/mime-play.el index bf2b19b..6a2fc1a 100644 --- a/mime-play.el +++ b/mime-play.el @@ -1,6 +1,6 @@ ;;; mime-play.el --- Playback processing module for mime-view.el -;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1994,1995,1996,1997,1998,1999 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Created: 1995/9/26 (separated from tm-view.el) @@ -114,8 +114,6 @@ ;;; @ content decoder ;;; -(defvar mime-preview-after-decoded-position nil) - (defun mime-preview-play-current-entity (&optional ignore-examples mode) "Play current entity. It decodes current entity to call internal or external method. The @@ -126,15 +124,8 @@ If MODE is specified, play as it. Default MODE is \"play\"." (interactive "P") (let ((entity (get-text-property (point) 'mime-view-entity))) (if entity - (let ((the-buf (current-buffer)) - (raw-buffer (mime-entity-buffer entity))) - (setq mime-preview-after-decoded-position (point)) - (set-buffer raw-buffer) - (mime-raw-play-entity entity (or mode "play") nil ignore-examples) - (when (eq (current-buffer) raw-buffer) - (set-buffer the-buf) - (goto-char mime-preview-after-decoded-position) - ))))) + (mime-play-entity entity nil (or mode "play") ignore-examples) + ))) (defun mime-sort-situation (situation) (sort situation @@ -202,8 +193,8 @@ If MODE is specified, play as it. Default MODE is \"play\"." (cons match example) )) -(defun mime-raw-play-entity (entity &optional mode situation ignore-examples - ignored-method) +(defun mime-play-entity (entity &optional situation mode + ignore-examples ignored-method) "Play entity specified by ENTITY. It decodes the entity to call internal or external method. The method is selected from variable `mime-acting-condition'. If MODE is @@ -314,34 +305,28 @@ specified, play as it. Default MODE is \"play\"." (defvar mime-mailcap-method-filename-alist nil) (defun mime-activate-mailcap-method (entity situation) - (save-excursion - (save-restriction - (let ((start (mime-entity-point-min entity)) - (end (mime-entity-point-max entity))) - (narrow-to-region start end) - (goto-char start) - (let ((method (cdr (assoc 'method situation))) - (name (mime-entity-safe-filename entity))) - (setq name - (if (and name (not (string= name ""))) - (expand-file-name name temporary-file-directory) - (make-temp-name - (expand-file-name "EMI" temporary-file-directory)) - )) - (mime-write-entity-content entity name) - (message "External method is starting...") - (let ((process - (let ((command - (mailcap-format-command - method - (cons (cons 'filename name) situation)))) - (start-process command mime-echo-buffer-name - shell-file-name shell-command-switch command) - ))) - (set-alist 'mime-mailcap-method-filename-alist process name) - (set-process-sentinel process 'mime-mailcap-method-sentinel) - ) - ))))) + (let ((method (cdr (assoc 'method situation))) + (name (mime-entity-safe-filename entity))) + (setq name + (if (and name (not (string= name ""))) + (expand-file-name name temporary-file-directory) + (make-temp-name + (expand-file-name "EMI" temporary-file-directory)) + )) + (mime-write-entity-content entity name) + (message "External method is starting...") + (let ((process + (let ((command + (mailcap-format-command + method + (cons (cons 'filename name) situation)))) + (start-process command mime-echo-buffer-name + shell-file-name shell-command-switch command) + ))) + (set-alist 'mime-mailcap-method-filename-alist process name) + (set-process-sentinel process 'mime-mailcap-method-sentinel) + ) + )) (defun mime-mailcap-method-sentinel (process event) (let ((file (cdr (assq process mime-mailcap-method-filename-alist)))) @@ -376,7 +361,8 @@ window.") (condition-case nil (setq win (get-buffer-window bbdb-buffer-name)) (error nil))) - (select-window (get-buffer-window mime-preview-buffer)) + (select-window (get-buffer-window (or mime-preview-buffer + (current-buffer)))) (setq win (split-window-vertically (- (window-height) (if (functionp mime-echo-window-height) @@ -472,16 +458,7 @@ SUBTYPE is symbol to indicate subtype of media-type.") (defun mime-detect-content (entity situation) (let (type subtype) - (let ((mdata (save-excursion - ;;(set-buffer (mime-entity-buffer entity)) - (let* ((start (mime-entity-body-start entity)) - (end (progn - (goto-char start) - (end-of-line) - (point)))) - (mime-decode-string (buffer-substring start end) - (mime-entity-encoding entity)) - ))) + (let ((mdata (mime-entity-content entity)) (rest mime-magic-type-alist)) (while (not (let ((cell (car rest))) (if cell @@ -492,12 +469,13 @@ SUBTYPE is symbol to indicate subtype of media-type.") t))) (setq rest (cdr rest)))) (if type - (mime-raw-play-entity - entity nil + (mime-play-entity + entity (put-alist 'type type (put-alist 'subtype subtype (del-alist 'method (copy-alist situation)))) + nil (cdr (assq 'ignore-examples situation)) 'mime-detect-content) )) @@ -522,7 +500,7 @@ It is registered to variable `mime-preview-quitting-method-alist'." (defun mime-view-message/rfc822 (entity situation) (let* ((new-name (format "%s-%s" (buffer-name) (mime-entity-number entity))) - (mother mime-preview-buffer) + (mother (current-buffer)) (children (car (mime-entity-children entity)))) (set-buffer (get-buffer-create new-name)) (erase-buffer) diff --git a/semi-def.el b/semi-def.el index 12311dd..4f6e273 100644 --- a/semi-def.el +++ b/semi-def.el @@ -1,6 +1,6 @@ ;;; semi-def.el --- definition module for SEMI -;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Keywords: definition, MIME, multimedia, mail, news @@ -30,7 +30,7 @@ (require 'custom) -(defconst mime-user-interface-product ["SEMI" (1 12 1) "[JR] Nonoichi"] +(defconst mime-user-interface-product ["SEMI" (1 13 0) "Matt.DŽò"]*I "Product name, version number and code name of MIME-kernel package.") (autoload 'mule-caesar-region "mule-caesar"