+2000-12-28 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-view.el (mime-view-read-situation-examples-file): Don't try
+ to read situation-examples-file is it is nil.
+ (mime-situation-examples-file): Avoid to read
+ situation-examples-file at compile time.
+
+2000-12-28 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-view.el (mime-view-read-situation-examples-file): Display
+ warning. [cf. <emacs-mime-ja:680>]
+
+2000-12-27 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-view.el (mime-view-mailcap-files): New user option.
+ (mime-view-read-mailcap-files): Renamed from
+ `mime-view-read-mailcap'; read `mime-view-mailcap-files'.
+
+ * mime-view.el (mime-view-read-situation-examples-file): New
+ function; don't occur error.
+ (mime-view-read-mailcap): New function.
+
+2000-12-27 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-play.el (mime-play-messages-coding-system): Renamed from
+ `mime-mailcap-method-messages-coding-system'.
+
+ * pgg-def.el (pgg-messages-coding-system): Change default value to
+ nil.
+
+2000-12-27 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-play.el (mime-activate-mailcap-method): Fix typo.
+
+2000-12-26 Daiki Ueno <ueno@unixuser.org>
+
+ * mime-play.el (mime-mailcap-method-messages-coding-system): New
+ variable.
+ (mime-activate-mailcap-method): Use it.
+
+2000-12-26 Daiki Ueno <ueno@unixuser.org>
+
+ * pgg-def.el (pgg-messages-coding-system): Use `defvar' to define.
+
+ * pgg-pgp.el (pgg-pgp-messages-coding-system): Abolish.
+ (pgg-pgp-process-region): Use `binary-funcall' instead of
+ `binary-to-text-funcall'.
+
+ * pgg-pgp5.el (pgg-pgp5-messages-coding-system): Abolish.
+ (pgg-pgp5-process-region): Use `binary-funcall' instead of
+ `binary-to-text-funcall'.
+
+\f
+2000-12-25 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * SEMI: Version 1.14.2 (Daish\e-Dòji)\e-A released.
+
+ * README.en (Required environment): Update to FLIM 1.14.2.
+
+ * mail-mime-setup.el (mail-setup-hook): Don't add
+ `eword-decode-header'.
+
+2000-12-23 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-view.el (mime-view-define-keymap): Return
+ `mime-view-mode-map' instead of set up as local keymap; don't call
+ `mime-view-define-keymap-hook'.
+ (mime-display-message): Add new optional argument `keymap'.
+
+ * mime-play.el (mime-store-message/partial-piece): Use
+ `binary-insert-encoded-file' and `binary-write-decoded-region'
+ instead of `binary-insert-file-contents' and
+ `binary-write-region'.
+
+2000-12-23 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * smime.el (smime-process-region): Use `binary-funcall' instead of
+ `binary-start-process-shell-command'.
+ (smime-verify-region): Use `binary-write-decoded-region' and
+ `binary-insert-encoded-file' instead of `binary-write-region' and
+ `binary-insert-file-contents'.
+
+ * pgg-pgp5.el (pgg-pgp5-messages-coding-system): New variable.
+ (pgg-pgp5-process-region): Use `binary-to-text-funcall' instead of
+ `binary-start-process-shell-command'.
+ (pgg-scheme-verify-region): Use `binary-write-decoded-region'
+ instead of `binary-write-region'.
+
+ * pgg-pgp.el (pgg-pgp-messages-coding-system): New variable.
+ (pgg-pgp-process-region): Use `binary-to-text-funcall' instead of
+ `binary-start-process-shell-command'.
+ (pgg-scheme-verify-region): Use `binary-write-decoded-region'
+ instead of `binary-write-region'.
+
+ * pgg-gpg.el (pgg-gpg-process-region): Use
+ `binary-to-text-funcall' instead of `binary-start-process'.
+
+\f
+2000-12-22 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * README.en (Required environment): Require FLIM 1.14.1 or later;
+ update required emacsen.
+
+2000-12-22 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * pgg-gpg.el (pgg-gpg-process-region): Use
+ `pgg-gpg-messages-coding-system'.
+
+2000-12-21 Tadashi Watanabe <watanabe@sigmaitec.co.jp>
+
+ * pgg-gpg.el (pgg-scheme-verify-region): Use a "-" as the name for
+ the file with the signed material.
+
+2000-12-21 Daiki Ueno <ueno@unixuser.org>
+
+ * pgg-def.el (pgg-messages-coding-system): New user option.
+
+2000-12-20 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-view.el: Don't use `static-cond'.
+
+2000-12-19 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-edit.el (mime-edit-mime-version-field-for-message/partial):
+ Use `mime-encode-field-body' instead of `eword-encode-field-body'.
+
+2000-12-19 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-edit.el (mime-edit-translate-header): Use
+ `mime-encode-header-in-buffer' instead of `eword-encode-header'.
+ (mime-edit-encrypt-pgp-mime): Likewise.
+ (mime-edit-translate-single-part-tag): Likewise.
+
+2000-12-17 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * postpet.el: Require `mime'.
+
+ * pgg-parse.el (pgg-format-key-identifier): Don't use
+ `string-to-int-list'.
+ (pgg-read-bytes): Likewise.
+ (pgg-read-body): Likewise.
+
+2000-12-16 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * smime.el: Require `raw-io'.
+ (smime-process-region): Use `binary-start-process-shell-command'.
+
+ * pgg-pgp5.el (pgg-pgp5-process-region): Use
+ `binary-start-process-shell-command'.
+
+ * pgg-pgp.el (pgg-pgp-process-region): Use
+ `binary-start-process-shell-command'.
+
+ * pgg-gpg.el (pgg-gpg-process-region): Use `binary-start-process'.
+
+2000-12-15 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * pgg-def.el: Require `custom' instead of `pcustom'.
+
+2000-12-15 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * Makefile (tar): Use `cvs tag -R' instead of `cvs tag -RF'.
+
+2000-12-15 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * smime.el (smime-process-region): Don't use `as-binary-process'.
+ (smime-verify-region): Use `binary-write-region' instead of
+ `write-region-as-binary'; use `binary-insert-file-contents'
+ instead of `insert-file-contents-as-binary'.
+
+ * semi-def.el: Don't require `poe'.
+
+ * pgg-pgp5.el (pgg-pgp5-process-region): Don't use
+ `as-binary-process'.
+ (pgg-scheme-verify-region): Use `binary-write-region' instead of
+ `write-region-as-binary'.
+ (pgg-scheme-snarf-keys-region): Don't use
+ `write-region-as-raw-text-CRLF'.
+
+ * pgg-pgp.el (pgg-pgp-process-region): Don't use
+ `as-binary-process'.
+ (pgg-scheme-verify-region): Use `binary-write-region' instead of
+ `write-region-as-binary'.
+ (pgg-scheme-snarf-keys-region): Don't use
+ `write-region-as-raw-text-CRLF'.
+
+ * pgg-parse.el: Don't require `poem'; require `custom' instead of
+ `pcustom'.
+
+ * pgg-gpg.el (pgg-gpg-process-region): Don't use
+ `as-binary-output-file' and
+ `insert-file-contents-as-raw-text-CRLF'.
+
+ * mime-view.el: Don't require `emu'.
+ (mouse-button-3): New variable.
+
+ * mime-play.el (mime-store-message/partial-piece): Use
+ `binary-insert-file-contents' instead of
+ `insert-file-contents-as-binary'; don't use
+ `as-binary-input-file'; use `binary-write-region' instead of
+ `write-region-as-binary'.
+
+2000-12-07 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+ * mime-w3.el: Avoid error even if `w3' is not found.
+
2000-11-26 MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
* mime-view.el: Use `mime-conf' instead of `mailcap'.
PACKAGE = wemi
API = 1.14
-RELEASE = 0
+RELEASE = 2
FLIM_API= 1.14
tar:
cvs commit
- sh -c 'cvs tag -RF $(PACKAGE)-`echo $(VERSION) | tr . _`; \
+ sh -c 'cvs tag -R $(PACKAGE)-`echo $(VERSION) | tr . _`; \
cd /tmp; \
cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root \
export -d $(PACKAGE)-$(VERSION) \
19.14. WEMI also does not support Emacs 19.29 to 19.34, XEmacs
19.15 or XEmacs 20.2 without mule, but WEMI may work with them.
- SEMI requires APEL (9.22 or later) and FLIM (Chao 1.14.1 or later)
+ SEMI requires APEL (9.22 or later) and FLIM (1.14.2 or later)
package. Please install them before installing it. APEL package is
available at:
1.13.6 Komatsu \e$(B>.>>\e(B
1.13.7 Awazu \e$(B0@DE\e(B
1.14.0 Iburihashi \e$(BF066\e(B
------- Kaga-Onsen \e$(B2C2l29@t\e(B
------- Daish\e-Dòji\e-A \e$(BBg@;;{\e(B
------- Ushinoya \e$(B5m%NC+\e(B
+1.14.1 Kaga-Onsen \e$(B2C2l29@t\e(B
+1.14.2 Daish\e-Dòji\e-A \e$(BBg@;;{\e(B
+1.14.3 Ushinoya \e$(B5m%NC+\e(B
------ Hosorogi \e$(B:YO$LZ\e(B
------ Awara-Onsen \e$(B028629@t\e(B
: : :
1.13.5 Fijieda \e$(BF#;^\e(B
1.13.6 Rokug\e-Dò\e-A \e$(BO;9g\e(B
1.13.7 Shimada \e$(BEgED\e(B
-1.14.0 Kanaya \e$(B6bC+\e(B ; = \e$(BBg0f@nE4F;\e(B
+1.14.0
+1.14.1
+1.14.2
+1.14.3 Kanaya \e$(B6bC+\e(B ; = \e$(BBg0f@nE4F;\e(B
------ Kikugawa \e$(B5F@n\e(B
------ Kakegawa \e$(B3]@n\e(B ; = \e$(BE7N5IML>8PE4F;\e(B
------ Fukuroi \e$(BB^0f\e(B
;;; mail-mime-setup.el --- setup file for mail-mode.
-;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1994,1995,1996,1997,1998,2000 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Keywords: mail-mode, MIME, multimedia, multilingual, encoded-word
(autoload 'turn-on-mime-edit "mime-edit"
"Unconditionally turn on MIME-Edit minor mode." t)
-(autoload 'eword-decode-header "eword-decode"
- "Decode MIME encoded-words in header fields." t)
+;; (autoload 'eword-decode-header "eword-decode"
+;; "Decode MIME encoded-words in header fields." t)
;;; @ for mail-mode, RMAIL and VM
;;;
-(add-hook 'mail-setup-hook 'eword-decode-header)
+;; (add-hook 'mail-setup-hook 'eword-decode-header)
(add-hook 'mail-setup-hook 'turn-on-mime-edit 'append)
(add-hook 'mail-send-hook 'mime-edit-maybe-translate)
(set-alist 'mime-edit-split-message-sender-alist
(require 'sendmail)
(require 'mail-utils)
(require 'mel)
-(require 'eword-encode) ; eword-encode-field-body
(require 'mime-view)
(require 'signature)
(require 'alist)
(defconst mime-edit-mime-version-field-for-message/partial
(concat "MIME-Version:"
- (eword-encode-field-body
+ (mime-encode-field-body
(concat " 1.0 (split by " mime-edit-version ")\n")
"MIME-Version:"))
"MIME version field for message/partial.")
(defun mime-edit-translate-header ()
"Encode the message header into network representation."
- (eword-encode-header 'code-conversion)
- (run-hooks 'mime-edit-translate-header-hook)
- )
+ (mime-encode-header-in-buffer 'code-conversion)
+ (run-hooks 'mime-edit-translate-header-hook))
(defun mime-edit-translate-buffer ()
"Encode the tagged MIME message in current buffer in MIME compliant message."
(insert (format "Content-Transfer-Encoding: %s\n" encoding))
)
(insert "\n")
- (eword-encode-header)
+ (mime-encode-header-in-buffer)
(or (let ((pgg-default-user-id
(or mime-edit-pgp-user-id
(if from
(insert "Content-Type: " contype "\n")
(if encoding
(insert "Content-Transfer-Encoding: " encoding "\n"))
- (eword-encode-header)
- )
+ (mime-encode-header-in-buffer))
(cons (and contype
(downcase contype))
(and encoding
(defvar mime-play-find-every-situations t
"*Find every available situations if non-nil.")
+(defvar mime-play-messages-coding-system nil
+ "Coding system to be used for external MIME playback method.")
+
;;; @ content decoder
;;;
(if (and name (not (string= name "")))
(expand-file-name name temporary-file-directory)
(make-temp-name
- (expand-file-name "EMI" temporary-file-directory))
- ))
+ (expand-file-name "EMI" temporary-file-directory))))
(mime-write-entity-content entity name)
(message "External method is starting...")
(let ((process
(mime-format-mailcap-command
method
(cons (cons 'filename name) situation))))
- (start-process command mime-echo-buffer-name
- shell-file-name shell-command-switch command)
- )))
+ (binary-to-text-funcall
+ mime-play-messages-coding-system
+ #'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)
- )
- ))
+ (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))))
(save-window-excursion
(set-buffer full-buf)
(erase-buffer)
- (insert-file-contents-as-binary file)
+ (binary-insert-encoded-file file)
(setq major-mode 'mime-show-message-mode)
(mime-view-buffer (current-buffer) nil mother)
(setq pbuf (current-buffer))
(or (file-exists-p file)
(throw 'tag nil)
)
- (as-binary-input-file (insert-file-contents file))
+ (binary-insert-encoded-file file)
(goto-char (point-max))
- (setq i (1+ i))
- ))
- (write-region-as-binary (point-min)(point-max)
- (expand-file-name "FULL" root-dir))
+ (setq i (1+ i))))
+ (binary-write-decoded-region
+ (point-min)(point-max)
+ (expand-file-name "FULL" root-dir))
(let ((i 1))
(while (<= i total)
(let ((file (format "%s/%d" root-dir i)))
(and (file-exists-p file)
- (delete-file file)
- ))
- (setq i (1+ i))
- ))
+ (delete-file file)))
+ (setq i (1+ i))))
(let ((file (expand-file-name "CT" root-dir)))
(and (file-exists-p file)
- (delete-file file)
- ))
+ (delete-file file)))
(let ((buf (current-buffer))
(pwin (or (get-buffer-window mother)
(get-largest-window)))
;;; Code:
-(require 'emu)
(require 'mime)
(require 'semi-def)
(require 'calist)
(const :tag "On" t)
(sexp :tag "Situation" 1)))
+(defcustom mime-view-mailcap-files
+ (let ((files '("/etc/mailcap" "/usr/etc/mailcap" "~/.mailcap")))
+ (or (member mime-mailcap-file files)
+ (setq files (cons mime-mailcap-file files)))
+ files)
+ "List of mailcap files."
+ :group 'mime-view
+ :type '(repeat file))
+
;;; @ in raw-buffer (representation space)
;;;
(defvar mime-acting-situation-example-list-max-size 16)
(defvar mime-situation-examples-file-coding-system nil)
+(defun mime-view-read-situation-examples-file (&optional file)
+ (or file
+ (setq file mime-situation-examples-file))
+ (if (and file
+ (file-readable-p file))
+ (with-temp-buffer
+ (insert-file-contents file)
+ (setq mime-situation-examples-file-coding-system
+ (and (boundp 'buffer-file-coding-system)
+ buffer-file-coding-system)
+ ;; (static-cond
+ ;; ((boundp 'buffer-file-coding-system)
+ ;; (symbol-value 'buffer-file-coding-system))
+ ;; ((boundp 'file-coding-system)
+ ;; (symbol-value 'file-coding-system))
+ ;; (t nil))
+ )
+ (condition-case error
+ (eval-buffer)
+ (error (message "%s is broken: %s" file (cdr error))))
+ ;; format check
+ (condition-case nil
+ (let ((i 0))
+ (while (and (> (length mime-preview-situation-example-list)
+ mime-preview-situation-example-list-max-size)
+ (< i 16))
+ (setq mime-preview-situation-example-list
+ (mime-reduce-situation-examples
+ mime-preview-situation-example-list))
+ (setq i (1+ i))))
+ (error (setq mime-preview-situation-example-list nil)))
+ ;; (let ((rest mime-preview-situation-example-list))
+ ;; (while rest
+ ;; (ctree-set-calist-strictly 'mime-preview-condition
+ ;; (caar rest))
+ ;; (setq rest (cdr rest))))
+ (condition-case nil
+ (let ((i 0))
+ (while (and (> (length mime-acting-situation-example-list)
+ mime-acting-situation-example-list-max-size)
+ (< i 16))
+ (setq mime-acting-situation-example-list
+ (mime-reduce-situation-examples
+ mime-acting-situation-example-list))
+ (setq i (1+ i))))
+ (error (setq mime-acting-situation-example-list nil))))))
+
(defun mime-save-situation-examples ()
(if (or mime-preview-situation-example-list
mime-acting-situation-example-list)
(insert "\n;;; "
(file-name-nondirectory file)
" ends here.\n")
- (static-cond
- ((boundp 'buffer-file-coding-system)
- (setq buffer-file-coding-system
- mime-situation-examples-file-coding-system))
- ((boundp 'file-coding-system)
- (setq file-coding-system
- mime-situation-examples-file-coding-system)))
+ (setq buffer-file-coding-system
+ mime-situation-examples-file-coding-system)
+ ;; (static-cond
+ ;; ((boundp 'buffer-file-coding-system)
+ ;; (setq buffer-file-coding-system
+ ;; mime-situation-examples-file-coding-system))
+ ;; ((boundp 'file-coding-system)
+ ;; (setq file-coding-system
+ ;; mime-situation-examples-file-coding-system)))
(setq buffer-file-name file)
(save-buffer)))))
(defvar mime-acting-condition nil
"Condition-tree about how to process entity.")
-(if (file-readable-p mime-mailcap-file)
- (let ((entries (mime-parse-mailcap-file)))
- (while entries
- (let ((entry (car entries))
- view print shared)
- (while entry
- (let* ((field (car entry))
- (field-type (car field)))
- (cond ((eq field-type 'view) (setq view field))
- ((eq field-type 'print) (setq print field))
- ((memq field-type '(compose composetyped edit)))
- (t (setq shared (cons field shared))))
- )
- (setq entry (cdr entry))
+(defun mime-view-read-mailcap-files (&optional files)
+ (or files
+ (setq files mime-view-mailcap-files))
+ (let (entries file)
+ (while files
+ (setq file (car files))
+ (if (file-readable-p file)
+ (setq entries (append entries (mime-parse-mailcap-file file))))
+ (setq files (cdr files)))
+ (while entries
+ (let ((entry (car entries))
+ view print shared)
+ (while entry
+ (let* ((field (car entry))
+ (field-type (car field)))
+ (cond ((eq field-type 'view) (setq view field))
+ ((eq field-type 'print) (setq print field))
+ ((memq field-type '(compose composetyped edit)))
+ (t (setq shared (cons field shared))))
)
- (setq shared (nreverse shared))
- (ctree-set-calist-with-default
- 'mime-acting-condition
- (append shared (list '(mode . "play")(cons 'method (cdr view)))))
- (if print
- (ctree-set-calist-with-default
- 'mime-acting-condition
- (append shared
- (list '(mode . "print")(cons 'method (cdr view))))
- ))
- )
- (setq entries (cdr entries))
- )))
+ (setq entry (cdr entry)))
+ (setq shared (nreverse shared))
+ (ctree-set-calist-with-default
+ 'mime-acting-condition
+ (append shared (list '(mode . "play")(cons 'method (cdr view)))))
+ (if print
+ (ctree-set-calist-with-default
+ 'mime-acting-condition
+ (append shared
+ (list '(mode . "print")(cons 'method (cdr view)))))))
+ (setq entries (cdr entries)))))
+
+(mime-view-read-mailcap-files)
(ctree-set-calist-strictly
'mime-acting-condition
(set-buffer (event-buffer event))
(popup-menu 'mime-view-xemacs-popup-menu))
(defvar mouse-button-2 'button2)
+ (defvar mouse-button-3 'button3)
)
(t
(defvar mime-view-popup-menu
(commandp func)
(funcall func))))
(defvar mouse-button-2 [mouse-2])
+ (defvar mouse-button-3 [mouse-3])
))
(defun mime-view-define-keymap (&optional default)
(let ((mime-view-mode-map (if (keymapp default)
(copy-keymap default)
- (make-sparse-keymap)
- )))
+ (make-sparse-keymap))))
(define-key mime-view-mode-map
"u" (function mime-preview-move-to-upper))
(define-key mime-view-mode-map
(lambda (item)
(define-key mime-view-mode-map
(vector 'menu-bar 'mime-view (car item))
- (cons (nth 1 item)(nth 2 item))
- )
+ (cons (nth 1 item)(nth 2 item)))
))
- (reverse mime-view-menu-list)
- )
+ (reverse mime-view-menu-list))
))
- (use-local-map mime-view-mode-map)
- (run-hooks 'mime-view-define-keymap-hook)
- ))
+ ;; (run-hooks 'mime-view-define-keymap-hook)
+ mime-view-mode-map))
+
+(defvar mime-view-mode-default-map (mime-view-define-keymap))
+
(defsubst mime-maybe-hide-echo-buffer ()
"Clear mime-echo buffer and delete window for it."
;;;###autoload
(defun mime-display-message (message &optional preview-buffer
mother default-keymap-or-function
- original-major-mode)
+ original-major-mode keymap)
"View MESSAGE in MIME-View mode.
Optional argument PREVIEW-BUFFER specifies the buffer of the
Optional argument DEFAULT-KEYMAP-OR-FUNCTION is nil, keymap or
function. If it is a keymap, keymap of MIME-View mode will be added
to it. If it is a function, it will be bound as default binding of
-keymap of MIME-View mode."
+keymap of MIME-View mode.
+
+Optional argument ORIGINAL-MAJOR-MODE is major-mode of representation
+buffer of MESSAGE. If it is nil, current `major-mode' is used.
+
+Optional argument KEYMAP is keymap of MIME-View mode. If it is
+non-nil, DEFAULT-KEYMAP-OR-FUNCTION is ignored. If it is nil,
+`mime-view-mode-default-map' is used."
(mime-maybe-hide-echo-buffer)
(let ((win-conf (current-window-configuration)))
(or preview-buffer
(widen)
(erase-buffer)
(if mother
- (setq mime-mother-buffer mother)
- )
+ (setq mime-mother-buffer mother))
(setq mime-preview-original-window-configuration win-conf)
(setq major-mode 'mime-view-mode)
(setq mode-name "MIME-View")
(header . visible)
(major-mode . ,original-major-mode))
preview-buffer)
- (mime-view-define-keymap default-keymap-or-function)
+ (use-local-map
+ (or keymap
+ (if default-keymap-or-function
+ (mime-view-define-keymap default-keymap-or-function)
+ mime-view-mode-default-map)))
(let ((point
(next-single-property-change (point-min) 'mime-view-entity)))
(if point
(goto-char point)
(goto-char (point-min))
- (search-forward "\n\n" nil t)
- ))
+ (search-forward "\n\n" nil t)))
(run-hooks 'mime-view-mode-hook)
(set-buffer-modified-p nil)
(setq buffer-read-only t)
(provide 'mime-view)
-(let ((file mime-situation-examples-file))
- (if (file-readable-p file)
- (with-temp-buffer
- (insert-file-contents file)
- (setq mime-situation-examples-file-coding-system
- (static-cond
- ((boundp 'buffer-file-coding-system)
- (symbol-value 'buffer-file-coding-system))
- ((boundp 'file-coding-system)
- (symbol-value 'file-coding-system))
- (t nil)))
- (eval-buffer)
- ;; format check
- (condition-case nil
- (let ((i 0))
- (while (and (> (length mime-preview-situation-example-list)
- mime-preview-situation-example-list-max-size)
- (< i 16))
- (setq mime-preview-situation-example-list
- (mime-reduce-situation-examples
- mime-preview-situation-example-list))
- (setq i (1+ i))))
- (error (setq mime-preview-situation-example-list nil)))
- ;; (let ((rest mime-preview-situation-example-list))
- ;; (while rest
- ;; (ctree-set-calist-strictly 'mime-preview-condition
- ;; (caar rest))
- ;; (setq rest (cdr rest))))
- (condition-case nil
- (let ((i 0))
- (while (and (> (length mime-acting-situation-example-list)
- mime-acting-situation-example-list-max-size)
- (< i 16))
- (setq mime-acting-situation-example-list
- (mime-reduce-situation-examples
- mime-acting-situation-example-list))
- (setq i (1+ i))))
- (error (setq mime-acting-situation-example-list nil))))))
+(eval-when-compile
+ (setq mime-situation-examples-file nil)
+ ;; to avoid to read situation-examples-file at compile time.
+ )
+
+(mime-view-read-situation-examples-file)
;;; mime-view.el ends here
;;; Code:
-(require 'w3)
+(condition-case nil
+ (require 'w3)
+ (error nil))
(require 'mime)
(defmacro mime-put-keymap-region (start end keymap)
;;; pgg-def.el --- functions/macros for defining PGG functions
-;; Copyright (C) 1999 Daiki Ueno
+;; Copyright (C) 1999 Free Software Foundation, Inc.
-;; Author: Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/11/02
;; Keywords: PGP, OpenPGP, GnuPG
;;; Code:
-(require 'pcustom)
+(require 'custom)
(defgroup pgg ()
"Glue for the various PGP implementations."
:group 'pgg
:type 'boolean)
+(defvar pgg-messages-coding-system nil
+ "Coding system used when reading from a PGP external process.")
+
(defvar pgg-status-buffer " *PGG status*")
(defvar pgg-errors-buffer " *PGG errors*")
(defvar pgg-output-buffer " *PGG output*")
;;; pgg-gpg.el --- GnuPG support for PGG.
-;; Copyright (C) 1999,2000 Daiki Ueno
+;; Copyright (C) 1999,2000 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/10/28
;;; Code:
+(require 'mel) ; binary-to-text-funcall
(eval-when-compile (require 'pgg))
(defgroup pgg-gpg ()
(defvar pgg-gpg-user-id nil
"GnuPG ID of your default identity.")
+(defvar pgg-gpg-messages-coding-system pgg-messages-coding-system
+ "Coding system used when reading from a GnuPG external process.")
+
(defvar pgg-scheme-gpg-instance nil)
;;;###autoload
(unwind-protect
(progn
(set-default-file-modes 448)
- (as-binary-output-file
- (setq process
- (apply #'start-process "*GnuPG*" errors-buffer program args)))
+ (setq process
+ (apply #'binary-to-text-funcall
+ pgg-gpg-messages-coding-system
+ #'start-process "*GnuPG*" errors-buffer
+ program args))
(set-process-sentinel process #'ignore)
(when passphrase
(process-send-string process (concat passphrase "\n")))
(buffer-disable-undo)
(erase-buffer)
(if (file-exists-p output-file-name)
- (insert-file-contents-as-raw-text-CRLF output-file-name))
+ (let ((coding-system-for-read 'raw-text-dos))
+ (insert-file-contents output-file-name)))
(set-buffer errors-buffer)
(if (memq status '(stop signal))
(error "%s exited abnormally: '%s'" program exit-status))
(let ((args '("--batch" "--verify")))
(when (stringp signature)
(setq args (append args (list signature))))
+ (setq args (append args '("-")))
(pgg-gpg-process-region start end nil pgg-gpg-program args)
(with-current-buffer pgg-errors-buffer
(goto-char (point-min))
(eval-when-compile (require 'static))
-(require 'poem)
(require 'pccl)
-(require 'pcustom)
+(require 'custom)
(require 'mel)
(defgroup pgg-parse ()
"Armor headers.")
(defmacro pgg-format-key-identifier (string)
- `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x"
- (string-to-int-list ,string))))
+ `(mapconcat (lambda (c) (format "%02X" (char-int c)))
+ ,string "")
+ ;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x"
+ ;; (string-to-int-list ,string)))
+ )
(defmacro pgg-parse-time-field (bytes)
`(list (logior (lsh (car ,bytes) 8)
(forward-char ,nbytes))))
(defmacro pgg-read-bytes (nbytes)
- `(string-to-int-list (pgg-read-bytes-string ,nbytes)))
+ `(mapcar #'char-int (pgg-read-bytes-string ,nbytes))
+ ;; `(string-to-int-list (pgg-read-bytes-string ,nbytes))
+ )
(defmacro pgg-read-body-string (ptag)
`(if (nth 1 ,ptag)
(pgg-read-bytes-string (- (point-max) (point)))))
(defmacro pgg-read-body (ptag)
- `(string-to-int-list (pgg-read-body-string ,ptag)))
+ `(mapcar #'char-int (pgg-read-body-string ,ptag))
+ ;; `(string-to-int-list (pgg-read-body-string ,ptag))
+ )
(defalias 'pgg-skip-bytes 'forward-char)
;;; Code:
+(require 'mel) ; binary-to-text-funcall, binary-write-decoded-region
(eval-when-compile (require 'pgg))
(defgroup pgg-pgp ()
(setenv "PGPPASSFD" "0"))
(unwind-protect
(progn
- (as-binary-process
- (setq process
- (apply #'start-process-shell-command "*PGP*" output-buffer
- program args)))
+ (setq process
+ (apply #'binary-funcall
+ #'start-process-shell-command "*PGP*" output-buffer
+ program args))
(set-process-sentinel process #'ignore)
(when passphrase
(process-send-string process (concat passphrase "\n")))
(unwind-protect
(progn
(set-default-file-modes 448)
- (write-region-as-binary start end orig-file))
+ (binary-write-decoded-region start end orig-file))
(set-default-file-modes orig-mode))
(when (stringp signature)
(copy-file signature (setq signature (concat orig-file ".asc")))
(args
(list "+verbose=1" "+batchmode" "+language=us" "-kaf"
key-file)))
- (write-region-as-raw-text-CRLF start end key-file)
+ (let ((coding-system-for-write 'raw-text-dos))
+ (write-region start end key-file))
(pgg-pgp-process-region start end nil pgg-pgp-program args)
(delete-file key-file)
(pgg-process-when-success nil)))
;;; Code:
+(require 'mel) ; binary-to-text-funcall, binary-write-decoded-region
(eval-when-compile (require 'pgg))
(defgroup pgg-pgp5 ()
(setenv "PGPPASSFD" "0"))
(unwind-protect
(progn
- (as-binary-process
- (setq process
- (apply #'start-process-shell-command "*PGP*" output-buffer
- program args)))
+ (setq process
+ (apply #'binary-funcall
+ #'start-process-shell-command "*PGP*" output-buffer
+ program args))
(set-process-sentinel process #'ignore)
(when passphrase
(process-send-string process (concat passphrase "\n")))
(unwind-protect
(progn
(set-default-file-modes 448)
- (write-region-as-binary start end orig-file))
+ (binary-write-decoded-region start end orig-file))
(set-default-file-modes orig-mode))
(when (stringp signature)
(copy-file signature (setq signature (concat orig-file ".asc")))
(args
(list "+verbose=1" "+batchmode=1" "+language=us" "-a"
key-file)))
- (write-region-as-raw-text-CRLF start end key-file)
+ (let ((coding-system-for-write 'raw-text-dos))
+ (write-region start end key-file))
(pgg-pgp5-process-region start end nil pgg-pgp5-pgpk-program args)
(delete-file key-file)
(pgg-process-when-success nil)))
;;; pgg.el --- glue for the various PGP implementations.
-;; Copyright (C) 1999,2000 Daiki Ueno
+;; Copyright (C) 1999,2000 Free Software Foundation, Inc.
-;; Author: Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/10/28
;; Keywords: PGP
;;; Code:
+(require 'mime)
(require 'alist)
(put 'unpack 'lisp-indent-function 1)
;;; Code:
-(require 'poe)
(eval-when-compile (require 'static))
(require 'custom)
-(defconst mime-user-interface-product ["WEMI" (1 14 0) "Kanaya"]
+(defconst mime-user-interface-product ["WEMI" (1 14 3) "Kanaya"]
"Product name, version number and code name of MIME-kernel package.")
(autoload 'mule-caesar-region "mule-caesar"
;;; Code:
(require 'path-util)
+(require 'mel)
+;; binary-funcall, binary-write-decoded-region, binary-insert-encoded-file
(eval-when-compile (require 'static))
(defgroup smime ()
(with-current-buffer (get-buffer-create smime-output-buffer)
(buffer-disable-undo)
(erase-buffer))
- (as-binary-process
- (setq process
- (apply #'start-process-shell-command "*S/MIME*"
- smime-output-buffer program args)))
+ (setq process
+ (apply #'binary-funcall #'start-process-shell-command
+ "*S/MIME*" smime-output-buffer
+ program args))
(set-process-sentinel process 'ignore)
(process-send-region process start end)
(process-send-eof process)
(unwind-protect
(progn
(set-default-file-modes 448)
- (write-region-as-binary start end orig-file))
+ (binary-write-decoded-region start end orig-file))
(set-default-file-modes orig-mode))
(with-temp-buffer
- (insert-file-contents-as-binary signature)
+ (binary-insert-encoded-file signature)
(goto-char (point-max))
- (insert-file-contents-as-binary
+ (binary-insert-encoded-file
(or (smime-find-certificate
(smime-query-signer (point-min)(point-max)))
(expand-file-name