annotate lisp/tm/tm-mail.el @ 195:a2f645c6b9f8 r20-3b24

Import from CVS: tag r20-3b24
author cvs
date Mon, 13 Aug 2007 09:59:05 +0200
parents c0c698873ce1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
1 ;;; tm-mail.el --- mail-mode extension.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
2
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995,1996 KOBAYASHI Shuhei
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
5 ;; Author: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
6 ;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
7 ;; and Neal Becker <neal@neal.ctd.comsat.com>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
8 ;; Maintainer: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
9 ;; Created: 1995/11/27
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
10 ;; Version: $Id: tm-mail.el,v 1.2 1996/12/28 21:03:15 steve Exp $
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
11 ;; Keywords: mail, MIME, multimedia
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
12
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
13 ;; This file is part of tm (Tools for MIME).
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
14
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
15 ;; This program is free software; you can redistribute it and/or
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
16 ;; modify it under the terms of the GNU General Public License as
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
17 ;; published by the Free Software Foundation; either version 2, or (at
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
18 ;; your option) any later version.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
19
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
20 ;; This program is distributed in the hope that it will be useful, but
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
21 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
23 ;; General Public License for more details.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
24
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
25 ;; You should have received a copy of the GNU General Public License
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
26 ;; along with this program; see the file COPYING. If not, write to
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
27 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
28 ;; Boston, MA 02111-1307, USA.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
29
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
30 ;;; Code:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
31
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
32 (require 'tm-edit)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
33
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
34 (defun tm-mail/insert-message (&optional message)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
35 (interactive)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
36 (let* (mail-yank-hooks
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
37 (mail-citation-hook '(mime-editor/inserted-message-filter))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
38 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
39 (cond
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
40 ((and (boundp 'vm-mail-buffer) vm-mail-buffer)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
41 ;; called from VM.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
42 (let ((mail-reply-buffer vm-mail-buffer))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
43 (if (null message)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
44 (call-interactively 'vm-yank-message)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
45 (vm-yank-message message)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
46 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
47 ((boundp 'rmail-send-actions-rmail-buffer)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
48 ;; called from RMAIL, emacs-19.29 or later.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
49 (mail-yank-original nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
50 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
51 ((and (boundp 'gnus-article-buffer) (get-buffer gnus-article-buffer))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
52 ;; maybe called from Gnus.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
53 (tm-gnus/insert-article)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
54 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
55 ((and (boundp 'mail-reply-buffer) mail-reply-buffer)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
56 ;; maybe called from RMAIL.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
57 (mail-yank-original nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
58 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
59 (t
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
60 (message "Sorry, I don't have message inserter for your MUA.")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
61 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
62 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
63
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
64 (defvar tm-mail/use-xemacs-popup-menu running-xemacs)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
65
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
66 (if (and running-xemacs tm-mail/use-xemacs-popup-menu)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
67 (cond
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
68 (running-xemacs-19_14-or-later
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
69 (setq mail-menubar-menu
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
70 (append mail-menubar-menu
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
71 (list "---"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
72 mime-editor/popup-menu-for-xemacs)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
73 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
74 (t
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
75 (setq mail-mode-menu
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
76 (append mail-mode-menu
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
77 (list "---"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
78 mime-editor/popup-menu-for-xemacs)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
79 )))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
80
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
81
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
82 ;;; @ end
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
83 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
84
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
85 (provide 'tm-mail)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
86
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
87 ;;; tm-mail.el ends here