4
|
1 ;;; tm-mail.el --- mail-mode extension.
|
|
2
|
|
3 ;; Copyright (C) 1995,1996 KOBAYASHI Shuhei
|
|
4
|
|
5 ;; Author: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
|
|
6 ;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
|
|
7 ;; and Neal Becker <neal@neal.ctd.comsat.com>
|
|
8 ;; Maintainer: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
|
|
9 ;; Created: 1995/11/27
|
76
|
10 ;; Version: $Id: tm-mail.el,v 1.2 1996/12/28 21:03:15 steve Exp $
|
4
|
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 (at
|
|
18 ;; your option) any later version.
|
|
19
|
|
20 ;; This program is distributed in the hope that it will be useful, but
|
|
21 ;; 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; see the file COPYING. If not, write to
|
|
27 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
28 ;; Boston, MA 02111-1307, USA.
|
|
29
|
|
30 ;;; Code:
|
|
31
|
|
32 (require 'tm-edit)
|
|
33
|
|
34 (defun tm-mail/insert-message (&optional message)
|
|
35 (interactive)
|
|
36 (let* (mail-yank-hooks
|
|
37 (mail-citation-hook '(mime-editor/inserted-message-filter))
|
|
38 )
|
|
39 (cond
|
|
40 ((and (boundp 'vm-mail-buffer) vm-mail-buffer)
|
|
41 ;; called from VM.
|
|
42 (let ((mail-reply-buffer vm-mail-buffer))
|
|
43 (if (null message)
|
|
44 (call-interactively 'vm-yank-message)
|
|
45 (vm-yank-message message)))
|
|
46 )
|
|
47 ((boundp 'rmail-send-actions-rmail-buffer)
|
|
48 ;; called from RMAIL, emacs-19.29 or later.
|
|
49 (mail-yank-original nil)
|
|
50 )
|
|
51 ((and (boundp 'gnus-article-buffer) (get-buffer gnus-article-buffer))
|
|
52 ;; maybe called from Gnus.
|
|
53 (tm-gnus/insert-article)
|
|
54 )
|
|
55 ((and (boundp 'mail-reply-buffer) mail-reply-buffer)
|
|
56 ;; maybe called from RMAIL.
|
|
57 (mail-yank-original nil)
|
|
58 )
|
|
59 (t
|
|
60 (message "Sorry, I don't have message inserter for your MUA.")
|
|
61 ))
|
|
62 ))
|
|
63
|
|
64 (defvar tm-mail/use-xemacs-popup-menu running-xemacs)
|
|
65
|
|
66 (if (and running-xemacs tm-mail/use-xemacs-popup-menu)
|
|
67 (cond
|
|
68 (running-xemacs-19_14-or-later
|
|
69 (setq mail-menubar-menu
|
|
70 (append mail-menubar-menu
|
|
71 (list "---"
|
|
72 mime-editor/popup-menu-for-xemacs)))
|
|
73 )
|
|
74 (t
|
|
75 (setq mail-mode-menu
|
|
76 (append mail-mode-menu
|
|
77 (list "---"
|
|
78 mime-editor/popup-menu-for-xemacs)))
|
|
79 )))
|
|
80
|
|
81
|
|
82 ;;; @ end
|
|
83 ;;;
|
|
84
|
|
85 (provide 'tm-mail)
|
|
86
|
|
87 ;;; tm-mail.el ends here
|