From: morioka Date: Fri, 16 Oct 1998 06:54:06 +0000 (+0000) Subject: Merge emh-1_8_2. X-Git-Tag: emh-199811302358~2 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Femh.git;a=commitdiff_plain;h=2c4cc3760a8c68a0513248f8e7ee333346f32a6c Merge emh-1_8_2. --- diff --git a/ChangeLog b/ChangeLog index 748cddc..3878f05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,75 @@ +1998-10-16 MORIOKA Tomohiko + + * EMH: Version 1.8.2 was released. + + * emh-setup.el (emh-setup-mh-draft-setting): Set up buffer local + value of `mail-header-separator' before using + `eword-decode-header'. + +1998-10-16 MORIOKA Tomohiko + + * emh-setup.el (emh-setup-mh-draft-setting): Call + `eword-decode-header' before `turn-on-mime-edit'. + +1998-10-12 Katsumi Yamaoka + + * README.en: Add explanation about `VERSION_SPECIFIC_LISPDIR'. + + * Makefile (install): Add new arg `VERSION_SPECIFIC_LISPDIR'. + (elc): Likewise. + + * EMH-MK (config-emh): Refer to `VERSION_SPECIFIC_LISPDIR'. + + * EMH-CFG (VERSION_SPECIFIC_LISPDIR): New variable. + +1998-10-09 Katsumi Yamaoka + + * EMH-CFG: Use `add-latest-path' instead of `add-path' for adding + "custom" to load-path. + +1998-10-09 Katsumi Yamaoka + + * EMH-CFG: Add "custom" to load-path. Use `if' and `progn' instead + of `when'. + +1998-09-17 MORIOKA Tomohiko + + * Makefile (XEMACS): New variable. + (PACKAGEDIR): New variable. + (package): New target. + (install-package): New target. + + * EMH-MK (config-emh-package): New function. + (compile-emh-package): New function. + (install-emh-package): New function. + + * EMH-CFG (PACKAGEDIR): New variable. + (EMH_PREFIX): Change to "emh" if it is installed as a XEmacs + package. + + +1998-07-02 MORIOKA Tomohiko + + * EMH: Version 1.8.1 was released. + + * emh.el (mh-display-msg): Use `mime-display-message' and + `mime-open-entity'. + - Delete setting for `mime-raw-representation-type-alist'. + (mime-insert-decoded-header): Modify for + `mime-insert-decoded-header'. + + +1998-06-24 MORIOKA Tomohiko + + * EMH: Version 1.8.0 was released. + +1998-06-23 MORIOKA Tomohiko + + * README.en (What's EMH?): Modify for SEMI 1.8. + + * emh.el: Modify for interface change in SEMI 1.8 about automatic + message/partial combining. + 1998-06-22 MORIOKA Tomohiko * emh.el (mh-display-msg): Set up `mime-raw-buffer' as unibyte. diff --git a/EMH-CFG b/EMH-CFG index e383535..461b704 100644 --- a/EMH-CFG +++ b/EMH-CFG @@ -1,5 +1,5 @@ ;;; -*-Emacs-Lisp-*- -;;; + ;; EMH-CFG: installation setting about EMH. ;;; Code: @@ -11,16 +11,23 @@ (add-to-list 'load-path (expand-file-name "." data-directory)) -(when (boundp 'LISPDIR) - (add-to-list 'default-load-path LISPDIR) - (add-to-list 'load-path LISPDIR) - (add-to-list 'load-path (expand-file-name "apel" LISPDIR)) - ) +(if (boundp 'LISPDIR) + (progn + (add-to-list 'default-load-path LISPDIR) + (add-to-list 'load-path LISPDIR) + (add-to-list 'load-path (expand-file-name "apel" LISPDIR)) + )) + +(defvar VERSION_SPECIFIC_LISPDIR nil) + +(if VERSION_SPECIFIC_LISPDIR + (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR)) (condition-case nil (require 'install) (error (error "Please install APEL 8.2 or later."))) +(add-latest-path "custom") (add-path "flim") (add-path "semi") @@ -35,8 +42,25 @@ (defvar PREFIX install-prefix) ;;(setq PREFIX "~/") +(defvar PACKAGEDIR + (if (boundp 'early-packages) + (let ((dirs (append (if early-package-load-path + early-packages) + (if late-package-load-path + late-packages) + (if last-package-load-path + last-packages))) + dir) + (while (not (file-exists-p + (setq dir (car dirs)))) + (setq dirs (cdr dirs))) + dir))) + ;; Please specify prefix for ``emh'' [optional] -(setq EMH_PREFIX "semi") +(setq EMH_PREFIX + (if PACKAGEDIR + "emh" + "semi")) diff --git a/EMH-MK b/EMH-MK index 0cc3f96..0bac244 100644 --- a/EMH-MK +++ b/EMH-MK @@ -1,10 +1,11 @@ ;;; -*-Emacs-Lisp-*- -;;; -;;; $Id: EMH-MK,v 0.1 1997-05-15 06:47:02 morioka Exp $ -;;; + +;; EMH-MK: installer for EMH. + +;;; Code: (defun config-emh () - (let (prefix lisp-dir) + (let (prefix lisp-dir version-specific-lisp-dir) (and (setq prefix (car command-line-args-left)) (or (string-equal "NONE" prefix) (defvar PREFIX prefix) @@ -14,11 +15,22 @@ (or (string-equal "NONE" lisp-dir) (defvar LISPDIR lisp-dir) )) - (load-file "EMH-CFG") - (load-file "EMH-ELS") - (princ (format "PREFIX=%s + (setq command-line-args-left (cdr command-line-args-left)) + (and (setq version-specific-lisp-dir (car command-line-args-left)) + (or (string-equal "NONE" version-specific-lisp-dir) + (progn + (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir) + (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n" + VERSION_SPECIFIC_LISPDIR))) + )) + (setq command-line-args-left (cdr command-line-args-left)) + ) + (setq command-line-args-left (cdr command-line-args-left)) + (load-file "EMH-CFG") + (load-file "EMH-ELS") + (princ (format "PREFIX=%s LISPDIR=%s\n" PREFIX LISPDIR)) - )) + ) (defun compile-emh () (config-emh) @@ -30,4 +42,40 @@ LISPDIR=%s\n" PREFIX LISPDIR)) (install-elisp-modules emh-modules "./" EMH_DIR) ) +(defun config-emh-package () + (let (package-dir) + (and (setq package-dir (car command-line-args-left)) + (or (string= "NONE" package-dir) + (defvar PACKAGEDIR package-dir) + )) + (setq command-line-args-left (cdr command-line-args-left)) + (load-file "EMH-CFG") + (load-file "EMH-ELS") + (setq emh-modules (append emh-modules + '(auto-autoloads custom-load))) + (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR)) + )) + +(defun compile-emh-package () + (config-emh-package) + + (setq autoload-package-name "emh") + (add-to-list 'command-line-args-left ".") + (batch-update-directory) + + (add-to-list 'command-line-args-left ".") + (Custom-make-dependencies) + + (compile-elisp-modules emh-modules ".") + ) + +(defun install-emh-package () + (config-emh-package) + (install-elisp-modules emh-modules + "./" + (expand-file-name EMH_PREFIX + (expand-file-name "lisp" + PACKAGEDIR))) + ) + ;;; EMH-MK ends here diff --git a/Makefile b/Makefile index 1acae24..c97369c 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,38 @@ # -# $Id: Makefile,v 1.13 1998-06-18 16:17:51 morioka Exp $ +# Makefile for EMH # -VERSION = 1.6.0 +VERSION = 1.8.2 TAR = tar RM = /bin/rm -f + EMACS = emacs +XEMACS = xemacs FLAGS = -batch -q -no-site-file -l EMH-MK PREFIX = NONE LISPDIR = NONE +PACKAGEDIR = NONE +VERSION_SPECIFIC_LISPDIR = NONE FILES = README.en Makefile EMH-MK EMH-CFG EMH-ELS *.el ChangeLog elc: - $(EMACS) $(FLAGS) -f compile-emh $(PREFIX) $(LISPDIR) + $(EMACS) $(FLAGS) -f compile-emh $(PREFIX) $(LISPDIR) \ + $(VERSION_SPECIFIC_LISPDIR) install: elc - $(EMACS) $(FLAGS) -f install-emh $(PREFIX) $(LISPDIR) + $(EMACS) $(FLAGS) -f install-emh $(PREFIX) $(LISPDIR) \ + $(VERSION_SPECIFIC_LISPDIR) + + +package: + $(XEMACS) $(FLAGS) -f compile-emh-package $(PACKAGEDIR) + +install-package: package + $(XEMACS) $(FLAGS) -f install-emh-package $(PACKAGEDIR) clean: @@ -39,8 +52,8 @@ tar: cd /tmp; $(TAR) cvzf emh-$(VERSION).tar.gz emh-$(VERSION) cd /tmp; $(RM) -r emh-$(VERSION) sed "s/VERSION/$(VERSION)/" < ftp.in > ftp -# tar cvf ../emh-$(VERSION).tar $(FILES) -# -cd ..; mkdir emh-$(VERSION) -# cd ../emh-$(VERSION); $(TAR) xvf ../emh-$(VERSION).tar -# cd ..; $(TAR) cvzf emh-$(VERSION).tar.gz emh-$(VERSION) -# cd ..; $(RM) -r emh-$(VERSION); rm emh-$(VERSION).tar + +release: + -$(RM) /pub/GNU/elisp/emh/emh-$(VERSION).tar.gz + mv /tmp/emh-$(VERSION).tar.gz /pub/GNU/elisp/emh/ + cd /pub/GNU/elisp/semi/ ; ln -s ../emh/emh-$(VERSION).tar.gz . diff --git a/README.en b/README.en index 1a34454..afedbd0 100644 --- a/README.en +++ b/README.en @@ -4,8 +4,8 @@ What's EMH? =========== EMH is a extender for mh-e to provide MIME feature using SEMI. It - requires SEMI 1.7 API based MIME processing module, so please get - and install such kind of MIME processing module such as SEMI 1.7.0 + requires SEMI 1.8 API based MIME processing module, so please get + and install such kind of MIME processing module such as SEMI 1.8.0 or later at first. @@ -36,6 +36,12 @@ Installation emacs command is used (perhaps /usr/local/share/emacs/site-lisp or /usr/local/lib/xemacs/site-lisp). + If the emu modules (included in APEL package) have been installed in + the non-standard directory, you should specify where they will be + found, for example: + + % make install VERSION_SPECIFIC_LISPDIR=~/elisp + You can specify other optional settings by editing the file emh/EMH-CFG. diff --git a/emh-setup.el b/emh-setup.el index 4da990d..2bf9e87 100644 --- a/emh-setup.el +++ b/emh-setup.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emh-setup.el,v 0.2 1997-08-05 15:07:32 morioka Exp $ +;; Version: $Id: emh-setup.el,v 0.3 1998-10-16 06:54:03 morioka Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -41,9 +41,10 @@ "Unconditionally turn on MIME-Edit minor mode." t) (defun emh-setup-mh-draft-setting () - (turn-on-mime-edit) (make-local-variable 'mail-header-separator) (setq mail-header-separator "--------") + (eword-decode-header nil mail-header-separator) + (turn-on-mime-edit) (save-excursion (goto-char (point-min)) (setq buffer-read-only nil) diff --git a/emh.el b/emh.el index 7b95f74..a107a78 100644 --- a/emh.el +++ b/emh.el @@ -38,7 +38,7 @@ ;;; @ version ;;; -(defconst emh-version "1.6.1") +(defconst emh-version "1.8.2") ;;; @ variable @@ -89,8 +89,7 @@ nil, `emh-automatic-mime-preview' is used as default value." (erase-buffer) (if mode (let* ((aname (concat "article-" folder)) - (abuf (get-buffer aname)) - ) + (abuf (get-buffer aname))) (if abuf (progn (set-buffer abuf) @@ -106,13 +105,13 @@ nil, `emh-automatic-mime-preview' is used as default value." (setq buffer-read-only t) (setq buffer-file-name msg-filename) (mh-show-mode) - (mime-view-buffer aname (concat "show-" folder)) + (mime-display-message (mime-open-entity 'buffer aname) + (concat "show-" folder)) (goto-char (point-min)) ) (let ((clean-message-header mh-clean-message-header) (invisible-headers mh-invisible-headers) - (visible-headers mh-visible-headers) - ) + (visible-headers mh-visible-headers)) ;; 1995/9/21 ;; modified by ARIURA ;; to support mhl. @@ -227,21 +226,15 @@ digest are inserted into the folder after that message." ;;; @ for mime-view ;;; -(set-alist 'mime-raw-representation-type-alist 'mh-show-mode 'binary) - - -(defvar emh-display-header-hook (if window-system - '(emh-highlight-header) - ) +(defvar emh-display-header-hook (if window-system '(emh-highlight-header)) "Hook for header filtering.") (autoload 'emh-highlight-header "emh-face") (defun emh-header-presentation-method (entity situation) - (mime-insert-decoded-header - entity - mime-view-ignored-field-list mime-view-visible-field-list - default-mime-charset) + (mime-insert-decoded-header entity + mime-view-ignored-field-list + mime-view-visible-field-list) (run-hooks 'emh-display-header-hook) ) @@ -287,6 +280,24 @@ digest are inserted into the folder after that message." ;;; @@ for mime-partial ;;; +(defun emh-request-partial-message () + (let ((msg-filename (mh-msg-filename (mh-get-msg-num t))) + (show-buffer mh-show-buffer)) + (set-buffer (get-buffer-create " *Partial Article*")) + (erase-buffer) + (setq mime-preview-buffer show-buffer) + (insert-file-contents-as-raw-text msg-filename) + (mime-parse-buffer) + )) + +(defun emh-get-folder-buffer () + (let ((buffer-name (buffer-name (current-buffer)))) + (and (or (string-match "^article-\\(.+\\)$" buffer-name) + (string-match "^show-\\(.+\\)$" buffer-name)) + (substring buffer-name + (match-beginning 1) (match-end 1)) + ))) + (autoload 'mime-combine-message/partial-pieces-automatically "mime-partial" "Internal method to combine message/partial messages automatically.") @@ -294,25 +305,12 @@ digest are inserted into the folder after that message." (mime-add-condition 'action '((type . message)(subtype . partial) - (method . mime-combine-message/partial-pieces-automatically) (major-mode . mh-show-mode) - (summary-buffer-exp - . (and (or (string-match "^article-\\(.+\\)$" - article-buffer) - (string-match "^show-\\(.+\\)$" article-buffer)) - (substring article-buffer - (match-beginning 1) (match-end 1)) - )) + (method . mime-combine-message/partial-pieces-automatically) + (summary-buffer-exp . (emh-get-folder-buffer)) + (request-partial-message-method . emh-request-partial-message) )) -(set-alist 'mime-view-partial-message-method-alist - 'mh-show-mode - (function - (lambda () - (let ((emh-automatic-mime-preview t)) - (emh-show) - )))) - ;;; @ set up ;;; diff --git a/ftp.in b/ftp.in index 5845c51..9007fe2 100644 --- a/ftp.in +++ b/ftp.in @@ -2,12 +2,12 @@ It is available from - ftp://ftp.jaist.ac.jp/pub/GNU/elisp/semi/ + ftp://ftp.jaist.ac.jp/pub/GNU/elisp/emh/ --[[message/external-body; access-type=anon-ftp; site="ftp.jaist.ac.jp"; - directory="/pub/GNU/elisp/semi"; + directory="/pub/GNU/elisp/emh"; name="emh-VERSION.tar.gz"; mode=image]] Content-Type: application/octet-stream;