2 ;;; tm-mail.el --- mail-mode extension.
4 ;;; Copyright (C) 1995 KOBAYASHI Shuhei
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
13 ;;; This file is part of tm (Tools for MIME).
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.
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.
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.
29 (defun tm-mail/insert-message (&optional message)
31 (let* (mail-yank-hooks
32 (mail-citation-hook '(mime-editor/inserted-message-filter))
35 ((and (boundp 'vm-mail-buffer) vm-mail-buffer)
37 (let ((mail-reply-buffer vm-mail-buffer))
39 (call-interactively 'vm-yank-message)
40 (vm-yank-message message)))
42 ((boundp 'rmail-send-actions-rmail-buffer)
43 ;; called from RMAIL, emacs-19.29 or later.
44 (mail-yank-original nil)
46 ((and (boundp 'gnus-article-buffer) (get-buffer gnus-article-buffer))
47 ;; maybe called from Gnus.
48 (tm-gnus/insert-article)
50 ((and (boundp 'mail-reply-buffer) mail-reply-buffer)
51 ;; maybe called from RMAIL.
52 (mail-yank-original nil)
55 (message "Sorry, I don't have message inserter for your MUA.")