From b735993959a06a5dbbb62b00db9b664636af3848 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 21 Jan 1999 23:49:06 +0000 Subject: [PATCH] Sync up with SEMI 1.13.0 and release. --- ChangeLog | 38 +++++++++++++++++++++++++++++ Makefile | 4 +-- NEWS | 32 +++++++++++++++++++++++- VERSION | 4 +-- mime-pgp.el | 22 ++++++----------- mime-play.el | 77 ++++++++++++++++++++++++---------------------------------- semi-def.el | 4 +-- 7 files changed, 115 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96acc3f..c90d5a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,43 @@ 1999-01-21 Katsumi Yamaoka + * WEMI: Version 1.13.0 (Shizuoka) released. + +1999-01-21 MORIOKA Tomohiko + + * mime-play.el (mime-view-message/rfc822): Don't expect called in + raw-buffer. + +1999-01-21 MORIOKA Tomohiko + + * NEWS (Function `mime-play-entity'): Add description about + interface change of `mime-play-entity'. + + * mime-play.el (mime-play-entity): Change interface. + +1999-01-21 MORIOKA Tomohiko + + * NEWS (Changes in SEMI 1.13): New section. + + * NEWS (Changes in SEMI 1.12): New section. + +1999-01-21 MORIOKA Tomohiko + + * mime-pgp.el (mime-view-application/pgp): Don't expect called in + raw-buffer. + (mime-verify-application/pgp-signature): Likewise. + + * mime-play.el: Abolish variable + `mime-preview-after-decoded-position'. + (mime-preview-play-current-entity): Use `mime-play-entity' simply; + don't switch to raw-buffer. + (mime-play-entity): renamed from `mime-raw-play-entity'; don't + expect called in raw-buffer. + (mime-activate-mailcap-method): Don't expect called in raw-buffer. + (mime-show-echo-buffer): Permit to run in preview-buffer. + + +1999-01-21 Katsumi Yamaoka + * WEMI: Version 1.12.1 (Kusanagi) released. 1999-01-21 MORIOKA Tomohiko diff --git a/Makefile b/Makefile index bc8d146..2ce822d 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ # PACKAGE = wemi -API = 1.12 -RELEASE = 1 +API = 1.13 +RELEASE = 0 TAR = tar RM = /bin/rm -f 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 e103fee..f6146b0 100644 --- a/VERSION +++ b/VERSION @@ -73,7 +73,7 @@ 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 [JR] $(BLn!9;T(B ------- Matt-Dò-A $(B>>G$(B +1.13.0 Matt-Dò-A $(B>>G$(B : : : ------- Tsuruga $(BFX2l(B ; = JR $(B>.IM@~(B ------- Shin-Hikida $(B?7I%ED(B @@ -135,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 65949f3..6a2fc1a 100644 --- a/mime-play.el +++ b/mime-play.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) @@ -483,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) )) @@ -513,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 6120a9f..6fb0d80 100644 --- a/semi-def.el +++ b/semi-def.el @@ -1,6 +1,6 @@ ;;; semi-def.el --- definition module for WEMI -;; 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 ["WEMI" (1 12 1) "Kusanagi"] +(defconst mime-user-interface-product ["WEMI" (1 13 0) "Shizuoka"] "Implementation name, version name and numbers of MIME-kernel package.") (autoload 'mule-caesar-region "mule-caesar" -- 1.7.10.4