tm 7.28.
[elisp/tm.git] / tm-mail.el
1 ;;;
2 ;;; tm-mail.el --- mail-mode extension.
3 ;;;
4 ;;; Copyright (C) 1995 KOBAYASHI Shuhei
5 ;;; 
6 ;;; Author: KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>
7 ;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
9 ;;; Created: 1995/11/27
10 ;;; Version: $Id: tm-mail.el,v 1.1 1995/12/03 13:40:45 morioka Exp $
11 ;;; Keywords: mail, MIME, multimedia
12 ;;;
13 ;;; This file is part of tm (Tools for MIME).
14 ;;;
15 ;;; This program is free software; you can redistribute it and/or
16 ;;; modify it under the terms of the GNU General Public License as
17 ;;; published by the Free Software Foundation; either version 2, or
18 ;;; (at your option) any later version.
19 ;;;
20 ;;; This program is distributed in the hope that it will be useful,
21 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23 ;;; General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with This program.  If not, write to the Free Software
27 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
28
29 (defun tm-mail/insert-message (&optional message)
30   (interactive)
31   (let* (mail-yank-hooks
32          (mail-citation-hook '(mime-editor/inserted-message-filter))
33          )
34     (cond
35      ((and (boundp 'vm-mail-buffer) vm-mail-buffer)
36       ;; called from VM.
37       (let ((mail-reply-buffer vm-mail-buffer))
38         (if (null message)
39             (call-interactively 'vm-yank-message)
40           (vm-yank-message message)))
41       )
42      ((boundp 'rmail-send-actions-rmail-buffer)
43       ;; called from RMAIL, emacs-19.29 or later.
44       (mail-yank-original nil)
45       )
46      ((and (boundp 'gnus-article-buffer) (get-buffer gnus-article-buffer))
47       ;; maybe called from Gnus.
48       (tm-gnus/insert-article)
49       )
50      ((and (boundp 'mail-reply-buffer) mail-reply-buffer)
51       ;; maybe called from RMAIL.
52       (mail-yank-original nil)
53       )
54      (t
55       (message "Sorry, I don't have message inserter for your MUA.")
56       ))
57     ))
58
59
60 ;;; @ end
61 ;;;
62
63 (provide 'tm-mail)