annotate lisp/=gnusmail.el @ 1796:00beac79bcc7

(find_entries): If filename ends in .f or .for, don't try anything but Fortran.
author Richard M. Stallman <rms@gnu.org>
date Thu, 14 Jan 1993 20:09:22 +0000
parents 9620f7edf04d
children cd90d49526ae
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
846
20674ae6bf52 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 811
diff changeset
3 ;; Copyright (C) 1990 Free Software Foundation, Inc.
20674ae6bf52 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 811
diff changeset
4
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 711
diff changeset
5 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
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
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 ;;; Mail reply commands of GNUS Subject Mode
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 (defun gnus-Subject-mail-reply (yank)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 "Reply mail to news author.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 If prefix arg YANK is non-nil, original article is yanked automatically.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 Customize the variable `gnus-mail-reply-method' to use another mailer."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 (interactive "P")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 (gnus-Subject-select-article)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 (switch-to-buffer gnus-Article-buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 (widen)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 (delete-other-windows)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 (bury-buffer gnus-Article-buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 (funcall gnus-mail-reply-method yank))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 (defun gnus-Subject-mail-reply-with-original ()
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 "Reply mail to news author with original article."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 (interactive)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 (gnus-Subject-mail-reply t))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 (defun gnus-Subject-mail-other-window ()
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 "Compose mail in other window.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 Customize the variable `gnus-mail-other-window-method' to use another mailer."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 (interactive)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 (gnus-Subject-select-article)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 (switch-to-buffer gnus-Article-buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 (widen)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 (delete-other-windows)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 (bury-buffer gnus-Article-buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 (funcall gnus-mail-other-window-method))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 ;;; Send mail using sendmail mail mode.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 (defun gnus-mail-reply-using-mail (&optional yank)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 "Compose reply mail using mail.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 Optional argument YANK means yank original article."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 (news-mail-reply)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 (gnus-overload-functions)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 (if yank
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 (let ((last (point)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 (goto-char (point-max))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 (mail-yank-original nil)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 (goto-char last)
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 (defun gnus-mail-other-window-using-mail ()
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 "Compose mail other window using mail."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 (news-mail-other-window)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 (gnus-overload-functions))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 ;;; Send mail using mh-e.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 ;; The following mh-e interface is all cooperative works of
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 ;; tanaka@flab.fujitsu.CO.JP (TANAKA Hiroshi), kawabe@sra.CO.JP
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 ;; (Yoshikatsu Kawabe), and shingu@casund.cpr.canon.co.jp (Toshiaki
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 ;; SHINGU).
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 (defun gnus-mail-reply-using-mhe (&optional yank)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 "Compose reply mail using mh-e.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109 Optional argument YANK means yank original article.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 The command \\[mh-yank-cur-msg] yanks the original message into current buffer."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 ;; First of all, prepare mhe mail buffer.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 (let (from cc subject date to reply-to (buffer (current-buffer)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 (save-restriction
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 (gnus-Article-show-all-headers) ;I don't think this is really needed.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115 (setq from (gnus-fetch-field "from")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 subject (let ((subject (gnus-fetch-field "subject")))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 (if (and subject
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 (not (string-match "^[Rr][Ee]:.+$" subject)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 (concat "Re: " subject) subject))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 reply-to (gnus-fetch-field "reply-to")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 cc (gnus-fetch-field "cc")
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 date (gnus-fetch-field "date"))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 (setq mh-show-buffer buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 (setq to (or reply-to from))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125 (mh-find-path)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
126 (mh-send to (or cc "") subject)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
127 (save-excursion
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 (mh-insert-fields
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 "In-reply-to:"
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 (concat
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 (substring from 0 (string-match " *at \\| *@ \\| *(\\| *<" from))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 "'s message of " date)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 (setq mh-sent-from-folder buffer)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134 (setq mh-sent-from-msg 1)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 ))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 ;; Then, yank original article if requested.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 (if yank
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 (let ((last (point)))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 (mh-yank-cur-msg)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 (goto-char last)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 )))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 (defun gnus-mail-other-window-using-mhe ()
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 "Compose mail other window using MH-E Mail."
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145 (let ((to (read-string "To: "))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 (cc (read-string "Cc: "))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 (subject (read-string "Subject: " (gnus-fetch-field "subject"))))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 (gnus-Article-show-all-headers) ;I don't think this is really needed.
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 (setq mh-show-buffer (current-buffer))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 (mh-find-path)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 (mh-send-other-window to cc subject)
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 (setq mh-sent-from-folder (current-buffer))
d3e764a552a5 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 (setq mh-sent-from-msg 1)))
584
4cd7543be581 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 205
diff changeset
154
4cd7543be581 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 205
diff changeset
155 (provide 'gnusmail)
660
08eb386dd0f3 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
156
08eb386dd0f3 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 584
diff changeset
157 ;;; gnusmail.el ends here