From: morioka Date: Mon, 9 Mar 1998 20:07:41 +0000 (+0000) Subject: tm 7.80. X-Git-Tag: tm7_80~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1f12c89ac3491cdbbba0e24173e9b31f79ba73a;p=elisp%2Ftm.git tm 7.80. --- diff --git a/ChangeLog b/ChangeLog index 826c634..3aa37e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,165 @@ +Sat Aug 31 14:39:06 1996 MORIOKA Tomohiko + + * tl: Version 7.61 was released. + * tm: Version 7.80 was released. + * tm/mh-e: Version 7.68 was released. + + * tm-setup.el: Use tm-pgp if mailcrypt is installed. + +Fri Aug 30 17:09:46 1996 MORIOKA Tomohiko + + * tm-bbdb.el (signature/get-sigtype-from-bbdb): + Use function `std11-field-body' + instead of `rfc822/get-field-body'. + +Fri Aug 30 17:08:17 1996 MORIOKA Tomohiko + + * tm-bbdb.el (tm-bbdb/update-record): Use function + `std11-field-body' instead of `rfc822/get-field-body'. + + * tm-view.el (mime-viewer/follow-content): Use function + `std11-collect-field-names' instead of `rfc822/get-field-names'. + +Fri Aug 30 16:44:52 1996 MORIOKA Tomohiko + + * tm-view.el (mime-viewer/follow-content): Use function + `std11-header-string-except' instead of + `rfc822/get-header-string-except'. + +Fri Aug 30 16:42:15 1996 MORIOKA Tomohiko + + * tm-play.el (mime-article/decode-content): Use "text/plain" as + default content-type. + +Fri Aug 30 16:04:21 1996 MORIOKA Tomohiko + + * tm-play.el (mime-article/decode-content): Use function `list*'. + + * tm-play.el (mime-article/decode-content): Use function `assq' + instead of `assoc'. + + * tm-view.el (mime-article/get-subject): Use function + `std11-find-field-body'. + +Fri Aug 30 15:55:47 1996 MORIOKA Tomohiko + + * tm-play.el (mime-article/decode-content): allow null + content-type. + (mime-article/get-original-filename): fixed argument of function + `std11-find-field-body'. + + * tm-view.el (mime-viewer/x-face-function): Use function + `std11-field-end' instead of `rfc822/field-end'. + + * tm-play.el (mime-article/get-original-filename): Use function + `std11-find-field-body'. + + * tm-play.el (mime-article/get-original-filename): Use function + `std11-field-body' instead of `rfc822/get-field-body'. + + * tm-edit.el (mime-editor/normalize-body): fixed problem of single + part. + +Fri Aug 30 06:20:52 1996 MORIOKA Tomohiko + + * tm-parse.el (mime/Content-Type, mime/Content-Transfer-Encoding, + mime/Content-Disposition): Use function `std11-field-body' instead + of `rfc822/get-field-body'. + + * tm-parse.el (mime/parse-Content-Type, + mime/parse-Content-Disposition): Use function + `std11-unfold-string' instead of `rfc822/unfolding-string'. + + * tm-vm.el (tm-vm/do-reply): Use function `std11-full-name-string' + instead of `rfc822/full-name-string'. + + * tm-vm.el (tm-vm/do-reply): Use function + `std11-parse-address-string'. + + * tm-vm.el (tm-vm/do-reply): Use function `std11-field-bodies' + instead of `rfc822/get-field-bodies'. + + * tm-evs.el (mime-viewer/questionnaire-select): Use function + `std11-field-body' instead of `rfc822/get-field-body'. + + * tm-vm.el (tm-vm/do-reply): Use function `std11-field-body' + instead of `rfc822/get-field-body'. + +Fri Aug 30 04:34:56 1996 MORIOKA Tomohiko + + * signature.el (signature/get-signature-file-name): Use function + `std11-field-body' instead of `rfc822/get-field-body'. + +Fri Aug 30 04:27:52 1996 MORIOKA Tomohiko + + * tm-ew-e.el (mime/exist-encoded-word-in-subject): Use function + `std11-field-body' instead of `rfc822/get-field-body'. + + * tm-partial.el (mime-article/grab-message/partials): Use function + `std11-field-body' instead of `rfc822/get-field-body'. + +Wed Aug 28 22:49:15 1996 MORIOKA Tomohiko + + * tm-ew-e.el (mime/encode-message-header): Use function + `std11-field-end' instead of `rfc822/field-end'. + + * tm-ew-e.el (mime/encode-field, mime/encode-message-header): Use + function `std11-unfold-string' instead of + `rfc822/unfolding-string'. + + * tm-ew-e.el (tm-eword::encode-address-list): Use function + `std11-parse-addresses-string'. + + * tm-ew-e.el (tm-eword::phrase-route-addr-to-rwl, + tm-eword::addr-spec-to-rwl): Use `std11-addr-to-string' instead of + `rfc822/addr-to-string'. + +Wed Aug 28 18:43:29 1996 MORIOKA Tomohiko + + * tm-image.el: add `(autoload 'highlight-headers + "highlight-headers")' for XEmacs. + +Wed Aug 28 18:38:14 1996 MORIOKA Tomohiko + + * tm-image.el: Variable `mime-viewer/use-highlight-headers' was + abolished. + Function `mime-preview/x-face-function-for-xemacs' was abolished. + +Wed Aug 28 15:42:49 1996 MORIOKA Tomohiko + + * tm-ew-d.el (mime-eword/decode-string, mime/decode-encoded-text): + Use function `std11-unfold-string' instead of + `rfc822/unfolding-string'. + +Wed Aug 28 14:16:27 1996 MORIOKA Tomohiko + + * tm-ew-e.el (mime/encode-message-header): Use function + `std11-narrow-to-header'. + + * tm-ew-e.el (mime/encode-message-header): Variable + `rfc822/field-top-regexp' was renamed to + `std11-field-head-regexp'. + +Wed Aug 28 14:06:22 1996 MORIOKA Tomohiko + + * tm-ew-e.el (mime/encode-field): Variable + `rfc822/field-top-regexp' was renamed to + `std11-field-head-regexp'. + + * tm-ew-d.el (mime/unfolding): Use function `std11-field-end' + instead of `rfc822/field-end'. + + * tm-ew-d.el (mime/unfolding): Variable `rfc822/field-top-regexp' + was renamed to `std11-field-head-regexp'. + +Tue Aug 26 15:02:23 1996 Oscar Figueiredo + + * tm-vm.el (tm-vm/yank:message-to-restore): New variable. + (vm-yank-message): respect to the (setq frame-per-composition nil) + setting. + (cf. [tm-en:713]): + + Fri Aug 23 07:41:35 1996 MORIOKA Tomohiko * tl: Version 7.48 was released. diff --git a/Makefile b/Makefile index 2eb97f0..e857854 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/TL-ELS \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.79.tar.gz +TARFILE = tm7.80.tar.gz elc: $(EMACS) $(FLAGS) -l inst-tm -f compile-tm diff --git a/mh-e/ChangeLog b/mh-e/ChangeLog index 1ee40de..d6fafc4 100644 --- a/mh-e/ChangeLog +++ b/mh-e/ChangeLog @@ -1,3 +1,11 @@ +Sat Aug 31 15:15:12 1996 MORIOKA Tomohiko + + * tm/mh-e: Version 7.68 was released. + + * tm-mh-e.el (tm-mh-e/following-method): Use function + `std11-field-bodies' instead of `rfc822/get-field-bodies'. + + Fri Aug 23 07:33:58 1996 MORIOKA Tomohiko * tm/mh-e: Version 7.67 was released. diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index 17a8569..c3f2b14 100644 --- a/mh-e/tm-mh-e.el +++ b/mh-e/tm-mh-e.el @@ -6,7 +6,7 @@ ;; OKABE Yasuo ;; Maintainer: MORIOKA Tomohiko ;; Created: 1993/11/21 (obsolete mh-e-mime.el) -;; Version: $Revision: 7.67 $ +;; Version: $Revision: 7.68 $ ;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual ;; This file is part of tm (Tools for MIME). @@ -22,8 +22,9 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with This program. If not, write to the Free Software -;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with This program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. ;;; Code: @@ -47,7 +48,7 @@ ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 7.67 1996/08/14 02:35:19 morioka Exp $") + "$Id: tm-mh-e.el,v 7.68 1996/08/31 15:15:12 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -297,7 +298,7 @@ digest are inserted into the folder after that message." (goto-char (point-max)) (setq mh-show-buffer buf) (apply (function mh-send) - (rfc822/get-field-bodies '("To" "cc" "Subject") "")) + (std11-field-bodies '("To" "cc" "Subject") "")) (setq mh-sent-from-folder buf) (setq mh-sent-from-msg 1) (let ((last (point))) diff --git a/signature.el b/signature.el index a3850a7..b111892 100644 --- a/signature.el +++ b/signature.el @@ -1,41 +1,38 @@ -;;; ;;; signature.el --- a signature utility for GNU Emacs -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; Copyright (C) 1994 OKABE Yasuo -;;; Copyright (C) 1996 Artur Pioro -;;; Copyright (C) 1996 KOBAYASHI Shuhei -;;; -;;; Author: MORIOKA Tomohiko -;;; OKABE Yasuo -;;; Artur Pioro -;;; KOBAYASHI Shuhei -;;; Maintainer: KOBAYASHI Shuhei -;;; Created: 1994/7/11 -;;; Version: -;;; $Id: signature.el,v 7.11 1996/07/10 13:45:06 shuhei-k Exp $ -;;; Keywords: mail, news, signature -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; + +;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; OKABE Yasuo +;; Artur Pioro +;; KOBAYASHI Shuhei +;; Maintainer: Shuhei KOBAYASHI +;; Created: 1994/7/11 +;; Version: +;; $Id: signature.el,v 7.13 1996/08/30 04:34:56 morioka Exp $ +;; Keywords: mail, news, signature + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: -(require 'tl-822) +(require 'std11) + ;;; @ valiables ;;; @@ -98,7 +95,7 @@ of file.") (let ((alist signature-file-alist) cell field value) (while alist (setq cell (car alist) - field (rfc822/get-field-body (car (car cell))) + field (std11-field-body (car (car cell))) value (cdr (car cell))) (cond ((functionp value) (let ((name (apply value field (cdr cell)))) diff --git a/tm-bbdb.el b/tm-bbdb.el index 3f09432..1f337bd 100644 --- a/tm-bbdb.el +++ b/tm-bbdb.el @@ -6,7 +6,7 @@ ;; Author: KOBAYASHI Shuhei ;; Artur Pioro ;; Maintainer: Shuhei KOBAYASHI -;; Version: $Id: tm-bbdb.el,v 7.11 1996/08/22 14:10:20 morioka Exp $ +;; Version: $Id: tm-bbdb.el,v 7.13 1996/08/30 17:09:46 morioka Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB ;; This file is part of tm (Tools for MIME). @@ -128,14 +128,14 @@ 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")) + (let* ((from (std11-field-body "From")) (addr (if from (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))) + (setq from (or (std11-field-body "To") from)) + ) (if from (bbdb-annotate-message-sender from t @@ -230,7 +230,7 @@ displaying the record corresponding to the sender of the current message." ))) (defun signature/get-sigtype-from-bbdb (&optional verbose) - (let* ((to (rfc822/get-field-body "To")) + (let* ((to (std11-field-body "To")) (addr (and to (car (cdr (mail-extract-address-components to))))) (sigtype (signature/get-bbdb-sigtype addr)) diff --git a/tm-edit.el b/tm-edit.el index 2a14520..15b0e7c 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -6,7 +6,7 @@ ;; MORIOKA Tomohiko ;; Maintainer: MORIOKA Tomohiko ;; Created: 1994/08/21 renamed from mime.el -;; Version: $Revision: 7.79 $ +;; Version: $Revision: 7.80 $ ;; Keywords: mail, news, MIME, multimedia, multilingual ;; This file is part of tm (Tools for MIME). @@ -121,7 +121,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.79 1996/08/23 07:26:32 morioka Exp $") + "$Id: tm-edit.el,v 7.80 1996/08/30 15:16:52 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -1960,11 +1960,13 @@ Content-Transfer-Encoding: 7bit (let ((beg (point)) (end (mime-editor/content-end)) ) - (goto-char end) - (or (looking-at mime-editor/beginning-tag-regexp) - (eobp) - (insert (mime-make-text-tag) "\n") - ) + (if (= end (point-max)) + nil + (goto-char end) + (or (looking-at mime-editor/beginning-tag-regexp) + (eobp) + (insert (mime-make-text-tag) "\n") + )) (visible-region beg end) (goto-char beg) ) diff --git a/tm-ew-d.el b/tm-ew-d.el index 271180b..7632fa0 100644 --- a/tm-ew-d.el +++ b/tm-ew-d.el @@ -6,7 +6,7 @@ ;; MORIOKA Tomohiko ;; Maintainer: MORIOKA Tomohiko ;; Created: 1993/6/3 (1995/10/3 obsolete tiny-mime.el) -;; Version: $Revision: 7.21 $ +;; Version: $Revision: 7.24 $ ;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word ;; This file is part of tm (Tools for MIME). @@ -29,7 +29,7 @@ ;;; Code: (require 'emu) -(require 'tl-822) +(require 'std11) (require 'mel) (require 'tm-def) @@ -38,7 +38,7 @@ ;;; (defconst tm-ew-d/RCS-ID - "$Id: tm-ew-d.el,v 7.21 1996/08/17 02:41:20 morioka Exp $") + "$Id: tm-ew-d.el,v 7.24 1996/08/28 15:42:49 morioka Exp $") (defconst mime/eword-decoder-version (get-version-string tm-ew-d/RCS-ID)) @@ -63,7 +63,7 @@ ;;; (defun mime-eword/decode-string (str &optional unfolding) - (setq str (rfc822/unfolding-string str)) + (setq str (std11-unfold-string str)) (let ((dest "")(ew nil) beg end) (while (and (string-match mime/encoded-word-regexp str) @@ -138,9 +138,9 @@ If MUST-UNFOLD is not nil, it unfolds encoded results. [tm-ew-d.el]" (defun mime/unfolding () (goto-char (point-min)) (let (field beg end) - (while (re-search-forward rfc822/field-top-regexp nil t) - (setq beg (match-beginning 0)) - (setq end (rfc822/field-end)) + (while (re-search-forward std11-field-head-regexp nil t) + (setq beg (match-beginning 0) + end (std11-field-end)) (setq field (buffer-substring beg end)) (if (string-match mime/encoded-word-regexp field) (save-restriction @@ -190,7 +190,7 @@ If MUST-UNFOLD is not nil, it unfolds encoded results. [tm-ew-d.el]" (progn (setq dest (decode-coding-string dest cs)) (if unfolding - (rfc822/unfolding-string dest) + (std11-unfold-string dest) dest) )))))) diff --git a/tm-ew-e.el b/tm-ew-e.el index 1461b65..a08771e 100644 --- a/tm-ew-e.el +++ b/tm-ew-e.el @@ -1,34 +1,32 @@ -;;; -;;; tm-ew-e.el --- RFC 1522 based multilingual MIME message header -;;; encoder for GNU Emacs -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko -;;; Version: $Revision: 7.37 $ -;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; +;;; tm-ew-e.el --- RFC 1522 based MIME encoded-word encoder for GNU Emacs + +;; Copyright (C) 1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; Version: $Revision: 7.47 $ +;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: (require 'mel) -(require 'tl-822) +(require 'std11) (require 'tm-def) @@ -36,7 +34,7 @@ ;;; (defconst tm-ew-e/RCS-ID - "$Id: tm-ew-e.el,v 7.37 1996/07/10 12:52:46 morioka Exp $") + "$Id: tm-ew-e.el,v 7.47 1996/08/30 04:26:46 morioka Exp $") (defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID)) @@ -427,12 +425,12 @@ ) (append dest - (list (list (concat "<" (rfc822/addr-to-string route) ">") nil nil)) + (list (list (concat "<" (std11-addr-to-string route) ">") nil nil)) )))) (defun tm-eword::addr-spec-to-rwl (addr-spec) (if (eq (car addr-spec) 'addr-spec) - (list (list (rfc822/addr-to-string (cdr addr-spec)) nil nil)) + (list (list (std11-addr-to-string (cdr addr-spec)) nil nil)) )) (defun tm-eword::mailbox-to-rwl (mbox) @@ -467,24 +465,23 @@ (defun tm-eword::encode-address-list (column str) (tm-eword::encode-rwl column - (tm-eword::addresses-to-rwl - (rfc822/parse-addresses - (rfc822/lexical-analyze str))))) + (tm-eword::addresses-to-rwl (std11-parse-addresses-string str)) + )) ;;; @ application interfaces ;;; (defun mime/encode-field (str) - (setq str (rfc822/unfolding-string str)) - (let ((ret (string-match rfc822/field-top-regexp str))) + (setq str (std11-unfold-string str)) + (let ((ret (string-match std11-field-head-regexp str))) (or (if ret - (let ((field-name (substring str 0 (match-end 1))) + (let ((field-name (substring str 0 (1- (match-end 0)))) (field-body (eliminate-top-spaces (substring str (match-end 0)))) fname) (if (setq ret - (cond ((string= field-body "") "") + (cond ((string-equal field-body "") "") ((member (setq fname (downcase field-name)) '("reply-to" "from" "sender" "resent-reply-to" "resent-from" @@ -501,7 +498,7 @@ fn) (while r (setq fn (car r)) - (if (string= (downcase fn) fname) + (if (string-equal (downcase fn) fname) (throw 'tag field-body) ) (setq r (cdr r)) @@ -517,7 +514,7 @@ ))) (defun mime/exist-encoded-word-in-subject () - (let ((str (rfc822/get-field-body "Subject"))) + (let ((str (std11-field-body "Subject"))) (if (and str (string-match mime/encoded-word-regexp str)) str))) @@ -525,18 +522,12 @@ (interactive "*") (save-excursion (save-restriction - (narrow-to-region (goto-char (point-min)) - (if (re-search-forward - (concat - "^" (regexp-quote mail-header-separator) "$") - nil t) - (match-beginning 0) - (point-max))) + (std11-narrow-to-header mail-header-separator) (goto-char (point-min)) (let (beg end field) - (while (re-search-forward rfc822/field-top-regexp nil t) + (while (re-search-forward std11-field-head-regexp nil t) (setq beg (match-beginning 0)) - (setq end (rfc822/field-end)) + (setq end (std11-field-end)) (if (and (find-charset-region beg end) (setq field (mime/encode-field @@ -554,7 +545,7 @@ (insert (concat "\nX-Nsubject: " - (mime-eword/decode-string (rfc822/unfolding-string str)) + (mime-eword/decode-string (std11-unfold-string str)) ))))) ))) diff --git a/tm-image.el b/tm-image.el index ecc9fc7..84c109b 100644 --- a/tm-image.el +++ b/tm-image.el @@ -1,39 +1,37 @@ -;;; -;;; tm-image.el --- a tm-view content filter to display images in -;;; XEmacs or Mule buffers -;;; -;;; Copyright (C) 1995,1996 MORIOKA Tomohiko -;;; Copyright (C) 1996 Dan Rich -;;; -;;; Author: MORIOKA Tomohiko -;;; Dan Rich -;;; Maintainer: MORIOKA Tomohiko -;;; Created: 1995/12/15 -;;; Version: -;;; $Id: tm-image.el,v 7.12 1996/08/01 06:42:04 morioka Exp $ -;;; -;;; Keywords: mail, news, MIME, multimedia, image, picture -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; +;;; tm-image.el --- tm-view filter to display images in XEmacs or MULE buffers + +;; Copyright (C) 1995,1996 MORIOKA Tomohiko +;; Copyright (C) 1996 Dan Rich + +;; Author: MORIOKA Tomohiko +;; Dan Rich +;; Maintainer: MORIOKA Tomohiko +;; Created: 1995/12/15 +;; Version: $Id: tm-image.el,v 7.14 1996/08/28 18:43:29 morioka Exp $ + +;; Keywords: mail, news, MIME, multimedia, image, picture, X-Face + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Commentary: -;;; If you use this program with Mule, please install -;;; etl8x16-bitmap.bdf font included in tl package. -;;; +;; If you use this program with MULE, please install +;; etl8x16-bitmap.bdf font included in tl package. + ;;; Code: (require 'tm-view) @@ -101,17 +99,14 @@ ("image/x-xpixmap" . xpm) )) - (defvar mime-viewer/use-highlight-headers t) - (defvar mime-preview/x-face-function - (if (and mime-viewer/use-highlight-headers - (progn - (require 'highlight-headers) - highlight-headers-hack-x-face-p - )) - (function mime-preview/x-face-function-use-highlight-headers) - (function mime-preview/x-face-function-for-xemacs) - )) + (function mime-preview/x-face-function-use-highlight-headers)) + + (autoload 'highlight-headers "highlight-headers") + + (defun mime-preview/x-face-function-use-highlight-headers () + (highlight-headers (point-min) (re-search-forward "^$" nil t) t) + ) ) ((boundp 'MULE) (require 'x-face-mule) @@ -148,34 +143,6 @@ mime-preview/x-face-function) ) -(defun mime-preview/x-face-function-use-highlight-headers () - (highlight-headers (point-min) (re-search-forward "^$" nil t) t) - ) - -(defun mime-preview/x-face-function-for-xemacs () - (save-restriction - (narrow-to-region (point-min) (re-search-forward "^$" nil t)) - (goto-char (point-min)) - (if (re-search-forward "^X-Face:[ \t]*" nil t) - (let ((beg (match-end 0)) - (end (rfc822/field-end)) - (xbm-file - (make-temp-name (expand-file-name "tmxf" mime/tmp-dir)) - )) - (call-process-region - beg end "sh" nil 0 nil - "-c" - (format "%s > %s" - mime-viewer/x-face-to-xbm-command - xbm-file)) - (while (not (file-exists-p xbm-file))) - (delete-region beg end) - (bitmap-insert-xbm-file xbm-file) - (condition-case nil - (delete-file xbm-file) - (error nil)) - )))) - ;;; @ content filter for images ;;; diff --git a/tm-parse.el b/tm-parse.el index 0598d57..0503a97 100644 --- a/tm-parse.el +++ b/tm-parse.el @@ -1,30 +1,29 @@ -;;; ;;; tm-parse.el --- MIME message parser -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko -;;; Version: -;;; $Id: tm-parse.el,v 7.9 1996/06/06 07:24:30 morioka Exp $ -;;; Keywords: mail, news, MIME, multimedia -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; + +;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; Version: +;; $Id: tm-parse.el,v 7.11 1996/08/30 06:20:52 morioka Exp $ +;; Keywords: mail, news, MIME, multimedia + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: (require 'tl-822) @@ -52,34 +51,34 @@ (defconst mime::ctype-regexp (concat "^" mime/content-type-subtype-regexp)) -(defun mime/parse-Content-Type (str) - "Parse STR as field-body of Content-Type field. [tm-parse.el]" - (setq str (rfc822/unfolding-string str)) - (if (string-match mime::ctype-regexp str) +(defun mime/parse-Content-Type (string) + "Parse STRING as field-body of Content-Type field. [tm-parse.el]" + (setq string (std11-unfold-string string)) + (if (string-match mime::ctype-regexp string) (let* ((e (match-end 0)) - (ctype (downcase (substring str 0 e))) + (ctype (downcase (substring string 0 e))) ret dest) - (setq str (substring str e)) - (while (setq ret (mime/parse-parameter str)) + (setq string (substring string e)) + (while (setq ret (mime/parse-parameter string)) (setq dest (cons (car ret) dest) - str (cdr ret)) + string (cdr ret)) ) (cons ctype (nreverse dest)) ))) (defconst mime::dtype-regexp (concat "^" mime/disposition-type-regexp)) -(defun mime/parse-Content-Disposition (str) - "Parse STR as field-body of Content-Disposition field. [tm-parse.el]" - (setq str (rfc822/unfolding-string str)) - (if (string-match mime::dtype-regexp str) +(defun mime/parse-Content-Disposition (string) + "Parse STRING as field-body of Content-Disposition field. [tm-parse.el]" + (setq string (std11-unfold-string string)) + (if (string-match mime::dtype-regexp string) (let* ((e (match-end 0)) - (ctype (downcase (substring str 0 e))) + (ctype (downcase (substring string 0 e))) ret dest) - (setq str (substring str e)) - (while (setq ret (mime/parse-parameter str)) + (setq string (substring string e)) + (while (setq ret (mime/parse-parameter string)) (setq dest (cons (car ret) dest) - str (cdr ret)) + string (cdr ret)) ) (cons ctype (nreverse dest)) ))) @@ -91,7 +90,7 @@ (defun mime/Content-Type () "Read field-body of Content-Type field from current-buffer, and return parsed it. [tm-parse.el]" - (let ((str (rfc822/get-field-body "Content-Type"))) + (let ((str (std11-field-body "Content-Type"))) (if str (mime/parse-Content-Type str) ))) @@ -100,7 +99,7 @@ and return parsed it. [tm-parse.el]" "Read field-body of Content-Transfer-Encoding field from current-buffer, and return it. If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" - (let ((str (rfc822/get-field-body "Content-Transfer-Encoding"))) + (let ((str (std11-field-body "Content-Transfer-Encoding"))) (if str (progn (if (string-match "[ \t\n\r]+$" str) @@ -114,7 +113,7 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" (defun mime/Content-Disposition () "Read field-body of Content-Disposition field from current-buffer, and return parsed it. [tm-parse.el]" - (let ((str (rfc822/get-field-body "Content-Disposition"))) + (let ((str (std11-field-body "Content-Disposition"))) (if str (mime/parse-Content-Disposition str) ))) diff --git a/tm-partial.el b/tm-partial.el index e2f7dd1..7ef93a5 100644 --- a/tm-partial.el +++ b/tm-partial.el @@ -1,18 +1,31 @@ -;;; ;;; tm-partial.el --- Grabbing all MIME "message/partial"s. -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 OKABE Yasuo -;;; Copyright (C) 1995 MORIOKA Tomohiko -;;; -;;; Author: OKABE Yasuo @ Kyoto University -;;; MORIOKA Tomohiko -;;; Version: -;;; $Id: tm-partial.el,v 7.11 1995/11/16 15:51:10 morioka Exp $ -;;; Keywords: mail, news, MIME, multimedia, message/partial -;;; -;;; This file is a part of tm (Tools for MIME). -;;; + +;; Copyright (C) 1995,1996 Free Software Foundation, Inc. + +;; Author: OKABE Yasuo @ Kyoto University +;; MORIOKA Tomohiko +;; Version: +;; $Id: tm-partial.el,v 7.13 1996/08/30 04:27:52 morioka Exp $ +;; Keywords: mail, news, MIME, multimedia, message/partial + +;; This file is a part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Code: (require 'tm-view) (require 'tm-play) @@ -55,7 +68,7 @@ (mime-article/decode-message/partial beg end cal) ) (let (cinfo the-id parameters) - (setq subject-id (rfc822/get-field-body "Subject")) + (setq subject-id (std11-field-body "Subject")) (if (string-match "[0-9\n]+" subject-id) (setq subject-id (substring subject-id 0 (match-beginning 0))) ) @@ -97,3 +110,5 @@ (provide 'tm-partial) (run-hooks 'tm-partial-load-hook) + +;;; tm-partial.el ends here diff --git a/tm-play.el b/tm-play.el index 7d0e768..7e28154 100644 --- a/tm-play.el +++ b/tm-play.el @@ -1,32 +1,29 @@ -;;; ;;; tm-play.el --- decoder for tm-view.el -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko -;;; Maintainer: MORIOKA Tomohiko -;;; Created: 1995/9/26 (separated from tm-view.el) -;;; Version: -;;; $Id: tm-play.el,v 7.20 1996/07/15 14:04:46 morioka Exp $ -;;; Keywords: mail, news, MIME, multimedia -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; + +;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; Created: 1995/9/26 (separated from tm-view.el) +;; Version: $Id: tm-play.el,v 7.26 1996/08/30 16:42:15 morioka Exp $ +;; Keywords: mail, news, MIME, multimedia + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: (require 'tm-view) @@ -59,11 +56,10 @@ )) )))) - (defun mime-article/decode-content (cinfo) (let ((beg (mime::content-info/point-min cinfo)) (end (mime::content-info/point-max cinfo)) - (ctype (mime::content-info/type cinfo)) + (ctype (or (mime::content-info/type cinfo) "text/plain")) (params (mime::content-info/parameters cinfo)) (encoding (mime::content-info/encoding cinfo)) ) @@ -74,32 +70,30 @@ (if (< (point-max) end) (setq end (point-max)) ) - (if ctype - (let (method cal ret) - (setq cal (append (list (cons 'type ctype) - (cons 'encoding encoding) - (cons 'major-mode major-mode) - ) - params)) - (if mime-viewer/decoding-mode - (setq cal (cons - (cons 'mode mime-viewer/decoding-mode) - cal)) - ) - (setq ret (mime/get-content-decoding-alist cal)) - (setq method (cdr (assoc 'method ret))) - (cond ((and (symbolp method) - (fboundp method)) - (funcall method beg end ret) - ) - ((and (listp method)(stringp (car method))) - (mime-article/start-external-method-region beg end ret) - ) - (t - (mime-article/show-output-buffer - "No method are specified for %s\n" ctype) - )) - )) + (let (method cal ret) + (setq cal (list* (cons 'type ctype) + (cons 'encoding encoding) + (cons 'major-mode major-mode) + params)) + (if mime-viewer/decoding-mode + (setq cal (cons + (cons 'mode mime-viewer/decoding-mode) + cal)) + ) + (setq ret (mime/get-content-decoding-alist cal)) + (setq method (cdr (assq 'method ret))) + (cond ((and (symbolp method) + (fboundp method)) + (funcall method beg end ret) + ) + ((and (listp method)(stringp (car method))) + (mime-article/start-external-method-region beg end ret) + ) + (t + (mime-article/show-output-buffer + "No method are specified for %s\n" ctype) + )) + ) )) (defun mime/get-content-decoding-alist (al) @@ -241,9 +235,8 @@ (rfc822/strip-quoted-string (cdr ret)) ) (if (setq ret - (or (rfc822/get-field-body "Content-Description") - (rfc822/get-field-body "Subject") - )) + (std11-find-field-body '("Content-Description" + "Subject"))) (if (or (string-match mime-viewer/file-name-regexp-1 ret) (string-match mime-viewer/file-name-regexp-2 ret)) (substring ret (match-beginning 0)(match-end 0)) diff --git a/tm-setup.el b/tm-setup.el index 913e5c4..f34590c 100644 --- a/tm-setup.el +++ b/tm-setup.el @@ -1,30 +1,28 @@ -;;; ;;; tm-setup.el --- setup file for tm viewer. -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko -;;; Version: -;;; $Id: tm-setup.el,v 7.6 1996/08/07 05:59:03 morioka Exp $ -;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; + +;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; Version: $Id: tm-setup.el,v 7.7 1996/08/31 14:39:06 morioka Exp $ +;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with This program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: (require 'tl-misc) @@ -47,12 +45,7 @@ (method . mime/decode-message/external-ftp) )) (autoload 'mime/decode-message/external-ftp "tm-ftp") - - ;; for image/* - (if running-xemacs - (require 'tm-image) - ) - + ;; for LaTeX (set-atype 'mime/content-decoding-condition '((type . "text/x-latex") @@ -70,6 +63,24 @@ (autoload 'mime/decode-text/latex "tm-latex") ))) +;; for image/* and X-Face +(if running-xemacs + (call-after-loaded 'tm-view + (function + (lambda () + (require 'tm-image) + ))) + ) + +;; for PGP +(if (module-installed-p 'mailcrypt) + (call-after-loaded 'tm-view + (function + (lambda () + (require 'tm-pgp) + ))) + ) + ;;; @ for RMAIL ;;; diff --git a/tm-view.el b/tm-view.el index dd54017..b66f13d 100644 --- a/tm-view.el +++ b/tm-view.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;; Version: $Revision: 7.69 $ +;; Version: $Revision: 7.73 $ ;; Keywords: mail, news, MIME, multimedia ;; This file is part of tm (Tools for MIME). @@ -42,7 +42,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.69 1996/08/16 05:03:42 morioka Exp $") + "$Id: tm-view.el,v 7.73 1996/08/30 16:57:53 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -372,7 +372,7 @@ The compressed face will be piped to this command.") (goto-char (point-min)) (if (re-search-forward "^X-Face:[ \t]*" nil t) (let ((beg (match-end 0)) - (end (rfc822/field-end)) + (end (std11-field-end)) ) (call-process-region beg end "sh" nil 0 nil "-c" mime-viewer/x-face-command) @@ -561,8 +561,7 @@ The compressed face will be piped to this command.") )) (defun mime-article/get-subject (param &optional encoding) - (or (rfc822/get-field-body "Content-Description") - (rfc822/get-field-body "Subject") + (or (std11-find-field-body '("Content-Description" "Subject")) (let (ret) (if (or (and (setq ret (mime/Content-Disposition)) (setq ret (assoc "filename" (cdr ret))) @@ -933,7 +932,7 @@ button-2 Move to point under the mouse cursor (mime::content-info/point-min ci) (mime::content-info/point-max ci) ) - (rfc822/get-header-string-except + (std11-header-string-except (concat "^" (apply (function regexp-or) fields) ":") "")))) @@ -944,7 +943,7 @@ button-2 Move to point under the mouse cursor (insert str) ) rcnum)) - (setq fields (rfc822/get-field-names) + (setq fields (std11-collect-field-names) rcnum (cdr rcnum)) ) ) diff --git a/tm-vm.el b/tm-vm.el index 6277609..962cc18 100644 --- a/tm-vm.el +++ b/tm-vm.el @@ -9,7 +9,7 @@ ;; Oscar Figueiredo ;; Maintainer: Shuhei KOBAYASHI ;; Created: 1994/10/29 -;; Version: $Revision: 7.57 $ +;; Version: $Revision: 7.62 $ ;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;; This file is part of tm (Tools for MIME). @@ -25,8 +25,9 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with This program. If not, write to the Free Software -;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. ;;; Commentary: @@ -38,7 +39,7 @@ (require 'vm) (defconst tm-vm/RCS-ID - "$Id: tm-vm.el,v 7.57 1996/08/13 13:12:50 morioka Exp $") + "$Id: tm-vm.el,v 7.62 1996/08/31 14:24:35 morioka Exp $") (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) (define-key vm-mode-map "Z" 'tm-vm/view-message) @@ -563,15 +564,18 @@ tm-vm uses `vm-select-message-hook', use this hook instead.") (require 'vm-reply) +(defvar tm-vm/yank:message-to-restore nil + "For internal use by tm-vm only.") + (defun vm-yank-message (&optional message) "Yank message number N into the current buffer at point. When called interactively N is always read from the minibuffer. When called non-interactively the first argument is expected to be a message struct. -This function originally provided by vm-reply has been patched for TM in -order to provide better citation of MIME messages : if a MIME Preview -buffer is displayed for the message then its contents are inserted +This function originally provided by vm-reply has been patched for TM +in order to provide better citation of MIME messages : if a MIME +Preview buffer exists for the message then its contents are inserted instead of the raw message. This command is meant to be used in VM created Mail mode buffers; the @@ -615,6 +619,9 @@ vm-included-text-prefix is prepended to every yanked line." (setq result (string-to-int result))) (if (null (setq mp (nthcdr (1- result) vm-message-list))) (error "No such message.")) + (setq tm-vm/yank:message-to-restore (string-to-int default)) + (save-selected-window + (vm-goto-message result)) (car mp)) nil)))) (if (null message) @@ -624,11 +631,8 @@ vm-included-text-prefix is prepended to every yanked line." (if (null (buffer-name vm-mail-buffer)) (error "The folder buffer containing message %d has been killed." (vm-number-of message))) - (save-window-excursion - (tm-vm/view-message)) (vm-display nil nil '(vm-yank-message) '(vm-yank-message composing-message)) - (setq message (vm-real-message-of message)) (let ((b (current-buffer)) (start (point)) end) (save-restriction (widen) @@ -636,11 +640,16 @@ vm-included-text-prefix is prepended to every yanked line." (set-buffer (vm-buffer-of message)) (let* ((mbuf (current-buffer)) (pbuf (and mime::article/preview-buffer - (get-buffer mime::article/preview-buffer))) - (pwin (and pbuf (save-window-excursion - (vm-get-visible-buffer-window - (switch-to-buffer-other-window pbuf)))))) - (if pwin + ; is there a preview buffer alive ? + (get-buffer mime::article/preview-buffer) + ; rebuild preview to ensure it + ; corresponds to the current message + (save-excursion + (save-selected-window + (save-window-excursion + (tm-vm/view-message)))) + (get-buffer mime::article/preview-buffer)))) + (if pbuf (if running-xemacs (let ((tmp (generate-new-buffer "tm-vm/tmp"))) (set-buffer pbuf) @@ -658,7 +667,9 @@ vm-included-text-prefix is prepended to every yanked line." (setq end (vm-marker (+ start (length (buffer-string))) b))) (save-restriction - (widen) + (setq message (vm-real-message-of message)) + (set-buffer (vm-buffer-of message)) + (widen) (append-to-buffer b (vm-headers-of message) (vm-text-end-of message)) (setq end @@ -669,6 +680,10 @@ vm-included-text-prefix is prepended to every yanked line." (mail-yank-hooks (run-hooks 'mail-yank-hooks)) (t (vm-mail-yank-default message))) )) + (if tm-vm/yank:message-to-restore + (save-selected-window + (vm-goto-message tm-vm/yank:message-to-restore) + (setq tm-vm/yank:message-to-restore nil))) )) @@ -682,18 +697,18 @@ vm-included-text-prefix is prepended to every yanked line." (let ((dir default-directory) to cc subject mp in-reply-to references newsgroups) (cond ((setq to - (let ((reply-to (rfc822/get-field-body "Reply-To"))) + (let ((reply-to (std11-field-body "Reply-To"))) (if (vm-ignored-reply-to reply-to) nil reply-to)))) - ((setq to (rfc822/get-field-body "From"))) + ((setq to (std11-field-body "From"))) ;; (t (error "No From: or Reply-To: header in message")) ) (if to-all - (setq cc (delq nil (cons cc (rfc822/get-field-bodies '("To" "Cc")))) + (setq cc (delq nil (cons cc (std11-field-bodies '("To" "Cc")))) cc (mapconcat 'identity cc ",")) ) - (setq subject (rfc822/get-field-body "Subject")) + (setq subject (std11-field-body "Subject")) (and subject vm-reply-subject-prefix (let ((case-fold-search t)) (not @@ -702,13 +717,13 @@ vm-included-text-prefix is prepended to every yanked line." subject) 0))) (setq subject (concat vm-reply-subject-prefix subject))) - (setq in-reply-to (rfc822/get-field-body "Message-Id") + (setq in-reply-to (std11-field-body "Message-Id") references (nconc - (rfc822/get-field-bodies '("References" "In-Reply-To")) + (std11-field-bodies '("References" "In-Reply-To")) (list in-reply-to)) newsgroups (list (or (and to-all - (rfc822/get-field-body "Followup-To")) - (rfc822/get-field-body "Newsgroups")))) + (std11-field-body "Followup-To")) + (std11-field-body "Newsgroups")))) (setq to (vm-parse-addresses to) cc (vm-parse-addresses cc)) (if vm-reply-ignored-addresses @@ -735,10 +750,9 @@ vm-included-text-prefix is prepended to every yanked line." (vm-mail-internal (if to (format "reply to %s%s" - (rfc822/full-name-string - (car (rfc822/parse-address - (rfc822/lexical-analyze to)))) - (if cc ", ..." ""))) + (std11-full-name-string + (car (std11-parse-address-string to))) + (if cc ", ..." ""))) to subject in-reply-to cc references newsgroups) (setq mail-reply-buffer buf ;; vm-system-state 'replying