2 ;;; tm-mail.el --- mail-mode extension.
4 ;;; Copyright (C) 1995,1996 KOBAYASHI Shuhei
6 ;;; Author: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
7 ;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; and Neal Becker <neal@neal.ctd.comsat.com>
9 ;;; Maintainer: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
10 ;;; Created: 1995/11/27
11 ;;; Version: $Id: tm-mail.el,v 6.0 1996/04/16 18:24:02 morioka Exp $
12 ;;; Keywords: mail, MIME, multimedia
14 ;;; This file is part of tm (Tools for MIME).
16 ;;; This program is free software; you can redistribute it and/or
17 ;;; modify it under the terms of the GNU General Public License as
18 ;;; published by the Free Software Foundation; either version 2, or
19 ;;; (at your option) any later version.
21 ;;; This program is distributed in the hope that it will be useful,
22 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 ;;; General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with This program. If not, write to the Free Software
28 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
34 (defun tm-mail/insert-message (&optional message)
36 (let* (mail-yank-hooks
37 (mail-citation-hook '(mime-editor/inserted-message-filter))
40 ((and (boundp 'vm-mail-buffer) vm-mail-buffer)
42 (let ((mail-reply-buffer vm-mail-buffer))
44 (call-interactively 'vm-yank-message)
45 (vm-yank-message message)))
47 ((boundp 'rmail-send-actions-rmail-buffer)
48 ;; called from RMAIL, emacs-19.29 or later.
49 (mail-yank-original nil)
51 ((and (boundp 'gnus-article-buffer) (get-buffer gnus-article-buffer))
52 ;; maybe called from Gnus.
53 (tm-gnus/insert-article)
55 ((and (boundp 'mail-reply-buffer) mail-reply-buffer)
56 ;; maybe called from RMAIL.
57 (mail-yank-original nil)
60 (message "Sorry, I don't have message inserter for your MUA.")
64 (defvar tm-mail/use-xemacs-popup-menu running-xemacs)
66 (if (and running-xemacs tm-mail/use-xemacs-popup-menu)
68 ((string-match "19.14" emacs-version)
69 (setq mail-menubar-menu
70 (append mail-menubar-menu
72 mime-editor/popup-menu-for-xemacs)))
76 (append mail-mode-menu
78 mime-editor/popup-menu-for-xemacs)))
89 ;;; tm-mail.el ends here