From 570bd2cee37115459cc57e192bc732c013c0a5f4 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 9 Mar 1998 16:12:34 +0000 Subject: [PATCH] tm 7.48. --- ChangeLog | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- TM-CFG | 13 +++++++--- gnus/s-path | 2 +- inst-tm | 23 +++++++++--------- methods/ChangeLog | 6 +++++ methods/tm-html | 4 ++-- signature.el | 64 +++++++++++++++++++++++++++++++++++++++++++------ tm-bbdb.el | 35 +++++++++++++-------------- tm-edit.el | 13 ++++++---- tm-view.el | 45 +++++++++++++++++------------------ tm-vm.el | 20 ++++++++++------ 12 files changed, 215 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c558b8..29647b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,71 @@ +Wed Mar 13 18:05:28 1996 MORIOKA Tomohiko + + * tl: Version 7.18 was released. + * MEL: Version 3.5 was released. + * tm: Version 7.48 was released. + +Wed Mar 13 17:55:33 1996 MORIOKA Tomohiko + + * tm-edit.el (mime-editor/translate-buffer-hook): New hook. + (mime-editor/translate-buffer): New implementation; + use `mime-editor/translate-buffer-hook'. + + * signature.el (signature-check-in-bbdb): require bbdb-com. + +Wed Mar 13 16:23:26 1996 Shuhei KOBAYASHI + + * tm-bbdb.el: fixed problem for no-phrase route-address like + ``From: ''. (cf.[tm-ja:1663]) + +Tue Mar 12 19:37:54 1996 Artur Pioro + + * signature.el (signature-file-prefix): New variable. + (signature/get-signature-file-name): support + `signature-file-prefix' and method function. + (signature-check-in-bbdb): New function. + +Mon Mar 11 15:19:15 1996 MORIOKA Tomohiko + + * tm-vm.el (tm-vm/use-original-url-button): New variable. + (tm-vm/preview-current-message): + Check `tm-vm/use-original-url-button'. + +Mon Mar 10 23:07:42 1996 Rob Kooper + + * tm-vm.el (tm-vm/preview-current-message): VM does it's own + highlighting of URL's. Following is a patch to tm/tm-vm.el that + will make the highlighting work under tm. (cf.[bug-tm-en:373]) + +Mon Mar 10 04:16:59 1996 Hiroshi Ueno + + * TM-CFG (SHELLOPTION): New variable. + (LISPDIR): Use `defvar' instead of `setq'. + (TM_GNUS_COMPILE_FORMAT): New variable. + (TM_GNUS_INSTALL_FORMAT): New variable. + (BIN_SRC_DIR): New variable. + (METHOD_SRC_DIR): New variable. + (BIN_DIR): Use `defvar' instead of `setq'. + + * inst-tm (compile-tm-gnus): Use variable `SHELLOPTION'. + (install-tm-gnus): Use variable `SHELLOPTION'. + (install-execs): Use variable `BIN_SRC_DIR' and `METHOD_SRC_DIR'. + +Mon Mar 8 19:15:33 1996 Oscar Figueiredo + + * tm-vm.el (tm-vm/scroll-forward): when you go to a message with + the cursor keys in VM's summary buffer and press space to select + the message, the Preview buffer is scrolled forward instead of + simply displaying the new message which prevents you from seeing + the beginning of the new message. + +Wed Mar 6 12:26:20 1996 Morioka Tomohiko + + * tm-view.el (mime-viewer/up-content): New implementation; bug + fixed. (cf. [tm-ja:1652]) + + * inst-tm (compile-tm): fixed to judge XEmacs. + + Wed Mar 6 02:12:36 1996 Morioka Tomohiko * tl: Version 7.15 was released. diff --git a/Makefile b/Makefile index 4a4531c..7470280 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/tl-els tl/*.el \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.47.tar.gz +TARFILE = tm7.48.tar.gz elc: $(EMACS) $(FLAGS) -l inst-tm -f compile-tm diff --git a/TM-CFG b/TM-CFG index 5a0a477..b434a38 100644 --- a/TM-CFG +++ b/TM-CFG @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: TM-CFG,v 1.1 1996/03/04 08:37:01 morioka Exp morioka $ +;;; $Id: TM-CFG,v 2.0 1996/03/11 14:54:25 morioka Exp $ ;;; (setq load-path (append @@ -27,6 +27,9 @@ ;; Please specify shell command path. (setq SHELL "/bin/sh") +;; Please specify shell command option. +(setq SHELLOPTION "-c") + ;; Please specify install path prefix. (setq PREFIX "~/") ;;(setq PREFIX "/usr/local/") @@ -54,7 +57,7 @@ (setq EMACS_DATADIR (expand-file-name EMACS_PREFIX DATADIR)) -(setq LISPDIR (expand-file-name LISP_PREFIX EMACS_DATADIR)) +(defvar LISPDIR (expand-file-name LISP_PREFIX EMACS_DATADIR)) ;; Please specify mime-setup.{el|elc} install path. @@ -71,18 +74,22 @@ (setq TM_MHE_DIR TM_KERNEL_DIR) (setq TM_GNUS_DIR TM_KERNEL_DIR) +(setq TM_GNUS_COMPILE_FORMAT "cd gnus; PWD=`pwd` make %s EMACS=%s") +(setq TM_GNUS_INSTALL_FORMAT "cd gnus; PWD=`pwd` make install-19 EMACS=%s TMDIR19=%s") (setq el-file-mode (+ (* 64 6)(* 8 4) 4)) +(setq BIN_SRC_DIR "src/") (setq BINS '("src/ol2" "src/decode-b")) +(setq METHOD_SRC_DIR "methods/") (setq METHODS '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg" "tm-plain" "tmdecode")) ;; Please specify binary path. -(setq BIN_DIR (expand-file-name "bin/" PREFIX)) +(defvar BIN_DIR (expand-file-name "bin/" PREFIX)) ;; Please specify binary path. (setq METHOD_DIR BIN_DIR) diff --git a/gnus/s-path b/gnus/s-path index c8616ab..ad86e44 100644 --- a/gnus/s-path +++ b/gnus/s-path @@ -9,7 +9,7 @@ ;; please edit ;; It is relative style. Added path is searched from load-path. -(add-path "sgnus-0.49/lisp/" 'all-paths) +(add-path "sgnus-0.52/lisp/" 'all-paths) ;; It is absolute style. ;; (add-path "/usr/local/share/emacs/site-lisp/sgnus/lisp/") diff --git a/inst-tm b/inst-tm index f035221..a30468a 100644 --- a/inst-tm +++ b/inst-tm @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: inst-tm,v 2.1 1996/03/06 02:10:32 morioka Exp $ +;;; $Id: inst-tm,v 3.1 1996/03/11 14:50:53 morioka Exp $ ;;; (load-file "TM-CFG") @@ -47,8 +47,8 @@ (erase-buffer) (call-process SHELL nil t t - "-c" - (format "cd gnus; PWD=`pwd` make %s EMACS=%s" + SHELLOPTION + (format TM_GNUS_COMPILE_FORMAT type (car command-line-args)) ) (princ (buffer-string)) @@ -58,9 +58,9 @@ (erase-buffer) (call-process SHELL nil t t - "-c" + SHELLOPTION (format - "cd gnus; PWD=`pwd` make install-19 EMACS=%s TMDIR19=%s" + TM_GNUS_INSTALL_FORMAT (car command-line-args) TM_GNUS_DIR) ) (princ (buffer-string)) @@ -81,12 +81,13 @@ (cond ((< emacs-major-version 19) (compile-tm-gnus "gnus4") ) - ((< emacs-minor-version 30) - (compile-tm-gnus "gnus4") - (compile-tm-gnus "gnus5") + ((or (>= emacs-minor-version 30) + (string-match "XEmacs" emacs-version)) + (compile-tm-gnus "sgnus") ) (t - (compile-tm-gnus "sgnus") + (compile-tm-gnus "gnus4") + (compile-tm-gnus "gnus5") )) (compile-el-files "./" '("mime-setup")) ) @@ -146,6 +147,6 @@ ) (defun install-execs () - (apply (function install-el-files) "src/" BIN_DIR BINS) - (apply (function install-el-files) "methods/" METHOD_DIR METHODS) + (apply (function install-el-files) BIN_SRC_DIR BIN_DIR BINS) + (apply (function install-el-files) METHOD_SRC_DIR METHOD_DIR METHODS) ) diff --git a/methods/ChangeLog b/methods/ChangeLog index f6658f3..0406800 100644 --- a/methods/ChangeLog +++ b/methods/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 10 23:07:42 1996 Rob Kooper + + * tm-html: When starting netscape to view a html message it would + always start a new netscape browser. Following patch to + tm/methods/tm-html will prevent this. (cf.[bug-tm-en:373]) + Fri Feb 23 18:26:23 1996 Morioka Tomohiko * tm-html: If `TM_WWW_BROWSER' indicates Netscape, check running diff --git a/methods/tm-html b/methods/tm-html index 6f9dcbd..97f02eb 100755 --- a/methods/tm-html +++ b/methods/tm-html @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tm-html,v 3.0 1996/02/23 18:26:23 morioka Exp $ +# $Id: tm-html,v 4.0 1996/03/11 15:05:27 morioka Exp $ # if [ "$TM_TMP_DIR" = "" ]; then @@ -25,7 +25,7 @@ tmdecode "$3" $1 $filename case "$4" in "play") - if `echo $TM_WWW_BROWSER | grep -s netscape`; then + if [ `echo $TM_WWW_BROWSER | grep -s netscape` ]; then echo netscape if [ -h $HOME/.netscape/lock ]; then netscape -remote "openURL(file:$filename,new-window)" diff --git a/signature.el b/signature.el index 324ace7..3d9a52c 100644 --- a/signature.el +++ b/signature.el @@ -1,15 +1,17 @@ ;;; -;;; signature.el --- signature utility for GNU Emacs +;;; signature.el --- a signature utility for GNU Emacs ;;; ;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994,1995 MORIOKA Tomohiko +;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko ;;; Copyright (C) 1994 OKABE Yasuo +;;; Copyright (C) 1996 Artur Pioro ;;; ;;; Author: MORIOKA Tomohiko -;;; OKABE Yasuo (1994/08/01) +;;; OKABE Yasuo +;;; Artur Pioro ;;; Created: 1994/7/11 ;;; Version: -;;; $Id: signature.el,v 7.3 1995/12/25 05:29:00 morioka Exp $ +;;; $Id: signature.el,v 7.6 1996/03/13 17:30:16 morioka Exp $ ;;; Keywords: mail, news, signature ;;; ;;; This file is part of tm (Tools for MIME). @@ -44,11 +46,15 @@ if non-nil. [signature.el]") (defvar signature-file-alist nil) +(defvar signature-file-prefix nil + "*String containing optional prefix for the signature file names") + ;;; ;;; Example: ;;; ;;; (setq signature-file-alist -;;; '((("Newsgroups" . "zxr") . "~/.signature-sun") +;;; '((("To" . signature-check-in-bbdb) . nil) +;;; (("Newsgroups" . "zxr") . "~/.signature-sun") ;;; (("To" . "uramimi") . "~/.signature-sun") ;;; (("Newsgroups" . "jokes") . "~/.signature-jokes") ;;; (("To" . "tea") . "~/.signature-jokes") @@ -78,15 +84,25 @@ if non-nil. [signature.el]") (let ((r (cdr b))) (while r (if (string-match (car r) f) - (throw 'tag (cdr cell)) + (throw 'tag + (concat + signature-file-prefix (cdr cell))) ) (setq r (cdr r)) )) ) ((stringp (cdr b)) (if (string-match (cdr b) f) - (throw 'tag (cdr cell)) + (throw 'tag + (concat + signature-file-prefix (cdr cell))) )) + ((functionp (cdr b)) + (let ((name (apply (cdr b) f (cdr cell)))) + (if name + (throw 'tag + (concat signature-file-prefix name)) + ))) )) (setq r (cdr r)) )) @@ -140,8 +156,42 @@ named -DISTRIBUTION interactively." (call-interactively 'signature/insert-signature-at-eof) (call-interactively 'signature/insert-signature-at-point))) +(defun signature-check-in-bbdb (address) + "Returns 'sigtype field from BBDB for user specified by ADDRESS" + (require 'bbdb) + (require 'bbdb-com) + (let ((addr-comp (mail-extract-address-components address)) + full-name net-name records record sigtype) + (setq full-name (car addr-comp)) + (setq net-name (mapconcat (lambda (x) x) (cdr addr-comp) "\\|")) + (setq records + (or + (and full-name + (bbdb-search (bbdb-records) full-name)) + (and net-name + (bbdb-search (bbdb-records) nil nil net-name)))) + (setq record (car records)) + (setq records (cdr records)) + (setq sigtype (and record (bbdb-record-getprop record 'sigtype))) + (while (and (not sigtype) records) + (setq record (car records)) + (setq records (cdr records)) + (setq sigtype (bbdb-record-getprop record 'sigtype))) + (if sigtype + (message (concat "Using signature for: " + (bbdb-record-firstname record) " " + (bbdb-record-lastname record) + (and (bbdb-record-aka record) + (concat " (AKA: " + (car (bbdb-record-aka record)) + ")")) + " <" (car (bbdb-record-net record)) ">"))) + sigtype)) + ;;; @ end ;;; (provide 'signature) + +;;; signature.el ends here diff --git a/tm-bbdb.el b/tm-bbdb.el index dc20bfe..277371d 100644 --- a/tm-bbdb.el +++ b/tm-bbdb.el @@ -5,7 +5,7 @@ ;;; ;;; Author: KOBAYASHI Shuhei ;;; Maintainer: MORIOKA Tomohiko -;;; Version: $Id: tm-bbdb.el,v 6.0 1996/03/04 11:58:55 morioka Exp $ +;;; Version: $Id: tm-bbdb.el,v 7.0 1996/03/13 16:23:26 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB ;;; ;;; This file is part of tm (Tools for MIME). @@ -52,9 +52,9 @@ (or tm-bbdb/use-mail-extr (progn + (require 'mail-extr) ; for `what-domain' (fset 'mail-extract-address-components (symbol-function 'tm-bbdb/extract-address-components)) - (provide 'mail-extr) )) @@ -125,23 +125,20 @@ the user confirms the creation." (set-buffer mime::article/preview-buffer)) (if bbdb-use-pop-up (tm-bbdb/pop-up-bbdb-buffer offer-to-create) - (let ((from (rfc822/get-field-body "From"))) - (if (or (null from) - (string-match (bbdb-user-mail-names) - (car - (cdr - ;; (tm-bbdb/extract-address-components from) - (mail-extract-address-components from) - )))) - (setq from (or (rfc822/get-field-body "To") - from))) - (if from - (bbdb-annotate-message-sender - from t - (or (bbdb-invoke-hook-for-value tm-bbdb/auto-create-p) - offer-to-create) - offer-to-create)) - )))) + (let* ((from (rfc822/get-field-body "From")) + (addr (car (cdr (mail-extract-address-components from))))) + (if (or (null from) + (null addr) + (string-match (bbdb-user-mail-names) addr)) + (setq from (or (rfc822/get-field-body "To") + from))) + (if from + (bbdb-annotate-message-sender + from t + (or (bbdb-invoke-hook-for-value tm-bbdb/auto-create-p) + offer-to-create) + offer-to-create)) + )))) (defun tm-bbdb/annotate-sender (string) "Add a line to the end of the Notes field of the BBDB record diff --git a/tm-edit.el b/tm-edit.el index cab1bda..09f68ae 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -8,7 +8,7 @@ ;;; MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/08/21 renamed from mime.el -;;; Version: $Revision: 7.47 $ +;;; Version: $Revision: 7.48 $ ;;; Keywords: mail, news, MIME, multimedia, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -122,7 +122,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.47 1996/03/05 23:19:05 morioka Exp $") + "$Id: tm-edit.el,v 7.48 1996/03/13 17:55:33 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -1464,14 +1464,17 @@ while if FLAG is `\\^M' (control-M) the text is hidden." ;;; @ Translate the tagged MIME messages into a MIME compliant message. ;;; +(defvar mime-editor/translate-buffer-hook + '(mime-editor/pgp-enclose-buffer + mime/encode-message-header + mime-editor/translate-body)) + (defun mime-editor/translate-buffer () "Encode the tagged MIME message in current buffer in MIME compliant message." (interactive) (if (catch 'mime-editor/error (save-excursion - (mime-editor/pgp-enclose-buffer) - (mime/encode-message-header) - (mime-editor/translate-body) + (run-hooks 'mime-editor/translate-buffer-hook) )) (progn (undo) diff --git a/tm-view.el b/tm-view.el index 99e6f9a..dd81d62 100644 --- a/tm-view.el +++ b/tm-view.el @@ -8,7 +8,7 @@ ;;; modified by Steven L. Baur ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;;; Version: $Revision: 7.42 $ +;;; Version: $Revision: 7.43 $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -44,7 +44,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.42 1996/02/13 06:28:37 morioka Exp $") + "$Id: tm-view.el,v 7.43 1996/03/06 12:26:20 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -906,29 +906,26 @@ listed in key order: (defun mime-viewer/up-content () (interactive) - (let ((pc (mime-preview/point-pcinfo (point))) cinfo - (the-buf (current-buffer)) - rcnum r) - (switch-to-buffer (mime::preview-content-info/buffer pc)) - (setq cinfo (mime::preview-content-info/content-info pc)) - (setq rcnum (mime::content-info/rcnum cinfo)) - (if (null rcnum) - (mime-viewer/quit the-buf - (mime::preview-content-info/buffer pc) - ) - (setq r (mime-article/rcnum-to-cinfo (cdr rcnum))) - (switch-to-buffer the-buf) - (catch 'tag - (let ((rpcl mime::preview/content-list) cell) - (while rpcl - (setq cell (car rpcl)) - (if (eq r (mime::preview-content-info/content-info cell)) - (progn - (goto-char (mime::preview-content-info/point-min cell)) - (throw 'tag nil) - )) + (let* ((pc (mime-preview/point-pcinfo (point))) + (cinfo (mime::preview-content-info/content-info pc)) + (rcnum (mime::content-info/rcnum cinfo)) + ) + (if rcnum + (let ((r (save-excursion + (set-buffer (mime::preview-content-info/buffer pc)) + (setq r (mime-article/rcnum-to-cinfo (cdr rcnum))) + )) + (rpcl mime::preview/content-list) + cell) + (while (and + (setq cell (car rpcl)) + (not (eq r (mime::preview-content-info/content-info cell))) + ) (setq rpcl (cdr rpcl)) - ))) + ) + (goto-char (mime::preview-content-info/point-min cell)) + ) + (mime-viewer/quit) ))) (defun mime-viewer/previous-content () diff --git a/tm-vm.el b/tm-vm.el index e99e644..e4331ad 100644 --- a/tm-vm.el +++ b/tm-vm.el @@ -11,10 +11,11 @@ ;;; Shuhei KOBAYASHI ;;; Oscar Figueiredo ;;; modified by SHIONO Jun'ichi -;;; and ISHIHARA Akito +;;; ISHIHARA Akito +;;; Rob Kooper ;;; Maintainer: Shuhei KOBAYASHI ;;; Created: 1994/10/29 -;;; Version: $Revision: 7.44 $ +;;; Version: $Revision: 7.48 $ ;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -41,13 +42,16 @@ (require 'vm) (defconst tm-vm/RCS-ID - "$Id: tm-vm.el,v 7.44 1996/02/23 22:00:46 morioka Exp $") + "$Id: tm-vm.el,v 7.48 1996/03/11 15:21:25 morioka Exp $") (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) (define-key vm-mode-map "Z" 'tm-vm/view-message) (define-key vm-mode-map "T" 'tm-vm/decode-message-header) (define-key vm-mode-map "\et" 'tm-vm/toggle-preview-mode) +(defvar tm-vm/use-original-url-button nil + "*If it is t, use original URL button instead of tm's.") + (defvar tm-vm-load-hook nil "*List of functions called after tm-vm is loaded.") @@ -231,7 +235,9 @@ tm-vm uses `vm-select-message-hook', use this hook instead.") (point) )) (mime/viewer-mode) - (goto-char (point-min)) + (if (and tm-vm/use-original-url-button + vm-use-menus (vm-menu-support-possible-p)) + (vm-energize-urls)) ;; 1996/2/16, fixed by ;; Oscar Figueiredo ;; Highlight message (and display XFace if supported) @@ -239,8 +245,8 @@ tm-vm uses `vm-select-message-hook', use this hook instead.") (and (vm-xemacs-p) vm-use-lucid-highlighting)) (vm-highlight-headers)) ;; - (narrow-to-region (point) - (search-forward "\n\n" nil t)) + (goto-char (point-min)) + (narrow-to-region (point) (search-forward "\n\n" nil t)) )) ;; don't do MIME processing. decode header only. (let (buffer-read-only) @@ -352,7 +358,7 @@ tm-vm uses `vm-select-message-hook', use this hook instead.") (setq mwin (vm-get-buffer-window mbuf) pwin (and pbuf (vm-get-buffer-window pbuf))) (cond - (was-invisible + ((or mp-changed was-invisible) nil ) ((null pbuf) -- 1.7.10.4