annotate lisp/=gnusmail.el @ 14561:6d6fd8e250ed libc-960213 libc-960214 libc-960215 libc-960216 libc-960217 libc-960218 libc-960219 libc-960220 libc-960221 libc-960222 libc-960223 libc-960224 libc-960225 libc-960226 libc-960227 libc-960228 libc-960229

Recognize sparclet cpu.
author Doug Evans <dje@gnu.org>
date Mon, 12 Feb 1996 23:15:30 +0000
parents 5f69627d9466
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
660
08eb386dd0f3 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
1 ;;; gnusmail.el --- mail reply commands for GNUS newsreader
08eb386dd0f3 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
2
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
3 ;; Copyright (C) 1990, 1993 Free Software Foundation, Inc.
846
20674ae6bf52 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 811
diff changeset
4
8100
eaaf6c8933b2 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 2843
diff changeset
5 ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
811
e694e0879463 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 807
diff changeset
6 ;; Keywords: news
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
7
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9
710
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
710
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
13 ;; any later version.
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14
710
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
18 ;; GNU General Public License for more details.
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
19
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
20 ;; You should have received a copy of the GNU General Public License
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
d18c8feb66bd *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 660
diff changeset
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
24 ;;; Commentary:
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 ;; Provides mail reply and mail other window command using usual mail
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 ;; interface and mh-e interface.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 ;;
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 ;; To use MAIL: set the variables gnus-mail-reply-method and
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 ;; gnus-mail-other-window-method to gnus-mail-reply-using-mail and
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 ;; gnus-mail-other-window-using-mail, respectively.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 ;;
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 ;; To use MH-E: set the variables gnus-mail-reply-method and
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 ;; gnus-mail-other-window-method to gnus-mail-reply-using-mhe and
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 ;; gnus-mail-other-window-using-mhe, respectively.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
37 ;;; Code:
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
38
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
39 (require 'gnus)
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
40
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 (autoload 'news-mail-reply "rnewspost")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 (autoload 'news-mail-other-window "rnewspost")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 (autoload 'mh-send "mh-e")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 (autoload 'mh-send-other-window "mh-e")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 (autoload 'mh-find-path "mh-e")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 (autoload 'mh-yank-cur-msg "mh-e")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
49 ;;; Mail reply commands of GNUS Summary Mode
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
51 (defun gnus-summary-reply (yank)
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 "Reply mail to news author.
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
53 If prefix argument YANK is non-nil, original article is yanked automatically.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
54 Customize the variable gnus-mail-reply-method to use another mailer."
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 (interactive "P")
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
56 ;; Bug fix by jbw@bigbird.bu.edu (Joe Wells)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
57 ;; Stripping headers should be specified with mail-yank-ignored-headers.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
58 (gnus-summary-select-article t t)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
59 (switch-to-buffer gnus-article-buffer)
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 (widen)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 (delete-other-windows)
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
62 (bury-buffer gnus-article-buffer)
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 (funcall gnus-mail-reply-method yank))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
65 (defun gnus-summary-reply-with-original ()
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
66 "Reply mail to news author with original article.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
67 Customize the variable gnus-mail-reply-method to use another mailer."
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 (interactive)
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
69 (gnus-summary-reply t))
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
71 (defun gnus-summary-mail-forward ()
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
72 "Forward the current message to another user.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
73 Customize the variable gnus-mail-forward-method to use another mailer."
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 (interactive)
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
75 (gnus-summary-select-article)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
76 (switch-to-buffer gnus-article-buffer)
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 (widen)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 (delete-other-windows)
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
79 (bury-buffer gnus-article-buffer)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
80 (funcall gnus-mail-forward-method))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
81
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
82 (defun gnus-summary-mail-other-window ()
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
83 "Compose mail in other window.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
84 Customize the variable gnus-mail-other-window-method to use another mailer."
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
85 (interactive)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
86 (gnus-summary-select-article)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
87 (switch-to-buffer gnus-article-buffer)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
88 (widen)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
89 (delete-other-windows)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
90 (bury-buffer gnus-article-buffer)
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 (funcall gnus-mail-other-window-method))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 ;;; Send mail using sendmail mail mode.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 (defun gnus-mail-reply-using-mail (&optional yank)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 "Compose reply mail using mail.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 Optional argument YANK means yank original article."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 (news-mail-reply)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 (gnus-overload-functions)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 (if yank
10185
5f69627d9466 (gnus-mail-reply-using-mail): Don't save point;
Richard M. Stallman <rms@gnu.org>
parents: 8150
diff changeset
102 (mail-yank-original nil)))
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
104 (defun gnus-mail-forward-using-mail ()
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
105 "Forward the current message to another user using mail."
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
106 ;; This is almost a carbon copy of rmail-forward in rmail.el.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
107 (let ((forward-buffer (current-buffer))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
108 (subject
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
109 (concat "[" gnus-newsgroup-name "] "
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
110 ;;(mail-strip-quoted-names (gnus-fetch-field "From")) ": "
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
111 (or (gnus-fetch-field "Subject") ""))))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
112 ;; If only one window, use it for the mail buffer.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
113 ;; Otherwise, use another window for the mail buffer
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
114 ;; so that the Rmail buffer remains visible
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
115 ;; and sending the mail will get back to it.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
116 (if (if (one-window-p t)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
117 (mail nil nil subject)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
118 (mail-other-window nil nil subject))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
119 (save-excursion
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
120 (goto-char (point-max))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
121 (insert "------- Start of forwarded message -------\n")
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
122 (insert-buffer forward-buffer)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
123 (goto-char (point-max))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
124 (insert "------- End of forwarded message -------\n")
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
125 ;; You have a chance to arrange the message.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
126 (run-hooks 'gnus-mail-forward-hook)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
127 ))))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
128
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 (defun gnus-mail-other-window-using-mail ()
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 "Compose mail other window using mail."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 (news-mail-other-window)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 (gnus-overload-functions))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 ;;; Send mail using mh-e.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 ;; The following mh-e interface is all cooperative works of
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 ;; tanaka@flab.fujitsu.CO.JP (TANAKA Hiroshi), kawabe@sra.CO.JP
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 ;; (Yoshikatsu Kawabe), and shingu@casund.cpr.canon.co.jp (Toshiaki
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 ;; SHINGU).
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 (defun gnus-mail-reply-using-mhe (&optional yank)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 "Compose reply mail using mh-e.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 Optional argument YANK means yank original article.
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
145 The command \\[mh-yank-cur-msg] yank the original message into current buffer."
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 ;; First of all, prepare mhe mail buffer.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 (let (from cc subject date to reply-to (buffer (current-buffer)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 (save-restriction
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
149 (gnus-article-show-all-headers) ;I don't think this is really needed.
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 (setq from (gnus-fetch-field "from")
8150
1b4a4f7a6dcb (gnus-mail-reply-using-mhe): Handle case of no subject.
Richard M. Stallman <rms@gnu.org>
parents: 8100
diff changeset
151 subject (let ((subject (or (gnus-fetch-field "subject")
1b4a4f7a6dcb (gnus-mail-reply-using-mhe): Handle case of no subject.
Richard M. Stallman <rms@gnu.org>
parents: 8100
diff changeset
152 "(None)")))
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 (if (and subject
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 (not (string-match "^[Rr][Ee]:.+$" subject)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155 (concat "Re: " subject) subject))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 reply-to (gnus-fetch-field "reply-to")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 cc (gnus-fetch-field "cc")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 date (gnus-fetch-field "date"))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159 (setq mh-show-buffer buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 (setq to (or reply-to from))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 (mh-find-path)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 (mh-send to (or cc "") subject)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 (save-excursion
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 (mh-insert-fields
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 "In-reply-to:"
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 (concat
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 (substring from 0 (string-match " *at \\| *@ \\| *(\\| *<" from))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 "'s message of " date)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 (setq mh-sent-from-folder buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 (setq mh-sent-from-msg 1)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 ))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 ;; Then, yank original article if requested.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 (if yank
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 (let ((last (point)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 (mh-yank-cur-msg)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 (goto-char last)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 )))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
179 ;; gnus-mail-forward-using-mhe is contributed by Jun-ichiro Itoh
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
180 ;; <itojun@ingram.mt.cs.keio.ac.jp>
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
181
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
182 (defun gnus-mail-forward-using-mhe ()
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
183 "Forward the current message to another user using mh-e."
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
184 ;; First of all, prepare mhe mail buffer.
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
185 (let ((to (read-string "To: "))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
186 (cc (read-string "Cc: "))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
187 (buffer (current-buffer))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
188 subject)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
189 ;;(gnus-article-show-all-headers)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
190 (setq subject
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
191 (concat "[" gnus-newsgroup-name "] "
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
192 ;;(mail-strip-quoted-names (gnus-fetch-field "From")) ": "
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
193 (or (gnus-fetch-field "subject") "")))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
194 (setq mh-show-buffer buffer)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
195 (mh-find-path)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
196 (mh-send to (or cc "") subject)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
197 (save-excursion
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
198 (goto-char (point-max))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
199 (insert "\n------- Forwarded Message\n\n")
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
200 (insert-buffer buffer)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
201 (goto-char (point-max))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
202 (insert "\n------- End of Forwarded Message\n")
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
203 (setq mh-sent-from-folder buffer)
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
204 (setq mh-sent-from-msg 1))))
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
205
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 (defun gnus-mail-other-window-using-mhe ()
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
207 "Compose mail other window using mh-e."
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 (let ((to (read-string "To: "))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 (cc (read-string "Cc: "))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 (subject (read-string "Subject: " (gnus-fetch-field "subject"))))
2843
cd90d49526ae Version 3.15 from Umeda.
Richard M. Stallman <rms@gnu.org>
parents: 851
diff changeset
211 (gnus-article-show-all-headers) ;I don't think this is really needed.
205
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 (setq mh-show-buffer (current-buffer))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 (mh-find-path)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214 (mh-send-other-window to cc subject)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215 (setq mh-sent-from-folder (current-buffer))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
216 (setq mh-sent-from-msg 1)))
584
4cd7543be581 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 205
diff changeset
217
4cd7543be581 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 205
diff changeset
218 (provide 'gnusmail)
660
08eb386dd0f3 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
219
08eb386dd0f3 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
220 ;;; gnusmail.el ends here