tm 7.27.
authormorioka <morioka>
Mon, 9 Mar 1998 11:42:40 +0000 (11:42 +0000)
committermorioka <morioka>
Mon, 9 Mar 1998 11:42:40 +0000 (11:42 +0000)
23 files changed:
Changes-7.27.en [new file with mode: 0644]
Changes-7.27.ja [new file with mode: 0644]
Makefile
gnus/ChangeLog-7.18.en [new file with mode: 0644]
gnus/ChangeLog-7.18.ja [new file with mode: 0644]
gnus/Makefile
gnus/mk-tgnus
gnus/s-path
gnus/tm-gd3.el [new file with mode: 0644]
gnus/tm-gd5.el [new file with mode: 0644]
gnus/tm-gnus.el
gnus/tm-gnus3.el
gnus/tm-gnus4.el
gnus/tm-sgnus.el
mh-e/ChangeLog-7.25.en [new file with mode: 0644]
mh-e/ChangeLog-7.25.ja [new file with mode: 0644]
mh-e/Makefile
mh-e/mk-tmh
mh-e/tm-mh-e.el
mime-setup.el
tm-edit.el
tm-html.el
tm-vm.el

diff --git a/Changes-7.27.en b/Changes-7.27.en
new file mode 100644 (file)
index 0000000..167b00d
--- /dev/null
@@ -0,0 +1,64 @@
+Mon Nov 20 02:48:34 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm 7.27 is released.
+       * tm/mh-e: Attached version 7.25.
+       * tm/gnus: Attached version 7.18.
+
+       * tm-vm.el:
+       (1) Function `tm-vm/preview-current-message' was fixed.
+       (2) setting for BBDB was modified.
+
+       * tm-edit.el:
+       In function `mime-editor/enclose-region, interpretation
+       mistake of RFC 1521 was fixed.
+
+Sun Nov 19 18:06:34 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-vm.el:
+       fixed problem of function `tm-vm/scroll-forward' and
+       `tm-vm/scroll-backward'.
+
+       * tm-vm.el:
+       (1) insert (run-hooks 'tm-vm/vm-select-message-hook) into
+           function `tm-vm/preview-current-message'.
+       (2) setting for BBDB.
+           (Please insert (load "tm-vm") after (bbdb-insinuate-vm))
+
+       * mime-setup.el:
+       (add-hook 'mail-setup-hook 'mime/editor-mode 'append) instead
+       of (add-hook 'mail-mode-hook 'mime/editor-mode).
+
+       * tm-vm.el:
+       (1) fixed problem of function `mime::article/preview-buffer'.
+       (2) Don't reset of hooks when mime-setup is loaded.
+
+Fri Nov 17 14:34:52 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-vm.el:
+       Oscar Figueiredo <figueire@lspsun2.epfl.ch>'s modification was 
+       applied.
+
+       * tm-html.el:
+       KOBAYASHI Shuuhei <shuhei@cmpt01.phys.tohoku.ac.jp>'s patch
+       was applied. (cf. [tm-ja:1117])
+
+       * tm-vm.el:
+       changed Subject field decoding way when does not use tiny-mime
+       patch.
+
+       * tm-vm.el:
+       SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>'s patch was
+       applied. (cf. [tm-ja:1120])
+
+       * tm-vm.el:
+       SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>'s patch was
+       applied. (cf. [tm-ja:1119])
+
+       * mh-e/tm-mh-e.el:
+       In function `tm-mh-e/forward', use forwcomps specified by
+       variable `tm-mh-e/forwcomps' when variable
+       `tm-mh-e/use-forwcomps' was non-nil.
+
+       * mh-e/tm-mh-e.el:
+       YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>'s patch was applied.
+       (cf. [tm-ja:1116])
diff --git a/Changes-7.27.ja b/Changes-7.27.ja
new file mode 100644 (file)
index 0000000..ec5955a
--- /dev/null
@@ -0,0 +1,62 @@
+Mon Nov 20 02:48:34 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm 7.27 \e$B$r\e(B release.
+       * tm/mh-e: Version 7.25 \e$B$rE:IU\e(B
+       * tm/gnus: Version 7.18 \e$B$rE:IU\e(B
+
+       * tm-vm.el:
+       (1) \e$B4X?t\e(B tm-vm/preview-current-message \e$B$r=$@5$7$?!#\e(B
+       (2) BBDB \e$BMQ$N\e(B code \e$B$r=$@5$7$?!#\e(B
+
+       * tm-edit.el:
+       \e$B4X?t\e(B mime-editor/enclose-region \e$B$K$*$1$k5,3J2r<a>e$N8m$j$r=$@5$7$?!#\e(B
+
+Sun Nov 19 18:06:34 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-vm.el:
+       \e$B4X?t\e(B tm-vm/scroll-forward \e$B$H4X?t\e(B tm-vm/scroll-backward \e$B$NIT6q9g$r\e(B
+       \e$B=$@5$7$?!#\e(B
+
+       * tm-vm.el:
+       (1) \e$B4X?t\e(B tm-vm/preview-current-message \e$B$K\e(B
+           (run-hooks 'tm-vm/vm-select-message-hook) \e$B$rF~$l$?!#\e(B
+       (2) BBDB \e$B$N@_Dj$r9T$C$?!#\e(B
+           \e$B!J\e(B(bbdb-insinuate-vm) \e$B$N8e$K\e(B (load "tm-vm") \e$B$rF~$l$k$3$H!K\e(B
+
+       * mime-setup.el:
+       (add-hook 'mail-mode-hook  'mime/editor-mode) \e$B$r$d$a!"\e(B
+       (add-hook 'mail-setup-hook 'mime/editor-mode 'append) \e$B$H$7$?!#\e(B
+
+       * tm-vm.el:
+       (1) \e$B4X?t\e(B mime::article/preview-buffer \e$B$NIT6q9g$r=$@5$7$?!#\e(B
+       (2) mime-setup \e$B$r\e(B load \e$B$9$k;~$N\e(B hook \e$B$N:F@_Dj$r$d$a$?!#\e(B
+
+Fri Nov 17 14:34:52 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-vm.el:
+       Oscar Figueiredo <figueire@lspsun2.epfl.ch> \e$B$5$s$N=$@5$r2C$($?!#\e(B
+
+       * tm-html.el:
+       \e$B>.NS\e(B \e$B=$J?\e(B <shuhei@cmpt01.phys.tohoku.ac.jp> \e$B$5$s$N\e(B patch \e$B$rEv$F$?!#\e(B
+       (cf. [tm-ja:1117])
+
+       * tm-vm.el:
+       tiny-mime patch \e$B$r;H$o$J$$>l9g$N\e(B Subject field \e$B$N\e(B decode \e$B$N;EJ}$r\e(B
+       \e$BJQ$($?!#\e(B
+
+       * tm-vm.el:
+       \e$B1vLn!wM7$S?M\e(B <jun@case.nm.fujitsu.co.jp> \e$B$5$s$N\e(B patch \e$B$rEv$F$?!#\e(B
+       (cf. [tm-ja:1120])
+
+       * tm-vm.el:
+       \e$B1vLn!wM7$S?M\e(B <jun@case.nm.fujitsu.co.jp> \e$B$5$s$N\e(B patch \e$B$rEv$F$?!#\e(B
+       (c.f. [tm-ja:1119])
+
+       * mh-e/tm-mh-e.el:
+       \e$B4X?t\e(B tm-mh-e/forward \e$B$K$*$$$F!"JQ?t\e(B tm-mh-e/use-forwcomps \e$B$,\e(B 
+       non-nil \e$B$N;~!"JQ?t\e(B tm-mh-e/forwcomps \e$B$G;XDj$5$l$?\e(B forwcomps \e$B$rMQ$$\e(B
+       \e$B$k$h$&$K$7$?!#\e(B
+
+       * mh-e/tm-mh-e.el:
+       \e$B;32,\e(B \e$B9nH~\e(B <yamaoka@ga.sony.co.jp> \e$B$5$s$N\e(B patch \e$B$rEv$F$?!#\e(B
+       (cf. [tm-ja:1116])
index b36b2e8..b763800 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,9 +26,9 @@ TM_FILES = tm/README.eng tm/Changes* \
 
 TM_MUA_FILES = tm/tm-rmail.el tm/tm-vm.el \
                tm/gnus/Makefile tm/gnus/*-path tm/gnus/mk-tgnus \
-               tm/gnus/*.el \
+               tm/gnus/*.el tm/gnus/ChangeLog-* \
                tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/code-jp.ol \
-               tm/mh-e/*.el
+               tm/mh-e/*.el tm/mh-e/ChangeLog-*
 
 MEL_FILES = mel/*.el mel/Makefile mel/mk-mel mel/Changes*
 
@@ -37,7 +37,7 @@ TL_FILES = tl/README.eng tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \
 
 FILES  = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
 
-TARFILE = tm7.26.tar.gz
+TARFILE = tm7.27.tar.gz
 
 
 nemacs:
diff --git a/gnus/ChangeLog-7.18.en b/gnus/ChangeLog-7.18.en
new file mode 100644 (file)
index 0000000..7b01e8f
--- /dev/null
@@ -0,0 +1,27 @@
+Mon Nov 20 12:01:58 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/gnus: Version 7.18 was released.
+
+Sun Nov 19 08:30:08 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-gnus.el: module composition was changed.
+               (ding) Gnus support was stopped.
+
+       * tm-sgnus.el: insert (require 'tm-gd5).
+
+       * tm-gd5.el: Initial revision
+       tm-gnus library module for Gnus 5.*.
+
+       * tm-gnus4.el: tm-gnus5.el was merged into tm-gnus4.el.
+                      (tm-gnus5.el was abolished.)
+
+       * tm-gnus3.el:
+       (1) `tm-ognus.el' was renamed to `tm-gd3.el'.
+       (2) setting for BBDB.
+
+       * tm-gd3.el: some codes for tm-gnus3.el was moved to
+                    tm-gnus3.el.
+
+       * tm-sgnus.el: setting for variable
+       `gnus-decode-encoded-word-method'. (It will be proposed as a
+       variable of September Gnus)
diff --git a/gnus/ChangeLog-7.18.ja b/gnus/ChangeLog-7.18.ja
new file mode 100644 (file)
index 0000000..8a285d2
--- /dev/null
@@ -0,0 +1,27 @@
+Mon Nov 20 12:01:58 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/gnus: Version 7.18 \e$B$r\e(B release.
+
+Sun Nov 19 08:30:08 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-gnus.el: \e$B9=@.$rJQ$($?!#\e(B
+               (ding) Gnus \e$B$N\e(B support \e$B$r$d$a$?!#\e(B
+
+       * tm-sgnus.el: (require 'tm-gd5) \e$B$rF~$l$?!#\e(B
+
+       * tm-gd5.el: Initial revision
+
+       * tm-gnus4.el: tm-gnus5.el \e$B$HE}9g$7$?!#\e(B
+
+       * tm-gnus3.el:
+       (1) tm-gd3 \e$B$KBP1~$7$?!#\e(B
+       (2) BBDB \e$B$KBP1~$7$?!#\e(B
+
+       * tm-gd3.el: Comment \e$B$NIT6q9g$r=$@5$7$?!#\e(B
+
+       * tm-gd3.el: \e$BIT6q9g$r=$@5$7$?!#\e(B
+
+       * tm-gd3.el: tm-gnus3 \e$B@lMQ$NItJ,$r\e(B tm-gnus3.el \e$B$K0\$7$?!#\e(B
+
+       * tm-sgnus.el: September Gnus \e$B$K$G$C$A$"$2$?JQ?t\e(B 
+       gnus-decode-encoded-word-method \e$B$KBP1~$7$?!#\e(B
index 2f7a930..2ef8f0f 100644 (file)
@@ -17,7 +17,7 @@ TMDIR19 = $(HOME)/lib/emacs19/lisp
 
 FILES  = tm/gnus/*.el tm/doc/tm-gnus*.texi
 
-TARFILE = tm-gnus7.16.1.tar
+TARFILE = tm-gnus7.18.tar
 
 
 gnus3:
index 6879d5e..150cc75 100644 (file)
@@ -1,4 +1,7 @@
 ;;; -*-Emacs-Lisp-*-
+;;;
+;;; $Id: mk-tgnus,v 1.1 1995/11/18 08:07:24 morioka Exp morioka $
+;;;
 
 (require 'emu)
 
         (byte-compile-file "tm-sgnus.el")
         )
        ((string-match "Gnus v5\\|September Gnus" gnus-version)
-        (byte-compile-file "tm-gnus5.el")
-        )
-       ((string-match "(ding)" gnus-version)
-        (require 'tm-dgnus)
-        (byte-compile-file "tm-dgnus.el")
-        (byte-compile-file "tm-gnus5.el")
+        (byte-compile-file "tm-gnus4.el")
+        (byte-compile-file "tm-gd5.el")
         )
        ((string-match "GNUS 4" gnus-version)
         (byte-compile-file "tm-gnus4.el")
@@ -70,7 +69,7 @@
     (if (< (string-to-int emacs-version) 19)
        (progn
          (install-el-files path
-                           "tm-gnus.el" "tm-ognus.el"
+                           "tm-gnus.el" "tm-gd3.el"
                            "tm-gnus3.el" "tm-gnus4.el")
          (install-elc-files path
                             "tm-gnus.elc"
       (progn
        (install-el-files path
                          "tm-gnus.el" "tm-sgnus.el"
-                         "tm-gnus5.el" "tm-dgnus.el"
-                         "tm-ognus.el" "tm-gnus4.el")
+                         "tm-gd5.el" "tm-gd3.el"
+                         "tm-gnus4.el")
        (install-elc-files path
                           "tm-gnus.elc" "tm-sgnus.elc"
-                          "tm-gnus5.elc" "tm-dgnus.elc"
+                          "tm-gd5.elc"
                           "tm-gnus4.elc")
        ))))
index eb04849..467babd 100644 (file)
@@ -12,6 +12,6 @@
        ;;
        ;; please edit this
        ;;
-       '("/usr/local/lib/emacs/site-lisp/sgnus-0.12/lisp")
+       '("/usr/local/lib/emacs/site-lisp/sgnus-0.13/lisp")
        ;;
        load-path))
diff --git a/gnus/tm-gd3.el b/gnus/tm-gd3.el
new file mode 100644 (file)
index 0000000..c5bb45e
--- /dev/null
@@ -0,0 +1,67 @@
+;;;
+;;; tm-gd3.el --- tm-gnus module for GNUS 3.* and 4.*
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;;    $Id: tm-gd3.el,v 7.4 1995/11/19 07:10:19 morioka Exp $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
+;;;
+
+(require 'tm-ew-d)
+
+
+;;; @ to decode subjects in mode-line
+;;;
+;; This function imported from gnus.el.
+;;
+;; New implementation in gnus 3.14.3
+;;
+
+(defun tm-gnus/article-set-mode-line ()
+  "Set Article mode line string.
+If you don't like it, define your own gnus-article-set-mode-line."
+  (let ((maxlen 15)                    ;Maximum subject length
+       (subject
+        (if gnus-current-headers
+            (mime-eword/decode-string
+             (nntp-header-subject gnus-current-headers))
+          "")
+        ))
+    ;; The value must be a string to escape %-constructs because of subject.
+    (setq mode-line-buffer-identification
+         (format "GNUS: %s%s %s%s%s"
+                 gnus-newsgroup-name
+                 (if gnus-current-article
+                     (format "/%d" gnus-current-article) "")
+                 (rightful-boundary-short-string subject
+                                                 (min (string-width subject)
+                                                      maxlen))
+                 (if (> (string-width subject) maxlen) "..." "")
+                 (make-string (max 0 (- 17 (string-width subject))) ? )
+                 )))
+  (set-buffer-modified-p t))
+
+
+;;; @ to decode subjects in Summary buffer
+;;;
+
+(defun tm-gnus/decode-summary-subjects ()
+  (mapcar (function
+          (lambda (header)
+            (let ((subj (or (gnus-header-subject header) "")))
+              (nntp-set-header-subject
+               header (mime-eword/decode-string subj))
+              )))
+         gnus-newsgroup-headers)
+  )
+
+
+;;; @ end
+;;;
+
+(provide 'tm-gd3)
diff --git a/gnus/tm-gd5.el b/gnus/tm-gd5.el
new file mode 100644 (file)
index 0000000..4604275
--- /dev/null
@@ -0,0 +1,45 @@
+;;;
+;;; tm-gd5.el --- tm-gnus module for Gnus 5.*.
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;;    $Id: tm-gd5.el,v 1.1 1995/11/19 08:11:47 morioka Exp $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
+;;;
+
+(cond ((not (boundp 'nnheader-encoded-words-decoding))
+       (require 'tm-ew-d)
+       
+       (defun tm-gnus/decode-summary-from-and-subjects ()
+        (mapcar (lambda (header)
+                  (let ((from (mail-header-from header))
+                        (subj (mail-header-subject header))
+                        )
+                    (mail-header-set-from
+                     header
+                     (if from
+                         (mime-eword/decode-string from)
+                       ""))
+                    (mail-header-set-subject
+                     header
+                     (if subj
+                         (mime-eword/decode-string subj)
+                       ""))
+                    ))
+                gnus-newsgroup-headers)
+        )
+       
+       (add-hook 'gnus-select-group-hook
+                (function tm-gnus/decode-summary-from-and-subjects))
+       ))
+
+
+;;; @ end
+;;;
+
+(provide 'tm-gd5)
index 0b4f153..74aedc2 100644 (file)
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: Morioka Tomohiko <morioka@jaist.ac.jp>
 ;;; Version:
-;;;    $Id: tm-gnus.el,v 7.5 1995/11/16 15:28:58 morioka Exp $
+;;;    $Id: tm-gnus.el,v 7.6 1995/11/19 08:30:08 morioka Exp $
 ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
        (require 'tm-sgnus)
        )
       ((string-match "^\\(Gnus v5\\|September Gnus\\)" gnus-version)
-       (require 'tm-gnus5)
-       )
-      ((string-match "(ding)" gnus-version)
-       (require 'tm-dgnus)
+       (require 'tm-gd5)
+       (require 'tm-gnus4)
        )
       ((string-match "^GNUS 4" gnus-version)
+       (require 'tm-gd3)
        (require 'tm-gnus4)
+       
+       (add-hook 'gnus-select-group-hook 'tm-gnus/decode-summary-subjects)
+       (fset 'gnus-article-set-mode-line
+            (function tm-gnus/article-set-mode-line))
        )
       ((string-match "^GNUS 3" gnus-version)
        (require 'tm-gnus3)
index a33cd87..782a01b 100644 (file)
 ;;;
 ;;; tm-gnus3.el --- tm-gnus module for GNUS 3.*
 ;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
+;;;
 
 (require 'tl-list)
 (require 'tl-str)
 (require 'tl-misc)
-(require 'tm-ognus)
+(require 'gnus)
+(require 'tm-gd3)
+
+(autoload 'mime/decode-message-header
+  "tm-ew-d" "Decode MIME encoded-words in message header." t)
+(autoload 'mime-eword/decode-string
+  "tm-ew-d" "Decode MIME encoded-words in string." t)
+
+(fset 'gnus-summary-select-article 'gnus-Subject-select-article)
 
 
 ;;; @ version
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-gnus3.el,v 7.0 1995/10/22 12:02:04 morioka Exp $")
+  "$Id: tm-gnus3.el,v 7.1 1995/11/19 07:23:29 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 3"))
 
 
+;;; @ variable
+;;;
+
+(defvar tm-gnus/decoding-mode t "*Decode MIME header if non-nil.")
+
+
+;;; @ mode-line
+;;;
+
+(defun tm-gnus/add-decoding-mode-to-mode-line ()
+  (or (assq 'tm-gnus/decoding-mode minor-mode-alist)
+      (setq minor-mode-alist
+           (cons (list 'tm-gnus/decoding-mode " MIME")
+                 minor-mode-alist))
+      ))
+
+(if (not (string-match "^GNUS 3\.14\.4" gnus-version))
+    (progn
+      (add-hook 'gnus-Article-mode-hook
+               (function
+                (lambda ()
+                  (make-local-variable 'minor-mode-alist)
+                  (tm-gnus/add-decoding-mode-to-mode-line)
+                  )))
+      )
+  (progn
+    (add-hook 'gnus-Article-mode-hook
+             (function tm-gnus/add-decoding-mode-to-mode-line))
+    ))
+
+;;; @@ to decode subjects in mode-line
+;;;
+;; This function imported from gnus.el.
+;;
+;; New implementation in gnus 3.14.3
+;;
+
+(defun tm-gnus/article-set-mode-line ()
+  "Set Article mode line string.
+If you don't like it, define your own gnus-article-set-mode-line."
+  (let ((maxlen 15)                    ;Maximum subject length
+       (subject
+        (if gnus-current-headers
+            (mime-eword/decode-string
+             (nntp-header-subject gnus-current-headers))
+          "")
+        ))
+    ;; The value must be a string to escape %-constructs because of subject.
+    (setq mode-line-buffer-identification
+         (format "GNUS: %s%s %s%s%s"
+                 gnus-newsgroup-name
+                 (if gnus-current-article
+                     (format "/%d" gnus-current-article) "")
+                 (rightful-boundary-short-string subject
+                                                 (min (string-width subject)
+                                                      maxlen))
+                 (if (> (string-width subject) maxlen) "..." "")
+                 (make-string (max 0 (- 17 (string-width subject))) ? )
+                 )))
+  (set-buffer-modified-p t))
+
+(fset 'gnus-Article-set-mode-line 'tm-gnus/article-set-mode-line)
+
+
+;;; @ change MIME encoded-word decoding mode, decoding or non decoding.
+;;;
+
+(defun tm-gnus/set-decoding-mode (arg)
+  "Set MIME encoded-word processing.
+With arg, turn MIME encoded-word processing on iff arg is positive."
+  (setq tm-gnus/decoding-mode arg)
+  (setq gnus-have-all-headers (not gnus-have-all-headers))
+  (gnus-summary-select-article (not gnus-have-all-headers) t)
+  )
+
+(defun tm-gnus/toggle-decoding-mode ()
+  "Toggle MIME encoded-word processing.
+With arg, turn MIME encoded-word processing on iff arg is positive."
+  (interactive)
+  (tm-gnus/set-decoding-mode (not tm-gnus/decoding-mode))
+  )
+
+
 ;;; @ for tm-view
 ;;;
 
 (define-key gnus-Subject-mode-map "\et" 'tm-gnus/toggle-decoding-mode)
 (define-key gnus-Subject-mode-map "v" 'tm-gnus/view-message)
 
-(fset 'gnus-summary-select-article 'gnus-Subject-select-article)
-
-(fset 'gnus-Article-set-mode-line 'tm-gnus/article-set-mode-line)
-
 (defun tm-gnus/decode-encoded-word-if-you-need ()
   (if (and tm-gnus/decoding-mode
           (cond ((boundp 'all-headers) (not all-headers))
                 (t                     t))
           )
       (mime/decode-message-header)
-    ))
+    )
+  (run-hooks 'tm-gnus/article-prepare-hook)
+  )
 
 (add-hook 'gnus-Article-prepare-hook
          (function tm-gnus/decode-encoded-word-if-you-need) t)
 
-(if (not (string-match "^GNUS 3\.14\.4" gnus-version))
-    (progn
-      (add-hook 'gnus-Article-mode-hook
-               (function
-                (lambda ()
-                  (make-local-variable 'minor-mode-alist)
-                  (tm-gnus/add-decoding-mode-to-mode-line)
-                  )))
-      )
-  (progn
-    (add-hook 'gnus-Article-mode-hook
-             (function tm-gnus/add-decoding-mode-to-mode-line))
-    ))
+
+;;; @ for BBDB
+;;;
+
+(defun tm-gnus/bbdb-setup ()
+  (if (memq 'bbdb/gnus-update-record gnus-Article-prepare-hook)
+      (progn
+       (remove-hook 'gnus-Article-prepare-hook 'bbdb/gnus-update-record)
+       (add-hook 'tm-gnus/article-prepare-hook 'bbdb/gnus-update-record)
+       )))
+
+(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
+
+(tm-gnus/bbdb-setup)
 
 
 ;;; @ end
index 123b728..157f12f 100644 (file)
@@ -1,20 +1,35 @@
 ;;;
-;;; tm-gnus4.el --- tm-gnus module for GNUS 4.*
+;;; tm-gnus4.el --- tm-gnus module for GNUS 4, 5.0.* and 5.1.*.
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
 ;;;
 
 (require 'tl-str)
 (require 'tl-misc)
-(require 'tm-ognus)
 
 
 ;;; @ version
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-gnus4.el,v 7.1 1995/10/28 05:44:44 morioka Exp $")
+  "$Id: tm-gnus4.el,v 7.2 1995/11/19 08:10:33 morioka Exp $")
 
 (defconst tm-gnus/version
-  (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 4"))
+  (concat (get-version-string tm-gnus/RCS-ID) " for 4 .. 5.1"))
+
+
+;;; @ variable
+;;;
+
+(defvar tm-gnus/automatic-mime-preview t
+  "*If non-nil, show MIME processed article.
+This variable is set to `gnus-show-mime'.")
 
 
 ;;; @ for tm-view
     )))
 
 
-;;; @ Summary decoding
-;;;
-
-(add-hook 'gnus-select-group-hook (function tm-gnus/decode-summary-subjects))
-
-
 ;;; @ set up
 ;;;
 
-(define-key gnus-summary-mode-map
-  "\et" (function tm-gnus/toggle-decoding-mode))
 (define-key gnus-summary-mode-map "v" (function tm-gnus/view-message))
 (define-key gnus-summary-mode-map
   "\e\r" (function tm-gnus/summary-scroll-down))
 
-(fset 'gnus-article-set-mode-line 'tm-gnus/article-set-mode-line)
-(add-hook 'gnus-article-mode-hook
-         (function tm-gnus/add-decoding-mode-to-mode-line))
-
 (defun tm-gnus/decode-encoded-word-if-you-need ()
-  (if (and tm-gnus/decoding-mode (not gnus-have-all-headers))
-      (mime/decode-message-header)
-    ))
+  (if (not gnus-have-all-headers)
+      (progn
+       (mime/decode-message-header)
+       (run-hooks 'tm-gnus/article-prepare-hook)
+       )))
+
+(defvar tm-gnus/original-article-buffer " *Original Article*")
+
+(defun tm-gnus/preview-article-if-you-need ()
+  (if (not gnus-have-all-headers)
+      (let ((str (buffer-string))
+           (obuf (get-buffer tm-gnus/original-article-buffer))
+           (pbuf (current-buffer))
+           )
+       (if obuf
+           (progn
+             (set-buffer obuf)
+             (setq buffer-read-only nil)
+             (erase-buffer)
+             )
+         (setq obuf (get-buffer-create tm-gnus/original-article-buffer))
+         (set-buffer obuf)
+         )
+       (insert str)
+       (gnus-article-mode)
+       (set-buffer pbuf)
+       (make-local-variable 'tm:mother-button-dispatcher)
+       (setq tm:mother-button-dispatcher
+             (function gnus-article-push-button))
+       (mime/viewer-mode
+        nil nil nil tm-gnus/original-article-buffer gnus-article-buffer)
+       (setq buffer-read-only nil)
+       (gnus-article-show-summary)
+       (run-hooks 'tm-gnus/article-prepare-hook)
+       )))
+
+(setq gnus-show-mime-method
+      (if tm-gnus/automatic-mime-preview
+         (function tm-gnus/preview-article-if-you-need)
+       (function tm-gnus/decode-encoded-word-if-you-need)
+       ))
+
+(setq gnus-show-mime t)
+
+
+;;; @ for BBDB
+;;;
+
+(defun tm-gnus/bbdb-setup ()
+  (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook)
+      (progn
+       (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
+       (add-hook 'tm-gnus/article-prepare-hook 'bbdb/gnus-update-record)
+       )))
+
+(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
 
-(add-hook 'gnus-article-prepare-hook
-         (function tm-gnus/decode-encoded-word-if-you-need) t)
+(tm-gnus/bbdb-setup)
 
 
 ;;; @ end
index c253d00..14d10ca 100644 (file)
 (require 'tl-str)
 (require 'tl-list)
 (require 'tl-misc)
-(require 'gnus)
 (require 'tm-view)
+(require 'gnus)
+(require 'tm-gd5)
 
 
 ;;; @ version
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-sgnus.el,v 7.16 1995/11/15 10:36:09 morioka Exp $")
+  "$Id: tm-sgnus.el,v 7.18 1995/11/19 08:29:23 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for September"))
@@ -131,33 +132,6 @@ This variable is set to `gnus-show-mime'.")
    ))
 
 
-;;; @ summary filter
-;;;
-
-(cond ((not (boundp 'nnheader-encoded-words-decoding))
-       (defun tm-gnus/decode-summary-from-and-subjects ()
-        (mapcar (lambda (header)
-                  (let ((from (mail-header-from header))
-                        (subj (mail-header-subject header))
-                        )
-                    (mail-header-set-from
-                     header
-                     (if from
-                         (mime-eword/decode-string from)
-                       ""))
-                    (mail-header-set-subject
-                     header
-                     (if subj
-                         (mime-eword/decode-string subj)
-                       ""))
-                    ))
-                gnus-newsgroup-headers)
-        )
-       (add-hook 'gnus-select-group-hook
-                (function tm-gnus/decode-summary-from-and-subjects))
-       ))
-
-
 ;;; @ article filter
 ;;;
 
@@ -179,6 +153,14 @@ This variable is set to `gnus-show-mime'.")
 
 (setq gnus-show-mime-method (function tm-gnus/preview-article))
 
+(defun tm-gnus/article-decode-encoded-word ()
+  (mime/decode-message-header)
+  (run-hooks 'tm-gnus/article-prepare-hook)
+  )
+
+(setq gnus-decode-encoded-word-method
+      (function tm-gnus/article-decode-encoded-word))
+
 (or (fboundp 'tm::gnus-article-hide-headers-if-wanted)
     (fset 'tm::gnus-article-hide-headers-if-wanted
          (symbol-function 'gnus-article-hide-headers-if-wanted))
diff --git a/mh-e/ChangeLog-7.25.en b/mh-e/ChangeLog-7.25.en
new file mode 100644 (file)
index 0000000..e78e1f5
--- /dev/null
@@ -0,0 +1,7 @@
+Mon Nov 20 11:59:40 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/mh-e: Version 7.25 was released.
+
+Sun Nov 19 06:44:32 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-mh-e.el: fixed fatal problem in Emacs 18.
diff --git a/mh-e/ChangeLog-7.25.ja b/mh-e/ChangeLog-7.25.ja
new file mode 100644 (file)
index 0000000..a065d3f
--- /dev/null
@@ -0,0 +1,7 @@
+Mon Nov 20 11:59:40 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/mh-e: Version 7.25 \e$B$r\e(B release.
+
+Sun Nov 19 06:44:32 1995  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-mh-e.el: Emacs 18 \e$B$GF0$+$J$/$J$C$F$$$?$N$r=$@5$7$?!#\e(B
index 448bc11..86c956c 100644 (file)
@@ -23,7 +23,7 @@ TMDIR19       = $(HOME)/lib/emacs19/lisp
 
 
 FILES  = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol
-TARFILE = tm-mh-e7.20.tar
+TARFILE = tm-mh-e7.25.tar
 
 
 elc:
index 23ffb5b..7720aff 100644 (file)
@@ -33,9 +33,9 @@
              tm-mh-e-modules))
 
 (defun compile-tm-mh-e ()
+  (require 'tm-mh-e)
   (require 'mh-comp)
   (require 'tm-edit)
-  (require 'tm-mh-e)
   (mapcar (function byte-compile-file) tm-mh-e-el-files)
   )
 
index 32fdf77..3b80906 100644 (file)
@@ -6,6 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;;         OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;; modified by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
 ;;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -27,7 +28,7 @@
 ;;;
 
 (defconst tm-mh-e/RCS-ID
-  "$Id: tm-mh-e.el,v 7.22 1995/11/16 10:20:53 morioka Exp $")
+  "$Id: tm-mh-e.el,v 7.25 1995/11/19 06:44:32 morioka Exp $")
 
 (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
 
@@ -41,6 +42,9 @@
 (defvar tm-mh-e/decode-encoded-word t
   "If non-nil, decode encoded-word when it is not MIME preview mode.")
 
+(defvar tm-mh-e/use-forwcomps nil)
+(defvar tm-mh-e/forwcomps "forwcomps")
+
 
 ;;; @ functions
 ;;;
@@ -292,7 +296,7 @@ With arg, turn MIME processing on if arg is positive."
    ))
 
 ;;; modified by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
-;;;    1995/11/14 (c.f. [tm ML:1096])
+;;;    1995/11/14 (cf. [tm-ja:1096])
 (defun tm-mh-e/prompt-for-message (prompt folder &optional default)
   (let* ((files
          (directory-files (mh-expand-file-name folder) nil "^[0-9]+$")
@@ -335,7 +339,7 @@ With arg, turn MIME processing on if arg is positive."
 ;;; end
 
 ;;; by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
-;;;    1995/11/14 (c.f. [tm ML:1099])
+;;;    1995/11/14 (cf. [tm-ja:1099])
 (defun tm-mh-e/forward (to cc &optional msg-or-seq)
   "Forward a message or message sequence as MIME multipart/digest.
 Defaults to displayed message. If optional prefix argument provided,
@@ -359,10 +363,16 @@ then prompt for the message sequence. See also documentation for
         ;; forw always leaves file in "draft" since it doesn't have -draft
         (draft-name (expand-file-name "draft" mh-user-path))
         (draft (cond ((or (not (file-exists-p draft-name))
-                          (y-or-n-p "The file 'draft' exists.  Discard it? "))
-                      (mh-exec-cmd "comp"
-                                   "-noedit" "-nowhatnowproc"
-                                   "-nodraftfolder")
+                          (y-or-n-p "The file `draft' exists.  Discard it? "))
+                      (if tm-mh-e/use-forwcomps
+                          (mh-exec-cmd "comp"
+                                       "-noedit" "-nowhatnowproc"
+                                       "-form" tm-mh-e/forwcomps
+                                       "-nodraftfolder")
+                        (mh-exec-cmd "comp"
+                                     "-noedit" "-nowhatnowproc"
+                                     "-nodraftfolder")
+                        )
                       (prog1
                           (mh-read-draft "" draft-name t)
                         (mh-insert-fields "To:" to "Cc:" cc)
@@ -375,6 +385,12 @@ then prompt for the message sequence. See also documentation for
       (save-excursion
        (save-restriction
          (re-search-forward "^-*\n")
+         ;; modified by Katsumi Yamaoka <yamaoka@ga.sony.co.jp>
+         ;;    1995/11/17 (cf.[tm-ja:1116])
+         (and (< (point) (point-max))
+              (not (re-search-forward "^[\t ]*\n" nil t))
+              (goto-char (point-max))
+              (insert "\n"))
          (insert "--<<digest>>-{\n")
          (mh-exec-cmd-output "pick" nil folder msg-or-seq)
          (narrow-to-region (point) (mark t))
@@ -435,10 +451,11 @@ then prompt for the message sequence. See also documentation for
 
 (call-after-loaded
  'mime-setup
- (lambda ()
-   (substitute-key-definition
-    'mh-forward 'tm-mh-e/forward mh-folder-mode-map)
-   ))
+ (function
+  (lambda ()
+    (substitute-key-definition
+     'mh-forward 'tm-mh-e/forward mh-folder-mode-map)
+    )))
 
 
 ;;; @ set up
index 8936601..56e63a1 100644 (file)
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Version:
-;;;    $Id: mime-setup.el,v 7.9 1995/10/28 06:02:53 morioka Exp $
+;;;    $Id: mime-setup.el,v 7.10 1995/11/19 13:47:54 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
   )
 
 
-;;; @ for RMAIL
+;;; @ for RMAIL and VM
 ;;;
 
-(add-hook 'mail-mode-hook  'mime/editor-mode)
+;;(add-hook 'mail-mode-hook  'mime/editor-mode)
 (add-hook 'mail-setup-hook 'mime/decode-message-header)
+(add-hook 'mail-setup-hook 'mime/editor-mode 'append)
 (add-hook 'mail-send-hook  'mime-editor/maybe-translate)
 
 
index 477eb46..83bf0f6 100644 (file)
 ;; LCD Archive Entry:
 ;; mime|Masanobu UMEDA|umerin@mse.kyutech.ac.jp|
 ;; Simple MIME Composer|
-;; $Date: 1995/11/16 16:32:36 $|$Revision: 7.26 $|~/misc/mime.el.Z|
+;; $Date: 1995/11/20 00:26:25 $|$Revision: 7.27 $|~/misc/mime.el.Z|
 
 ;;; Code:
 
 ;;;
 
 (defconst mime-editor/RCS-ID
-  "$Id: tm-edit.el,v 7.26 1995/11/16 16:32:36 morioka Exp $")
+  "$Id: tm-edit.el,v 7.27 1995/11/20 00:26:25 morioka Exp $")
 
 (defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
 
@@ -1915,37 +1915,27 @@ a recording host instead of local host."
 (defun mime-editor/enclose-region (type beg end)
   (save-excursion
     (goto-char beg)
-    (let ((f (bolp)))
+    (let ((current (point))
+         exist-prev-tag)
+      (save-excursion
+       (if (mime-editor/goto-tag)
+           (or (eq current (match-beginning 0))
+               (setq exist-prev-tag t)
+               )))
       (save-restriction
        (narrow-to-region beg end)
        (goto-char beg)
-       (if (not f)
+        (if exist-prev-tag
            (insert "\n")
          )
        (insert (format "--<<%s>>-{\n" type))
        (goto-char (point-max))
-       (setq f (bolp))
-       (if (not f)
-           (insert (format "\n--}-<<%s>>" type))
-         (insert (format "--}-<<%s>>\n" type))
-         )
+       (insert (format "\n--}-<<%s>>\n" type))
        (goto-char (point-max))
        )
-      (if (not (eobp))
-         (progn
-           (if (not f)
-               (if (not (eolp))
-                   (insert "\n")
-                 (forward-char)
-                 )
-             )
-           (if (not (looking-at mime-editor/single-part-tag-regexp))
-               (insert (mime-make-text-tag) "\n")
-             )
-           )
-       (if (not f)
-           (insert "\n")
-         ))
+      (if (not (looking-at mime-editor/single-part-tag-regexp))
+         (insert (mime-make-text-tag) "\n")
+       )
       )))
 
 (defun mime-editor/enclose-mixed-region (beg end)
index 6558311..79e75f6 100644 (file)
@@ -5,7 +5,7 @@
 ;;;
 ;;; based on tm-latex.el by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
 ;;;
-;;; $Id: tm-html.el,v 7.1 1995/11/16 15:43:34 morioka Exp $
+;;; $Id: tm-html.el,v 7.2 1995/11/17 13:11:36 morioka Exp $
 ;;;
 
 (require 'tm-view)
@@ -17,6 +17,9 @@
                   (cdr (assoc "x-name" cal))
                   (concat (make-temp-name "tm") ".html")))
         (encoding (cdr (assoc "encoding" cal)))
+        ;; modified by Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
+        ;;     1995/11/17 (cf. [tm-ja:1117])
+         (html-helper-build-new-buffer nil)
         )
     (switch-to-buffer mime::article/preview-buffer)
     (funcall mime/find-file-function (expand-file-name name mime/tmp-dir))
index 223abcf..10eba2e 100644 (file)
--- a/tm-vm.el
+++ b/tm-vm.el
@@ -8,8 +8,7 @@
 ;;;           MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;;           Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
 ;;;           Oscar Figueiredo <figueire@lspsun2.epfl.ch>
-;;; modified by SHIONO Jun'ichi <jun@p5.nm.fujitsu.co.jp>,
-;;;         and Steinar Bang <steinarb@falch.no>,
+;;; modified by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
 ;;;
 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
 ;;;
@@ -22,7 +21,7 @@
 (require 'vm)
 
 (defconst tm-vm/RCS-ID
-  "$Id: tm-vm.el,v 7.10 1995/11/16 17:07:02 morioka Exp $")
+  "$Id: tm-vm.el,v 7.18 1995/11/20 02:48:34 morioka Exp $")
 (defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
 
 (define-key vm-mode-map "Z" 'tm-vm/view-message)
@@ -41,9 +40,6 @@ If you use tiny-mime patch for VM (by RIKITAKE Kenji
 (or tm-vm/use-tm-patch
     (progn
 ;;;
-;; by Steinar Bang <steinarb@falch.no>
-(setq vm-summary-format "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c, %I\"%UA\"\n")
-
 (defvar tm-vm/chop-full-name-function 'tm-vm/default-chop-full-name)
 (setq vm-chop-full-name-function tm-vm/chop-full-name-function)
 
@@ -56,9 +52,12 @@ If you use tiny-mime patch for VM (by RIKITAKE Kenji
              (cdr ret))
       ret)))
 
-;; by Steinar Bang <steinarb@falch.no>
-(defun vm-summary-function-A (m)
-  (mime-eword/decode-string (vm-su-subject m))
+(require 'vm-summary)
+(or (fboundp 'tm:vm-su-subject)
+    (fset 'tm:vm-su-subject (symbol-function 'vm-su-subject))
+    )
+(defun vm-su-subject (m)
+  (mime-eword/decode-string (tm:vm-su-subject m))
   )
 ;;;
 ))
@@ -123,14 +122,16 @@ all marked messages are affected, other messages are ignored."
 
 (defun tm-vm/preview-current-message ()
   ;;; suggested by Simon Rowe <smr@robots.oxford.ac.uk>
-  ;;;  (c.f. [tm-eng:163])
+  ;;;  (cf. [tm-eng:163])
   ;; Selecting a new mail message, but we're already displaying a mime
   ;; on in the window, make sure that the mail buffer is displayed.
   (if (get-buffer-window "*MIME-out*")
       (delete-window (get-buffer-window (get-buffer "*MIME-out*")))
     )
-  (display-buffer (current-buffer))
   (if (and tm-vm/automatic-mime-preview
+          ;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
+          ;;   1995/11/17 (cf.[tm-ja:1120])
+          (display-buffer (current-buffer))
           (let* ((mp (car vm-message-pointer))
                  (ct  (vm-get-header-contents mp "Content-Type:"))
                  (cte (vm-get-header-contents
@@ -145,23 +146,55 @@ all marked messages are affected, other messages are ignored."
                            ))))
           )
       (let ((win (selected-window)))
+       (let ((pwin (and mime::article/preview-buffer
+                        (get-buffer mime::article/preview-buffer)
+                        (get-buffer-window mime::article/preview-buffer))))
+         (if pwin
+             (delete-window pwin)
+           ))
+       (vm-select-folder-buffer)
        (vm-display (current-buffer) t
                    '(tm-vm/preview-current-message
                      vm-preview-current-message)
-                   '(tm-vm/preview-current-message reading-message))
+                   (list this-command 'reading-message))
        (mime/viewer-mode)
+       (run-hooks 'tm-vm/vm-select-message-hook)
+       (vm-display (current-buffer) t
+                   '(tm-vm/preview-current-message
+                     vm-preview-current-message)
+                   (list this-command 'reading-message))
        (select-window win)
-       )))
+       (vm-display-buffer (current-buffer))
+        ;; (vm-display (current-buffer) t
+        ;;             '(tm-vm/preview-current-message
+        ;;               vm-preview-current-message)
+        ;;             '(vm-summarize reading-message))
+       )
+    ;; fixed by Oscar Figueiredo <figueire@lspsun2.epfl.ch>
+    ;; 1995/11/17
+    (if (and mime::article/preview-buffer
+            (get-buffer mime::article/preview-buffer))
+       (kill-buffer mime::article/preview-buffer))
+    (if tm-vm/automatic-mime-preview
+       (let (buffer-read-only)
+         (mime/decode-message-header)
+         (run-hooks 'tm-vm/vm-select-message-hook)
+         ))
+    ))
 
 (add-hook 'vm-select-message-hook 'tm-vm/preview-current-message)
 (add-hook 'vm-visit-folder-hook 'tm-vm/preview-current-message)
 
 ;; fixed by Oscar Figueiredo <figueire@lspsun2.epfl.ch>
-;;     1995/11/14 (c.f. [tm-eng:162])
+;;     1995/11/14 (cf.[tm-eng:162])
 (defun tm-vm/scroll-forward ()
   (interactive)
   (if (not tm-vm/automatic-mime-preview)
-      (vm-scroll-forward)
+      ;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
+      ;;       1995/11/17 (cf.[tm-ja:1119])
+      (progn
+       (setq this-command 'vm-scroll-forward)
+       (vm-scroll-forward))
     (let* ((summary-buffer (or vm-summary-buffer
                               (and (eq major-mode 'vm-summary-mode)
                                    (current-buffer))))
@@ -170,10 +203,11 @@ all marked messages are affected, other messages are ignored."
                          (set-buffer summary-buffer)
                          vm-mail-buffer))
           (mail-win (get-buffer-window mail-buffer))
-          (preview-win (get-buffer-window
-                        (save-excursion
-                          (set-buffer mail-buffer)
-                          mime::article/preview-buffer))))                     
+          (preview-buf (save-excursion
+                         (set-buffer mail-buffer)
+                         mime::article/preview-buffer))
+          (preview-win (and preview-buf (get-buffer-window preview-buf)))
+          )
       (if preview-win
          (progn
            (select-window preview-win)
@@ -185,11 +219,18 @@ all marked messages are affected, other messages are ignored."
              (scroll-up)       
              (switch-to-buffer mail-buffer)
              (select-window summary-win))))
+      ;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
+      ;;       1995/11/17 (cf.[tm-ja:1119])
+      (setq this-command 'vm-scroll-forward)
       (vm-scroll-forward)
       (save-excursion
        (set-buffer summary-buffer)
        (setq mail-win (get-buffer-window vm-mail-buffer)))
-      (if mail-win
+      ;; fixed by Oscar Figueiredo <figueire@lspsun2.epfl.ch>
+      ;;       1995/11/17
+      (if (and mail-win
+              mime::article/preview-buffer
+              (get-buffer mime::article/preview-buffer))
          (progn
            (select-window mail-win)
            (switch-to-buffer mime::article/preview-buffer)
@@ -199,7 +240,11 @@ all marked messages are affected, other messages are ignored."
 (defun tm-vm/scroll-backward ()
   (interactive)
   (if (not tm-vm/automatic-mime-preview)
-      (vm-scroll-backward nil)
+      ;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
+      ;;       1995/11/17 (cf.[tm-ja:1119])
+      (progn
+       (setq this-command 'vm-scroll-backward)
+       (vm-scroll-backward nil))
     (let* ((summary-buffer (or vm-summary-buffer
                               (and (eq major-mode 'vm-summary-mode)
                                    (current-buffer))))
@@ -208,10 +253,11 @@ all marked messages are affected, other messages are ignored."
                          (set-buffer summary-buffer)
                          vm-mail-buffer))
           (mail-win (get-buffer-window mail-buffer))
-          (preview-win (get-buffer-window
-                        (save-excursion
-                          (set-buffer mail-buffer)
-                          mime::article/preview-buffer))))                     
+          (preview-buf (save-excursion
+                         (set-buffer mail-buffer)
+                         mime::article/preview-buffer))
+          (preview-win (and preview-buf (get-buffer-window preview-buf)))
+          )
       (if preview-win
          (progn
            (select-window preview-win)
@@ -223,13 +269,19 @@ all marked messages are affected, other messages are ignored."
              (scroll-down)             
              (switch-to-buffer mail-buffer)
              (select-window summary-win))))
+      ;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
+      ;;       1995/11/17 (cf.[tm-ja:1119])
+      (setq this-command 'vm-scroll-backward)
       (vm-scroll-backward nil)
       (save-excursion
        (set-buffer summary-buffer)
        (setq mail-win (get-buffer-window vm-mail-buffer)))
-      (if mail-win
+      (if (and mail-win
+              mime::article/preview-buffer
+              (get-buffer mime::article/preview-buffer))
          (progn
            (select-window mail-win)
+           (goto-char (point-max))
            (switch-to-buffer mime::article/preview-buffer)
            (select-window summary-win)))
       )))
@@ -259,7 +311,7 @@ all marked messages are affected, other messages are ignored."
     ))
 
 ;; fixed by Oscar Figueiredo <figueire@lspsun2.epfl.ch>
-;;     1995/11/14 (c.f. [tm-eng:162])
+;;     1995/11/14 (cf. [tm-eng:162])
 (defun tm-vm/quit ()
   (interactive)
   (save-excursion
@@ -383,7 +435,7 @@ This function is called by `mime-viewer/quit' command via
 ;;;
 
 ;; 1995/11/9 by Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
-;;     (c.f. [tm ML:1075])
+;;     (cf. [tm ML:1075])
 (defun tm-vm/insert-message (&optional message)
   (interactive)
   (let* (mail-yank-hooks
@@ -535,13 +587,55 @@ only marked messages will be put into the digest."
  'mime-setup
  (function
   (lambda ()
-    (remove-hook 'mail-mode-hook 'mime/editor-mode)
-    (add-hook 'vm-mail-mode-hook 'mime/editor-mode)
+    ;;(remove-hook 'mail-mode-hook 'mime/editor-mode)
+    ;;(add-hook 'vm-mail-mode-hook 'mime/editor-mode)
     (setq vm-forwarding-digest-type "rfc1521")
     (setq vm-digest-send-type "rfc1521")
     )))
 
 
+;;; @ for BBDB
+;;;
+
+(call-after-loaded
+ 'bbdb-vm
+ (function
+  (lambda ()
+    (or (fboundp 'tm:bbdb/vm-update-record)
+       (fset 'tm:bbdb/vm-update-record
+             (symbol-function 'bbdb/vm-update-record))
+       )
+    (defun bbdb/vm-update-record (&optional offer-to-create)
+      (vm-select-folder-buffer)
+      (let ((vm-mail-buffer
+            (if (and mime::article/preview-buffer
+                     (get-buffer mime::article/preview-buffer))
+                mime::article/preview-buffer
+              (current-buffer)
+              ))
+           (bbdb/vm-update-record-recursive
+            (boundp 'bbdb/vm-update-record-recursive))
+           bbdb/vm-update-record-recursive ret)
+       (let ((bbdb/vm-update-record-answer
+              (if (boundp 'bbdb/vm-update-record-answer)
+                  (setq bbdb/vm-update-record-answer
+                        (or bbdb/vm-update-record-answer
+                            (tm:bbdb/vm-update-record)
+                            ))
+                (setq ret (tm:bbdb/vm-update-record))
+                nil)))
+         (or bbdb/vm-update-record-answer ret)
+         )))
+    (defun tm-vm/bbdb-update-record (&optional offer-to-create)
+      (let ((vm-mail-buffer (current-buffer)))
+       (tm:bbdb/vm-update-record offer-to-create)
+       ))
+    (remove-hook 'vm-select-message-hook 'bbdb/vm-update-record)
+    (remove-hook 'vm-show-message-hook 'bbdb/vm-update-record)
+    (add-hook 'tm-vm/select-message-hook 'tm-vm/update-record)
+    )))
+
+
 ;;; @ end
 ;;;