Mercurial > emacs
annotate lisp/mail/mh-comp.el @ 48986:5f0ef23b7e51
(dired-goto-file): Handle \ and ^M quoted by backslash. Fix error message.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 Dec 2002 21:26:46 +0000 |
parents | 8aaba207e44b |
children | 30c4902b654d |
rev | line source |
---|---|
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1 ;;; mh-comp.el --- MH-E functions for composing messages |
6365 | 2 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
3 ;; Copyright (C) 1993,1995,1997,2000,2001,2002 Free Software Foundation, Inc. |
30887
c4366892a814
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
29420
diff
changeset
|
4 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
5 ;; Author: Bill Wohler <wohler@newt.com> |
33145 | 6 ;; Maintainer: Bill Wohler <wohler@newt.com> |
30887
c4366892a814
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
29420
diff
changeset
|
7 ;; Keywords: mail |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
8 ;; See: mh-e.el |
6365 | 9 |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
35975
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
6365 | 11 |
11333 | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
6365 | 13 ;; it under the terms of the GNU General Public License as published by |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
11333 | 17 ;; GNU Emacs is distributed in the hope that it will be useful, |
6365 | 18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
14169 | 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
25 ;; Boston, MA 02111-1307, USA. | |
6365 | 26 |
27 ;;; Commentary: | |
28 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
29 ;; Internal support for MH-E package. |
6365 | 30 |
11332 | 31 ;;; Change Log: |
32 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
33 ;; $Id: mh-comp.el,v 1.145 2002/11/29 16:49:43 wohler Exp $ |
11332 | 34 |
6365 | 35 ;;; Code: |
36 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
37 (require 'mh-e) |
6365 | 38 (require 'mh-utils) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
39 (require 'gnus-util) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
40 (require 'easymenu) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
41 (require 'cl) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
42 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
43 ;; Shush the byte-compiler |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
44 (defvar adaptive-fill-first-line-regexp) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
45 (defvar font-lock-defaults) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
46 (defvar mark-active) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
47 (defvar sendmail-coding-system) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
48 (defvar tool-bar-mode) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
49 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
50 ;;; autoloads from mh-mime |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
51 (autoload 'mh-press-button "mh-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
52 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
53 ;;; autoloads for mh-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
54 (autoload 'mh-notate-seq "mh-seq") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
55 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
56 (autoload 'mh-compose-insertion "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
57 "Add a MIME directive to insert a file, using mhn or gnus. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
58 If the variable mh-compose-insertion is set to 'mhn, then that will be used. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
59 If it is set to 'gnus, then that will be used instead.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
60 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
61 (autoload 'mh-compose-forward "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
62 "Add a MIME directive to forward a message, using mhn or gnus. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
63 If the variable mh-compose-insertion is set to 'mhn, then that will be used. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
64 If it is set to 'gnus, then that will be used instead.") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
65 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
66 (autoload 'mh-mhn-compose-insertion "mh-mime" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
67 "Add a directive to insert a MIME message part from a file. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
68 This is the typical way to insert non-text parts in a message. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
69 See also \\[mh-edit-mhn]." t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
70 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
71 (autoload 'mh-mhn-compose-anon-ftp "mh-mime" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
72 "Add a directive for a MIME anonymous ftp external body part. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
73 This directive tells MH to include a reference to a |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
74 message/external-body part retrievable by anonymous FTP. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
75 See also \\[mh-edit-mhn]." t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
76 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
77 (autoload 'mh-mhn-compose-external-compressed-tar "mh-mime" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
78 "Add a directive to include a MIME reference to a compressed tar file. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
79 The file should be available via anonymous ftp. This directive |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
80 tells MH to include a reference to a message/external-body part. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
81 See also \\[mh-edit-mhn]." t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
82 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
83 (autoload 'mh-mhn-compose-forw "mh-mime" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
84 "Add a forw directive to this message, to forward a message with MIME. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
85 This directive tells MH to include another message in this one. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
86 See also \\[mh-edit-mhn]." t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
87 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
88 (autoload 'mh-edit-mhn "mh-mime" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
89 "Format the current draft for MIME, expanding any mhn directives. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
90 Process the current draft with the mhn program, which, |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
91 using directives already inserted in the draft, fills in |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
92 all the MIME components and header fields. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
93 This step should be done last just before sending the message. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
94 The mhn program is part of MH version 6.8 or later. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
95 The \\[mh-revert-mhn-edit] command undoes this command. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
96 For assistance with creating mhn directives to insert |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
97 various types of components in a message, see |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
98 \\[mh-mhn-compose-insertion] (generic insertion from a file), |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
99 \\[mh-mhn-compose-anon-ftp] (external reference to file via anonymous ftp), |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
100 \\[mh-mhn-compose-external-compressed-tar] \ |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
101 \(reference to compressed tar file via anonymous ftp), and |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
102 \\[mh-mhn-compose-forw] (forward message)." t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
103 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
104 (autoload 'mh-revert-mhn-edit "mh-mime" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
105 "Undoes the effect of \\[mh-edit-mhn] by reverting to the backup file. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
106 Optional non-nil argument means don't ask for confirmation." t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
107 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
108 (autoload 'mh-mml-to-mime "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
109 "Compose MIME message from mml directives.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
110 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
111 (autoload 'mh-mml-forward-message "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
112 "Forward a message as attachment. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
113 The function will prompt the user for a description, a folder and message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
114 number.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
115 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
116 (autoload 'mh-mml-attach-file "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
117 "Attach a file to the outgoing MIME message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
118 The file is not inserted or encoded until you send the message with |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
119 `\\[message-send-and-exit]' or `\\[message-send]'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
120 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
121 Message dispostion is \"inline\" is INLINE is non-nil, else the default is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
122 \"attachment\". |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
123 FILE is the name of the file to attach. TYPE is its content-type, a |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
124 string of the form \"type/subtype\". DESCRIPTION is a one-line |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
125 description of the attachment.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
126 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
127 (autoload 'mh-mml-secure-message-sign-pgpmime "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
128 "Add MML tag to encrypt/sign the entire message.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
129 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
130 (autoload 'mh-mml-secure-message-encrypt-pgpmime "mh-mime" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
131 "Add MML tag to encrypt and sign the entire message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
132 If called with a prefix argument, only encrypt (do NOT sign).") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
133 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
134 ;;; Other Autoloads. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
135 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
136 (autoload 'Info-goto-node "info") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
137 (autoload 'mail-mode-fill-paragraph "sendmail") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
138 (autoload 'mm-handle-displayed-p "mm-decode") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
139 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
140 (autoload 'sc-cite-original "sc" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
141 "Workhorse citing function which performs the initial citation. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
142 This is callable from the various mail and news readers' reply |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
143 function according to the agreed upon standard. See `\\[sc-describe]' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
144 for more details. `sc-cite-original' does not do any yanking of the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
145 original message but it does require a few things: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
146 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
147 1) The reply buffer is the current buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
148 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
149 2) The original message has been yanked and inserted into the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
150 reply buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
151 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
152 3) Verbose mail headers from the original message have been |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
153 inserted into the reply buffer directly before the text of the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
154 original message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
155 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
156 4) Point is at the beginning of the verbose headers. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
157 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
158 5) Mark is at the end of the body of text to be cited. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
159 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
160 For Emacs 19's, the region need not be active (and typically isn't |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
161 when this function is called. Also, the hook `sc-pre-hook' is run |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
162 before, and `sc-post-hook' is run after the guts of this function.") |
6365 | 163 |
11332 | 164 ;;; Site customization (see also mh-utils.el): |
165 | |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
166 (defgroup mh-compose nil |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
167 "MH-E functions for composing messages." |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
168 :prefix "mh-" |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
169 :group 'mh) |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
170 |
11332 | 171 (defvar mh-send-prog "send" |
172 "Name of the MH send program. | |
173 Some sites need to change this because of a name conflict.") | |
174 | |
175 (defvar mh-redist-full-contents nil | |
176 "Non-nil if the `dist' command needs whole letter for redistribution. | |
177 This is the case only when `send' is compiled with the BERK option. | |
178 If MH will not allow you to redist a previously redist'd msg, set to nil.") | |
179 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
180 (defvar mh-redist-background nil |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
181 "If non-nil redist will be done in background like send. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
182 This allows transaction log to be visible if -watch, -verbose or -snoop are |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
183 used.") |
11332 | 184 |
6365 | 185 (defvar mh-note-repl "-" |
186 "String whose first character is used to notate replied to messages.") | |
187 | |
188 (defvar mh-note-forw "F" | |
189 "String whose first character is used to notate forwarded messages.") | |
190 | |
191 (defvar mh-note-dist "R" | |
192 "String whose first character is used to notate redistributed messages.") | |
193 | |
194 (defvar mh-yank-hooks nil | |
195 "Obsolete hook for modifying a citation just inserted in the mail buffer. | |
196 Each hook function can find the citation between point and mark. | |
197 And each hook function should leave point and mark around the citation | |
198 text as modified. | |
199 | |
200 This is a normal hook, misnamed for historical reasons. | |
19936 | 201 It is semi-obsolete and is only used if `mail-citation-hook' is nil.") |
6365 | 202 |
203 (defvar mail-citation-hook nil | |
204 "*Hook for modifying a citation just inserted in the mail buffer. | |
205 Each hook function can find the citation between point and mark. | |
206 And each hook function should leave point and mark around the citation | |
207 text as modified. | |
208 | |
209 If this hook is entirely empty (nil), the text of the message is inserted | |
19936 | 210 with `mh-ins-buf-prefix' prefixed to each line. |
6365 | 211 |
19936 | 212 See also the variable `mh-yank-from-start-of-msg', which controls how |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
213 much of the message passed to the hook. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
214 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
215 This hook was historically provided to set up supercite. You may now leave |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
216 this nil and set up supercite by setting the variable |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
217 `mh-yank-from-start-of-msg' to 'supercite or, for more automatic insertion, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
218 to 'autosupercite.") |
6365 | 219 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
220 ;;; Personal preferences: |
6365 | 221 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
222 (defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
223 "Use either 'gnus or 'mhn to insert MIME message directives in messages." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
224 :type '(choice (const :tag "Use gnus" gnus) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
225 (const :tag "Use mhn" mhn)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
226 :group 'mh-compose) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
227 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
228 (defcustom mh-x-face-file "~/.face" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
229 "*File name containing the encoded X-Face string to insert in outgoing mail. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
230 If nil, or the file does not exist, nothing is added to message headers." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
231 :type 'file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
232 :group 'mh-compose) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
233 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
234 (defcustom mh-insert-x-mailer-flag t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
235 "*Non-nil means append an X-Mailer field to the header." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
236 :type 'boolean |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
237 :group 'mh-compose) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
238 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
239 (defvar mh-x-mailer-string nil |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
240 "*String containing the contents of the X-Mailer header field. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
241 If nil, this variable is initialized to show the version of MH-E, Emacs, and |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
242 MH the first time a message is composed.") |
6365 | 243 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
244 (defcustom mh-insert-mail-followup-to-flag t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
245 "Non-nil means maybe append a Mail-Followup-To field to the header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
246 The insertion is done if the To: or Cc: fields matches an entry in |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
247 `mh-insert-mail-followup-to-list'." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
248 :type 'boolean |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
249 :group 'mh-compose) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
250 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
251 (defcustom mh-insert-mail-followup-to-list nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
252 "Alist of addresses for which a Mail-Followup-To field is inserted. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
253 Each element has the form (REGEXP ADDRESS). |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
254 When the REGEXP appears in the To or cc fields of a message, the corresponding |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
255 ADDRESS is inserted in a Mail-Followup-To field. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
256 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
257 Here's a customization example: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
258 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
259 regexp: mh-e-users@lists.s\\\\(ourceforge\\\\|f\\\\).net |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
260 address: mh-e-users@lists.sourceforge.net |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
261 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
262 This corresponds to: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
263 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
264 (setq mh-insert-mail-followup-to-list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
265 '((\"mh-e-users@lists.s\\\\(ourceforge\\\\|f\\\\).net\" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
266 \"mh-e-users@lists.sourceforge.net\"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
267 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
268 While it might be tempting to add a descriptive name to the mailing list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
269 address, consider that this field will appear in other people's outgoing |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
270 mail in their To: field. It might be best to keep it simple." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
271 :type '(repeat (list (string :tag "regexp") (string :tag "address"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
272 :group 'mh-compose) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
273 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
274 (defcustom mh-delete-yanked-msg-window-flag nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
275 "*Non-nil means delete any window displaying the message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
276 Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. |
6365 | 277 If non-nil, yanking the current message into a draft letter deletes any |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
278 windows displaying the message." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
279 :type 'boolean |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
280 :group 'mh-compose) |
6365 | 281 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
282 (defcustom mh-yank-from-start-of-msg 'attribution |
6365 | 283 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
284 If t, include the entire message, with full headers. This is historically |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
285 here for use with supercite, but is now deprecated in favor of the setting |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
286 `supercite' below. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
287 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
288 If the symbol `body', then yank the message minus the header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
289 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
290 If the symbol `supercite', include the entire message, with full headers. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
291 This also causes the invocation of `sc-cite-original' without the setting |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
292 of `mail-citation-hook', now deprecated practice. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
293 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
294 If the symbol `autosupercite', do as for `supercite' automatically when |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
295 show buffer matches the message being replied-to. When this option is used, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
296 the -noformat switch is passed to the repl program to override a -filter or |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
297 -format switch. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
298 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
299 If the symbol `attribution', then yank the message minus the header and add |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
300 a simple attribution line at the top. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
301 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
302 If the symbol `autoattrib', do as for `attribution' automatically when show |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
303 buffer matches the message being replied-to. You can make sure this is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
304 always the case by setting `mh-reply-show-message-flag' to t (which is the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
305 default) and optionally `mh-delete-yanked-msg-window-flag' to t as well such |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
306 that the show window is never displayed. When the `autoattrib' option is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
307 used, the -noformat switch is passed to the repl program to override a |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
308 -filter or -format switch. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
309 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
310 If nil, yank only the portion of the message following the point. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
311 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
312 If the show buffer has a region, this variable is ignored unless its value is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
313 one of `attribution' or `autoattrib' in which case the attribution is added |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
314 to the yanked region." |
22590
fd24f556ad8f
(mh-yank-from-start-of-msg): Use `other' widget
Andreas Schwab <schwab@suse.de>
parents:
19952
diff
changeset
|
315 :type '(choice (const :tag "Below point" nil) |
fd24f556ad8f
(mh-yank-from-start-of-msg): Use `other' widget
Andreas Schwab <schwab@suse.de>
parents:
19952
diff
changeset
|
316 (const :tag "Without header" body) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
317 (const :tag "Invoke supercite" supercite) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
318 (const :tag "Invoke supercite, automatically" autosupercite) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
319 (const :tag "Without header, with attribution" attribution) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
320 (const :tag "Without header, with attribution, automatically" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
321 autoattrib) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
322 (const :tag "Entire message with headers" t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
323 :group 'mh-compose) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
324 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
325 (defcustom mh-extract-from-attribution-verb "wrote:" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
326 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
327 :type '(choice (const "wrote:") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
328 (const "a écrit :") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
329 (string :tag "Custom string")) |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
330 :group 'mh-compose) |
6365 | 331 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
332 (defcustom mh-ins-buf-prefix "> " |
11332 | 333 "*String to put before each non-blank line of a yanked or inserted message. |
334 \\<mh-letter-mode-map>Used when the message is inserted into an outgoing letter | |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
335 by \\[mh-insert-letter] or \\[mh-yank-cur-msg]." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
336 :type 'string |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
337 :group 'mh-compose) |
11332 | 338 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
339 (defcustom mh-reply-default-reply-to nil |
6365 | 340 "*Sets the person or persons to whom a reply will be sent. |
341 If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this | |
11332 | 342 value and it should be one of \"from\", \"to\", \"cc\", or \"all\". |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
343 The values \"cc\" and \"all\" do the same thing." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
344 :type '(choice (const :tag "Prompt" nil) |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
345 (const "from") (const "to") |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
346 (const "cc") (const "all")) |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
347 :group 'mh-compose) |
6365 | 348 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
349 (defcustom mh-signature-file-name "~/.signature" |
6365 | 350 "*Name of file containing the user's signature. |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
351 Inserted into message by \\<mh-letter-mode-map>\\[mh-insert-signature]." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
352 :type 'file |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
353 :group 'mh-compose) |
6365 | 354 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
355 (defcustom mh-forward-subject-format "%s: %s" |
6365 | 356 "*Format to generate the Subject: line contents for a forwarded message. |
357 The two string arguments to the format are the sender of the original | |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
358 message and the original subject line." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
359 :type 'string |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
360 :group 'mh-compose) |
6365 | 361 |
362 (defvar mh-comp-formfile "components" | |
363 "Name of file to be used as a skeleton for composing messages. | |
19936 | 364 Default is \"components\". If not an absolute file name, the file |
6365 | 365 is searched for first in the user's MH directory, then in the |
366 system MH lib directory.") | |
367 | |
11332 | 368 (defvar mh-repl-formfile "replcomps" |
369 "Name of file to be used as a skeleton for replying to messages. | |
19936 | 370 Default is \"replcomps\". If not an absolute file name, the file |
11332 | 371 is searched for first in the user's MH directory, then in the |
372 system MH lib directory.") | |
373 | |
24421 | 374 (defvar mh-repl-group-formfile "replgroupcomps" |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
375 "Name of file to be used as a skeleton for replying to messages. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
376 This file is used to form replies to the sender and all recipients of a |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
377 message. Only used if `mh-nmh-flag' is non-nil. Default is \"replgroupcomps\". |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
378 If not an absolute file name, the file is searched for first in the user's MH |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
379 directory, then in the system MH lib directory.") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
380 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
381 (defcustom mh-reply-show-message-flag t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
382 "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply]. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
383 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
384 The setting of this variable determines whether the MH `show-buffer' is |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
385 displayed with the current message when using `mh-reply' without a prefix |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
386 argument. Set it to nil if you already include the message automatically |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
387 in your draft using |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
388 repl: -filter repl.filter |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
389 in your ~/.mh_profile file." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
390 :type 'boolean |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
391 :group 'mh-compose) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
392 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
393 (defcustom mh-letter-fill-column 72 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
394 "*Fill column to use in `mh-letter-mode'. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
395 This is usually less than in other text modes because email messages get |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
396 quoted by some prefix (sometimes many times) when they are replied to, |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
397 and it's best to avoid quoted lines that span more than 80 columns." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
398 :type 'integer |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
399 :group 'mh-compose) |
24421 | 400 |
6365 | 401 ;;; Hooks: |
402 | |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
403 (defcustom mh-letter-mode-hook nil |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
404 "Invoked in `mh-letter-mode' on a new letter." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
405 :type 'hook |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
406 :group 'mh-compose) |
6365 | 407 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
408 (defcustom mh-compose-letter-function nil |
11332 | 409 "Invoked when setting up a letter draft. |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
410 It is passed three arguments: TO recipients, SUBJECT, and CC recipients." |
35975
a6d7df85ca41
(mh-compose-letter-function): Fix :type.
Dave Love <fx@gnu.org>
parents:
33145
diff
changeset
|
411 :type '(choice (const nil) function) |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
412 :group 'mh-compose) |
6365 | 413 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
414 (defcustom mh-before-send-letter-hook nil |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
415 "Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
416 :type 'hook |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
417 :group 'mh-compose) |
6365 | 418 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
419 (defcustom mh-letter-insert-signature-hook nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
420 "Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-insert-signature] command. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
421 Can be used to determine which signature file to use based on message content. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
422 On return, if `mh-signature-file-name' is non-nil that file will be inserted at |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
423 the current point in the buffer." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
424 :type 'hook |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
425 :group 'mh-compose) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
426 |
6365 | 427 (defvar mh-rejected-letter-start |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
428 (format "^%s$" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
429 (regexp-opt |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
430 '("Content-Type: message/rfc822" ;MIME MDN |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
431 " ----- Unsent message follows -----" ;from sendmail V5 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
432 " --------Unsent Message below:" ; from sendmail at BU |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
433 " ----- Original message follows -----" ;from sendmail V8 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
434 "------- Unsent Draft" ;from MH itself |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
435 "---------- Original Message ----------" ;from zmailer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
436 " --- The unsent message follows ---" ;from AIX mail system |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
437 " Your message follows:" ;from MMDF-II |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
438 "Content-Description: Returned Content" ;1993 KJ sendmail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
439 )))) |
6365 | 440 |
441 (defvar mh-new-draft-cleaned-headers | |
11332 | 442 "^Date:\\|^Received:\\|^Message-Id:\\|^From:\\|^Sender:\\|^Errors-To:\\|^Delivery-Date:\\|^Return-Path:" |
6365 | 443 "Regexp of header lines to remove before offering a message as a new draft. |
444 Used by the \\<mh-folder-mode-map>`\\[mh-edit-again]' and `\\[mh-extract-rejected-mail]' commands.") | |
445 | |
11332 | 446 (defvar mh-to-field-choices '(("t" . "To:") ("s" . "Subject:") ("c" . "Cc:") |
447 ("b" . "Bcc:") ("f" . "Fcc:") ("r" . "From:") | |
448 ("d" . "Dcc:")) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
449 "Alist of (final-character . field-name) choices for `mh-to-field'.") |
6365 | 450 |
451 (defvar mh-letter-mode-map (copy-keymap text-mode-map) | |
452 "Keymap for composing mail.") | |
453 | |
454 (defvar mh-letter-mode-syntax-table nil | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
455 "Syntax table used by MH-E while in MH-Letter mode.") |
6365 | 456 |
457 (if mh-letter-mode-syntax-table | |
458 () | |
459 (setq mh-letter-mode-syntax-table | |
460 (make-syntax-table text-mode-syntax-table)) | |
461 (modify-syntax-entry ?% "." mh-letter-mode-syntax-table)) | |
462 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
463 (defvar mh-sent-from-folder nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
464 "Folder of msg assoc with this letter.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
465 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
466 (defvar mh-sent-from-msg nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
467 "Number of msg assoc with this letter.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
468 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
469 (defvar mh-send-args nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
470 "Extra args to pass to \"send\" command.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
471 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
472 (defvar mh-annotate-char nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
473 "Character to use to annotate `mh-sent-from-msg'.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
474 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
475 (defvar mh-annotate-field nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
476 "Field name for message annotation.") |
6365 | 477 |
478 ;;;###autoload | |
479 (defun mh-smail () | |
480 "Compose and send mail with the MH mail system. | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
481 This function is an entry point to MH-E, the Emacs front end |
11332 | 482 to the MH mail system. |
483 | |
484 See documentation of `\\[mh-send]' for more details on composing mail." | |
6365 | 485 (interactive) |
486 (mh-find-path) | |
487 (call-interactively 'mh-send)) | |
488 | |
13385 | 489 (defvar mh-error-if-no-draft nil) ;raise error over using old draft |
490 | |
491 ;;;###autoload | |
24421 | 492 (defun mh-smail-batch (&optional to subject other-headers &rest ignored) |
13385 | 493 "Set up a mail composition draft with the MH mail system. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
494 This function is an entry point to MH-E, the Emacs front end |
13385 | 495 to the MH mail system. This function does not prompt the user |
496 for any header fields, and thus is suitable for use by programs | |
497 that want to create a mail buffer. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
498 Users should use `\\[mh-smail]' to compose mail. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
499 Optional arguments for setting certain fields include TO, SUBJECT, and |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
500 OTHER-HEADERS. Additional arguments are IGNORED." |
13385 | 501 (mh-find-path) |
502 (let ((mh-error-if-no-draft t)) | |
26393
d11cb5096a6c
(mh-smail-batch): If TO is nil, use "" as
Gerd Moellmann <gerd@gnu.org>
parents:
25535
diff
changeset
|
503 (mh-send (or to "") "" (or subject "")))) |
13385 | 504 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
505 ;; XEmacs needs this: |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
506 ;;;###autoload |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
507 (defun mh-user-agent-compose (&optional to subject other-headers continue |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
508 switch-function yank-action |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
509 send-actions) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
510 "Set up mail composition draft with the MH mail system. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
511 This is `mail-user-agent' entry point to MH-E. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
512 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
513 The optional arguments TO and SUBJECT specify recipients and the |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
514 initial Subject field, respectively. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
515 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
516 OTHER-HEADERS is an alist specifying additional |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
517 header fields. Elements look like (HEADER . VALUE) where both |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
518 HEADER and VALUE are strings. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
519 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
520 CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are ignored." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
521 (mh-find-path) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
522 (let ((mh-error-if-no-draft t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
523 (mh-send to "" subject) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
524 (while other-headers |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
525 (mh-insert-fields (concat (car (car other-headers)) ":") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
526 (cdr (car other-headers))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
527 (setq other-headers (cdr other-headers))))) |
13385 | 528 |
6365 | 529 (defun mh-edit-again (msg) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
530 "Clean up a draft or a message MSG previously sent and make it resendable. |
11332 | 531 Default is the current message. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
532 The variable `mh-new-draft-cleaned-headers' specifies the headers to remove. |
6365 | 533 See also documentation for `\\[mh-send]' function." |
534 (interactive (list (mh-get-msg-num t))) | |
535 (let* ((from-folder mh-current-folder) | |
536 (config (current-window-configuration)) | |
537 (draft | |
538 (cond ((and mh-draft-folder (equal from-folder mh-draft-folder)) | |
539 (pop-to-buffer (find-file-noselect (mh-msg-filename msg)) t) | |
540 (rename-buffer (format "draft-%d" msg)) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
541 ;; Make buffer writable... |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
542 (setq buffer-read-only nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
543 ;; If buffer was being used to display the message reinsert |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
544 ;; from file... |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
545 (when (eq major-mode 'mh-show-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
546 (erase-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
547 (insert-file-contents buffer-file-name)) |
6365 | 548 (buffer-name)) |
549 (t | |
550 (mh-read-draft "clean-up" (mh-msg-filename msg) nil))))) | |
551 (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
552 (mh-insert-header-separator) |
6365 | 553 (goto-char (point-min)) |
13385 | 554 (save-buffer) |
6365 | 555 (mh-compose-and-send-mail draft "" from-folder nil nil nil nil nil nil |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
556 config) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
557 (mh-letter-mode-message))) |
6365 | 558 |
559 (defun mh-extract-rejected-mail (msg) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
560 "Extract message MSG returned by the mail system and make it resendable. |
19936 | 561 Default is the current message. The variable `mh-new-draft-cleaned-headers' |
6365 | 562 gives the headers to clean out of the original message. |
563 See also documentation for `\\[mh-send]' function." | |
564 (interactive (list (mh-get-msg-num t))) | |
565 (let ((from-folder mh-current-folder) | |
566 (config (current-window-configuration)) | |
567 (draft (mh-read-draft "extraction" (mh-msg-filename msg) nil))) | |
568 (goto-char (point-min)) | |
569 (cond ((re-search-forward mh-rejected-letter-start nil t) | |
570 (skip-chars-forward " \t\n") | |
571 (delete-region (point-min) (point)) | |
572 (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)) | |
573 (t | |
574 (message "Does not appear to be a rejected letter."))) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
575 (mh-insert-header-separator) |
6365 | 576 (goto-char (point-min)) |
13385 | 577 (save-buffer) |
11332 | 578 (mh-compose-and-send-mail draft "" from-folder msg |
579 (mh-get-header-field "To:") | |
580 (mh-get-header-field "From:") | |
581 (mh-get-header-field "Cc:") | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
582 nil nil config) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
583 (mh-letter-mode-message))) |
6365 | 584 |
585 (defun mh-forward (to cc &optional msg-or-seq) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
586 "Forward one or more messages to the recipients TO and CC. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
587 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
588 Use the optional MSG-OR-SEQ to specify a message or sequence to forward. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
589 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
590 Default is the displayed message. If optional prefix argument is given then |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
591 prompt for the message sequence. If variable `transient-mark-mode' is non-nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
592 and the mark is active, then the selected region is forwarded. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
593 See also documentation for `\\[mh-send]' function." |
6365 | 594 (interactive (list (mh-read-address "To: ") |
595 (mh-read-address "Cc: ") | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
596 (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
597 ((mh-mark-active-p t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
598 (mh-region-to-sequence (region-beginning) (region-end)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
599 'region) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
600 (current-prefix-arg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
601 (mh-read-seq-default "Forward" t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
602 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
603 (mh-get-msg-num t))))) |
6365 | 604 (let* ((folder mh-current-folder) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
605 (msgs (if (numberp msg-or-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
606 (list msg-or-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
607 (mh-seq-to-msgs msg-or-seq))) |
6365 | 608 (config (current-window-configuration)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
609 (fwd-msg-file (mh-msg-filename (car msgs) folder)) |
6365 | 610 ;; forw always leaves file in "draft" since it doesn't have -draft |
611 (draft-name (expand-file-name "draft" mh-user-path)) | |
612 (draft (cond ((or (not (file-exists-p draft-name)) | |
613 (y-or-n-p "The file 'draft' exists. Discard it? ")) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
614 (mh-exec-cmd "forw" "-build" (if mh-nmh-flag "-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
615 mh-current-folder msgs) |
6365 | 616 (prog1 |
617 (mh-read-draft "" draft-name t) | |
618 (mh-insert-fields "To:" to "Cc:" cc) | |
13385 | 619 (save-buffer))) |
6365 | 620 (t |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
621 (mh-read-draft "" draft-name nil))))) |
11332 | 622 (let (orig-from |
623 orig-subject) | |
25535
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
624 (save-excursion |
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
625 (set-buffer (get-buffer-create mh-temp-buffer)) |
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
626 (erase-buffer) |
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
627 (insert-file-contents fwd-msg-file) |
11332 | 628 (setq orig-from (mh-get-header-field "From:")) |
629 (setq orig-subject (mh-get-header-field "Subject:"))) | |
6365 | 630 (let ((forw-subject |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
631 (mh-forwarded-letter-subject orig-from orig-subject)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
632 (mail-header-separator mh-mail-header-separator) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
633 (compose)) |
11332 | 634 (mh-insert-fields "Subject:" forw-subject) |
635 (goto-char (point-min)) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
636 ;; If using MML, translate mhn |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
637 (if (equal mh-compose-insertion 'gnus) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
638 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
639 (setq compose t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
640 (re-search-forward (format "^\\(%s\\)?$" mail-header-separator)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
641 (while |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
642 (re-search-forward "^#forw \\[\\([^]]+\\)\\] \\(+\\S-+\\) \\(.*\\)$" (point-max) t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
643 (let ((description (if (equal (match-string 1) "forwarded messages") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
644 "forwarded message %d" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
645 (match-string 1))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
646 (msgs (split-string (match-string 3))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
647 (i 0)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
648 (beginning-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
649 (delete-region (point)(progn (forward-line 1)(point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
650 (dolist (msg msgs) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
651 (setq i (1+ i)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
652 (mh-mml-forward-message (format description i) folder msg)))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
653 ;; Postition just before forwarded message |
25535
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
654 (if (re-search-forward "^------- Forwarded Message" nil t) |
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
655 (forward-line -1) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
656 (re-search-forward (format "^\\(%s\\)?$" mail-header-separator)) |
25535
2fe0f62fa349
(mh-forward): Get new subject line from the original,
Richard M. Stallman <rms@gnu.org>
parents:
24421
diff
changeset
|
657 (forward-line 1)) |
11332 | 658 (delete-other-windows) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
659 (mh-add-msgs-to-seq msgs 'forwarded t) |
11332 | 660 (mh-compose-and-send-mail draft "" folder msg-or-seq |
661 to forw-subject cc | |
662 mh-note-forw "Forwarded:" | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
663 config) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
664 (if compose |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
665 (setq mh-mml-compose-insert-flag t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
666 (mh-letter-mode-message))))) |
6365 | 667 |
668 (defun mh-forwarded-letter-subject (from subject) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
669 "Return a Subject suitable for a forwarded message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
670 Original message has headers FROM and SUBJECT." |
6365 | 671 (let ((addr-start (string-match "<" from)) |
672 (comment (string-match "(" from))) | |
673 (cond ((and addr-start (> addr-start 0)) | |
674 ;; Full Name <luser@host> | |
675 (setq from (substring from 0 (1- addr-start)))) | |
676 (comment | |
677 ;; luser@host (Full Name) | |
678 (setq from (substring from (1+ comment) (1- (length from))))))) | |
679 (format mh-forward-subject-format from subject)) | |
680 | |
681 ;;;###autoload | |
682 (defun mh-smail-other-window () | |
683 "Compose and send mail in other window with the MH mail system. | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
684 This function is an entry point to MH-E, the Emacs front end |
11332 | 685 to the MH mail system. |
686 | |
687 See documentation of `\\[mh-send]' for more details on composing mail." | |
6365 | 688 (interactive) |
689 (mh-find-path) | |
690 (call-interactively 'mh-send-other-window)) | |
691 | |
692 (defun mh-redistribute (to cc &optional msg) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
693 "Redistribute displayed message to recipients TO and CC. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
694 Use optional argument MSG to redistribute another message. |
6365 | 695 Depending on how your copy of MH was compiled, you may need to change the |
19936 | 696 setting of the variable `mh-redist-full-contents'. See its documentation." |
6365 | 697 (interactive (list (mh-read-address "Redist-To: ") |
698 (mh-read-address "Redist-Cc: ") | |
699 (mh-get-msg-num t))) | |
700 (or msg | |
701 (setq msg (mh-get-msg-num t))) | |
702 (save-window-excursion | |
703 (let ((folder mh-current-folder) | |
704 (draft (mh-read-draft "redistribution" | |
705 (if mh-redist-full-contents | |
706 (mh-msg-filename msg) | |
707 nil) | |
708 nil))) | |
709 (mh-goto-header-end 0) | |
710 (insert "Resent-To: " to "\n") | |
711 (if (not (equal cc "")) (insert "Resent-cc: " cc "\n")) | |
712 (mh-clean-msg-header (point-min) | |
713 "^Message-Id:\\|^Received:\\|^Return-Path:\\|^Sender:\\|^Date:\\|^From:" | |
714 nil) | |
715 (save-buffer) | |
716 (message "Redistributing...") | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
717 (if (not mh-redist-background) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
718 (if mh-redist-full-contents |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
719 (call-process "/bin/sh" nil 0 nil "-c" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
720 (format "mhdist=1 mhaltmsg=%s %s -push %s" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
721 buffer-file-name |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
722 (expand-file-name mh-send-prog mh-progs) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
723 buffer-file-name)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
724 (call-process "/bin/sh" nil 0 nil "-c" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
725 (format "mhdist=1 mhaltmsg=%s mhannotate=1 %s -push %s" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
726 (mh-msg-filename msg folder) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
727 (expand-file-name mh-send-prog mh-progs) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
728 buffer-file-name)))) |
6365 | 729 (mh-annotate-msg msg folder mh-note-dist |
730 "-component" "Resent:" | |
731 "-text" (format "\"%s %s\"" to cc)) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
732 (if mh-redist-background |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
733 (mh-exec-cmd-daemon "/bin/sh" "-c" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
734 (format "mhdist=1 mhaltmsg=%s %s %s %s" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
735 (if mh-redist-full-contents |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
736 buffer-file-name |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
737 (mh-msg-filename msg folder)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
738 (if mh-redist-full-contents |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
739 "" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
740 "mhannotate=1") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
741 (mh-expand-file-name "send" mh-progs) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
742 buffer-file-name))) |
6365 | 743 (kill-buffer draft) |
744 (message "Redistributing...done")))) | |
745 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
746 (defun mh-show-buffer-message-number (&optional buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
747 "Message number of displayed message in corresponding show buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
748 Return nil if show buffer not displayed. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
749 If in `mh-letter-mode', don't display the message number being replied to, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
750 but rather the message number of the show buffer associated with our |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
751 originating folder buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
752 Optional argument BUFFER can be used to specify the buffer." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
753 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
754 (if buffer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
755 (set-buffer buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
756 (cond ((eq major-mode 'mh-show-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
757 (let ((number-start (search "/" buffer-file-name :from-end t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
758 (car (read-from-string (subseq buffer-file-name |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
759 (1+ number-start)))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
760 ((and (eq major-mode 'mh-folder-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
761 mh-show-buffer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
762 (get-buffer mh-show-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
763 (mh-show-buffer-message-number mh-show-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
764 ((and (eq major-mode 'mh-letter-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
765 mh-sent-from-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
766 (get-buffer mh-sent-from-folder)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
767 (mh-show-buffer-message-number mh-sent-from-folder)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
768 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
769 nil)))) |
6365 | 770 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
771 (defun mh-reply (message &optional reply-to includep) |
11332 | 772 "Reply to MESSAGE (default: current message). |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
773 If the optional argument REPLY-TO is not given, prompts for type of addresses |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
774 to reply to: |
6365 | 775 from sender only, |
776 to sender and primary recipients, | |
777 cc/all sender and all recipients. | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
778 If optional prefix argument INCLUDEP provided, then include the message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
779 in the reply using filter `mhl.reply' in your MH directory. |
11332 | 780 If the file named by `mh-repl-formfile' exists, it is used as a skeleton |
781 for the reply. See also documentation for `\\[mh-send]' function." | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
782 (interactive (list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
783 (mh-get-msg-num t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
784 (let ((minibuffer-help-form |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
785 "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
786 (or mh-reply-default-reply-to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
787 (completing-read "Reply to whom? (from, to, all) [from]: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
788 '(("from") ("to") ("cc") ("all")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
789 nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
790 t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
791 current-prefix-arg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
792 (let* ((folder mh-current-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
793 (show-buffer mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
794 (config (current-window-configuration)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
795 (group-reply (or (equal reply-to "cc") (equal reply-to "all"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
796 (form-file (cond ((and mh-nmh-flag group-reply |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
797 (stringp mh-repl-group-formfile)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
798 mh-repl-group-formfile) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
799 ((stringp mh-repl-formfile) mh-repl-formfile) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
800 (t nil)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
801 (message "Composing a reply...") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
802 (mh-exec-cmd "repl" "-build" "-noquery" "-nodraftfolder" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
803 (if form-file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
804 (list "-form" form-file)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
805 mh-current-folder message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
806 (cond ((or (equal reply-to "from") (equal reply-to "")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
807 '("-nocc" "all")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
808 ((equal reply-to "to") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
809 '("-cc" "to")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
810 (group-reply (if mh-nmh-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
811 '("-group" "-nocc" "me") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
812 '("-cc" "all" "-nocc" "me")))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
813 (cond ((or (eq mh-yank-from-start-of-msg 'autosupercite) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
814 (eq mh-yank-from-start-of-msg 'autoattrib)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
815 '("-noformat")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
816 (includep '("-filter" "mhl.reply")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
817 (t '()))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
818 (let ((draft (mh-read-draft "reply" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
819 (expand-file-name "reply" mh-user-path) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
820 t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
821 (delete-other-windows) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
822 (save-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
823 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
824 (let ((to (mh-get-header-field "To:")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
825 (subject (mh-get-header-field "Subject:")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
826 (cc (mh-get-header-field "Cc:"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
827 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
828 (mh-goto-header-end 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
829 (or includep |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
830 (not mh-reply-show-message-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
831 (mh-in-show-buffer (show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
832 (mh-display-msg message folder))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
833 (mh-add-msgs-to-seq message 'answered t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
834 (message "Composing a reply...done") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
835 (mh-compose-and-send-mail draft "" folder message to subject cc |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
836 mh-note-repl "Replied:" config)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
837 (when (and (or (eq 'autosupercite mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
838 (eq 'autoattrib mh-yank-from-start-of-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
839 (eq (mh-show-buffer-message-number) mh-sent-from-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
840 (undo-boundary) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
841 (mh-yank-cur-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
842 (mh-letter-mode-message)))) |
6365 | 843 |
844 (defun mh-send (to cc subject) | |
845 "Compose and send a letter. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
846 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
847 Do not call this function from outside MH-E; use \\[mh-smail] instead. |
11332 | 848 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
849 The file named by `mh-comp-formfile' will be used as the form. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
850 The letter is composed in `mh-letter-mode'; see its documentation for more |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
851 details. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
852 If `mh-compose-letter-function' is defined, it is called on the draft and |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
853 passed three arguments: TO, CC, and SUBJECT." |
6365 | 854 (interactive (list |
855 (mh-read-address "To: ") | |
856 (mh-read-address "Cc: ") | |
857 (read-string "Subject: "))) | |
858 (let ((config (current-window-configuration))) | |
859 (delete-other-windows) | |
860 (mh-send-sub to cc subject config))) | |
861 | |
862 (defun mh-send-other-window (to cc subject) | |
863 "Compose and send a letter in another window. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
864 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
865 Do not call this function from outside MH-E; use \\[mh-smail-other-window] |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
866 instead. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
867 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
868 The file named by `mh-comp-formfile' will be used as the form. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
869 The letter is composed in `mh-letter-mode'; see its documentation for more |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
870 details. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
871 If `mh-compose-letter-function' is defined, it is called on the draft and |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
872 passed three arguments: TO, CC, and SUBJECT." |
6365 | 873 (interactive (list |
874 (mh-read-address "To: ") | |
875 (mh-read-address "Cc: ") | |
876 (read-string "Subject: "))) | |
877 (let ((pop-up-windows t)) | |
878 (mh-send-sub to cc subject (current-window-configuration)))) | |
879 | |
880 (defun mh-send-sub (to cc subject config) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
881 "Do the real work of composing and sending a letter. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
882 Expects the TO, CC, and SUBJECT fields as arguments. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
883 CONFIG is the window configuration before sending mail." |
6365 | 884 (let ((folder mh-current-folder) |
885 (msg-num (mh-get-msg-num nil))) | |
886 (message "Composing a message...") | |
887 (let ((draft (mh-read-draft | |
888 "message" | |
889 (let (components) | |
890 (cond | |
891 ((file-exists-p | |
892 (setq components | |
893 (expand-file-name mh-comp-formfile mh-user-path))) | |
894 components) | |
895 ((file-exists-p | |
896 (setq components | |
897 (expand-file-name mh-comp-formfile mh-lib))) | |
898 components) | |
28739
192cbf5dbea2
(mh-send-sub): Look for mh-comp-formfile in
Gerd Moellmann <gerd@gnu.org>
parents:
26393
diff
changeset
|
899 ((file-exists-p |
192cbf5dbea2
(mh-send-sub): Look for mh-comp-formfile in
Gerd Moellmann <gerd@gnu.org>
parents:
26393
diff
changeset
|
900 (setq components |
29420
25fb2df6c428
(mh-send-sub): Check mh-etc is bound before using it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28739
diff
changeset
|
901 (expand-file-name mh-comp-formfile |
25fb2df6c428
(mh-send-sub): Check mh-etc is bound before using it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28739
diff
changeset
|
902 ;; What is this mh-etc ?? -sm |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
903 ;; This is dead code, so |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
904 ;; remove it. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
905 ;(and (boundp 'mh-etc) mh-etc) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
906 ))) |
28739
192cbf5dbea2
(mh-send-sub): Look for mh-comp-formfile in
Gerd Moellmann <gerd@gnu.org>
parents:
26393
diff
changeset
|
907 components) |
6365 | 908 (t |
909 (error (format "Can't find components file \"%s\"" | |
910 components))))) | |
911 nil))) | |
912 (mh-insert-fields "To:" to "Subject:" subject "Cc:" cc) | |
913 (goto-char (point-max)) | |
914 (mh-compose-and-send-mail draft "" folder msg-num | |
915 to subject cc | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
916 nil nil config) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
917 (mh-letter-mode-message)))) |
6365 | 918 |
919 (defun mh-read-draft (use initial-contents delete-contents-file) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
920 "Read draft file into a draft buffer and make that buffer the current one. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
921 USE is a message used for prompting about the intended use of the message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
922 INITIAL-CONTENTS is filename that is read into an empty buffer, or nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
923 if buffer should not be modified. Delete the initial-contents file if |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
924 DELETE-CONTENTS-FILE flag is set. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
925 Returns the draft folder's name. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
926 If the draft folder facility is enabled in ~/.mh_profile, a new buffer is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
927 used each time and saved in the draft folder. The draft file can then be |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
928 reused." |
6365 | 929 (cond (mh-draft-folder |
930 (let ((orig-default-dir default-directory) | |
931 (draft-file-name (mh-new-draft-name))) | |
932 (pop-to-buffer (generate-new-buffer | |
933 (format "draft-%s" | |
934 (file-name-nondirectory draft-file-name)))) | |
935 (condition-case () | |
936 (insert-file-contents draft-file-name t) | |
937 (file-error)) | |
938 (setq default-directory orig-default-dir))) | |
939 (t | |
940 (let ((draft-name (expand-file-name "draft" mh-user-path))) | |
941 (pop-to-buffer "draft") ; Create if necessary | |
942 (if (buffer-modified-p) | |
943 (if (y-or-n-p "Draft has been modified; kill anyway? ") | |
944 (set-buffer-modified-p nil) | |
945 (error "Draft preserved"))) | |
946 (setq buffer-file-name draft-name) | |
947 (clear-visited-file-modtime) | |
948 (unlock-buffer) | |
949 (cond ((and (file-exists-p draft-name) | |
950 (not (equal draft-name initial-contents))) | |
951 (insert-file-contents draft-name) | |
952 (delete-file draft-name)))))) | |
953 (cond ((and initial-contents | |
954 (or (zerop (buffer-size)) | |
13385 | 955 (if (y-or-n-p |
956 (format "A draft exists. Use for %s? " use)) | |
957 (if mh-error-if-no-draft | |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
35975
diff
changeset
|
958 (error "A prior draft exists")) |
13385 | 959 t))) |
6365 | 960 (erase-buffer) |
961 (insert-file-contents initial-contents) | |
962 (if delete-contents-file (delete-file initial-contents)))) | |
963 (auto-save-mode 1) | |
964 (if mh-draft-folder | |
965 (save-buffer)) ; Do not reuse draft name | |
966 (buffer-name)) | |
967 | |
968 (defun mh-new-draft-name () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
969 "Return the pathname of folder for draft messages." |
6365 | 970 (save-excursion |
971 (mh-exec-cmd-quiet t "mhpath" mh-draft-folder "new") | |
972 (buffer-substring (point-min) (1- (point-max))))) | |
973 | |
974 (defun mh-annotate-msg (msg buffer note &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
975 "Mark MSG in BUFFER with character NOTE and annotate message with ARGS." |
6365 | 976 (apply 'mh-exec-cmd "anno" buffer msg args) |
977 (save-excursion | |
978 (cond ((get-buffer buffer) ; Buffer may be deleted | |
979 (set-buffer buffer) | |
980 (if (symbolp msg) | |
981 (mh-notate-seq msg note (1+ mh-cmd-note)) | |
982 (mh-notate msg note (1+ mh-cmd-note))))))) | |
983 | |
984 (defun mh-insert-fields (&rest name-values) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
985 "Insert the NAME-VALUES pairs in the current buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
986 If the field exists, append the value to it. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
987 Do not insert any pairs whose value is the empty string." |
6365 | 988 (let ((case-fold-search t)) |
989 (while name-values | |
990 (let ((field-name (car name-values)) | |
991 (value (car (cdr name-values)))) | |
992 (cond ((equal value "") | |
993 nil) | |
994 ((mh-position-on-field field-name) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
995 (insert " " (or value ""))) |
6365 | 996 (t |
997 (insert field-name " " value "\n"))) | |
998 (setq name-values (cdr (cdr name-values))))))) | |
999 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1000 (defun mh-position-on-field (field &optional ignored) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1001 "Move to the end of the FIELD in the header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1002 Move to end of entire header if FIELD not found. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1003 Returns non-nil iff FIELD was found. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1004 The optional second arg is for pre-version 4 compatibility and is IGNORED." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1005 (cond ((mh-goto-header-field field) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1006 (mh-header-field-end) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1007 t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1008 ((mh-goto-header-end 0) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1009 nil))) |
11332 | 1010 |
1011 (defun mh-get-header-field (field) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1012 "Find and return the body of FIELD in the mail header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1013 Returns the empty string if the field is not in the header of the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1014 current buffer." |
11332 | 1015 (if (mh-goto-header-field field) |
1016 (progn | |
1017 (skip-chars-forward " \t") ;strip leading white space in body | |
1018 (let ((start (point))) | |
1019 (mh-header-field-end) | |
1020 (buffer-substring start (point)))) | |
1021 "")) | |
1022 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1023 (fset 'mh-get-field 'mh-get-header-field) ;MH-E 4 compatibility |
6365 | 1024 |
11332 | 1025 (defun mh-goto-header-field (field) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1026 "Move to FIELD in the message header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1027 Move to the end of the FIELD name, which should end in a colon. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1028 Returns t if found, nil if not." |
11332 | 1029 (goto-char (point-min)) |
1030 (let ((case-fold-search t) | |
1031 (headers-end (save-excursion | |
1032 (mh-goto-header-end 0) | |
1033 (point)))) | |
1034 (re-search-forward (format "^%s" field) headers-end t))) | |
1035 | |
6365 | 1036 (defun mh-goto-header-end (arg) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1037 "Move the cursor ARG lines after the header." |
11507 | 1038 (if (re-search-forward "^-*$" nil nil) |
6365 | 1039 (forward-line arg))) |
1040 | |
1041 | |
1042 (defun mh-read-address (prompt) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1043 "Read a To: or Cc: address, prompting in the minibuffer with PROMPT. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1044 May someday do completion on aliases." |
6365 | 1045 (read-string prompt)) |
1046 | |
1047 | |
1048 | |
1049 ;;; Mode for composing and sending a draft message. | |
1050 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1051 (put 'mh-letter-mode 'mode-class 'special) |
6365 | 1052 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1053 ;;; Support for emacs21 toolbar using gnus/message.el icons (and code). |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1054 (eval-when-compile (defvar tool-bar-map)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1055 (defvar mh-letter-tool-bar-map nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1056 (when (and (fboundp 'tool-bar-add-item) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1057 tool-bar-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1058 (setq mh-letter-tool-bar-map |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1059 (let ((tool-bar-map (make-sparse-keymap))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1060 (tool-bar-add-item "mail_send" 'mh-send-letter 'mh-lettertoolbar-send |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1061 :help "Send this letter") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1062 (tool-bar-add-item "attach" 'mh-compose-insertion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1063 'mh-lettertoolbar-compose |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1064 :help "Insert attachment") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1065 (tool-bar-add-item "spell" 'ispell-message 'mh-lettertoolbar-ispell |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1066 :help "Check spelling") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1067 (tool-bar-add-item-from-menu 'save-buffer "save") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1068 (tool-bar-add-item-from-menu 'undo "undo") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1069 (tool-bar-add-item-from-menu 'kill-region "cut") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1070 (tool-bar-add-item-from-menu 'menu-bar-kill-ring-save "copy") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1071 (tool-bar-add-item "close" 'mh-fully-kill-draft 'mh-lettertoolbar-kill |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1072 :help "Kill this draft") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1073 (tool-bar-add-item "preferences" (lambda () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1074 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1075 (customize-group "mh-compose")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1076 'mh-lettertoolbar-customize |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1077 :help "MH-E composition preferences") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1078 (tool-bar-add-item "help" (lambda () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1079 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1080 (Info-goto-node "(mh-e)Draft Editing")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1081 'mh-lettertoolbar-help :help "Help") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1082 tool-bar-map))) |
6365 | 1083 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1084 ;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1085 (eval-when-compile (defvar mh-letter-menu nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1086 (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1087 ((fboundp 'easy-menu-define) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1088 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1089 mh-letter-menu mh-letter-mode-map "Menu for MH-E letter mode." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1090 '("Letter" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1091 ["Send This Draft" mh-send-letter t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1092 ["Split Current Line" mh-open-line t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1093 ["Check Recipient" mh-check-whom t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1094 ["Yank Current Message" mh-yank-cur-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1095 ["Insert a Message..." mh-insert-letter t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1096 ["Insert Signature" mh-insert-signature t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1097 ["GPG Sign message" mh-mml-secure-message-sign-pgpmime mh-gnus-pgp-support-flag] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1098 ["GPG Encrypt message" mh-mml-secure-message-encrypt-pgpmime mh-gnus-pgp-support-flag] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1099 ["Compose Insertion (MIME)..." mh-compose-insertion t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1100 ;; ["Compose Compressed tar (MIME)..." mh-mhn-compose-external-compressed-tar t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1101 ;; ["Compose Anon FTP (MIME)..." mh-mhn-compose-anon-ftp t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1102 ["Compose Forward (MIME)..." mh-compose-forward t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1103 ;; The next two will have to be merged. But I also need to make sure the user |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1104 ;; can't mix directives of both types. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1105 ["Pull in All Compositions (mhn)" mh-edit-mhn mh-mhn-compose-insert-flag] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1106 ["Pull in All Compositions (gnus)" mh-mml-to-mime mh-mml-compose-insert-flag] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1107 ["Revert to Non-MIME Edit (mhn)" mh-revert-mhn-edit (equal mh-compose-insertion 'mhn)] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1108 ["Kill This Draft" mh-fully-kill-draft t])))) |
6365 | 1109 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1110 ;;; Help Messages |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1111 ;;; Group messages logically, more or less. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1112 (defvar mh-letter-mode-help-messages |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1113 '((nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1114 "Send letter: \\[mh-send-letter]" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1115 "\t\tOpen line: \\[mh-open-line]\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1116 "Kill letter: \\[mh-fully-kill-draft]" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1117 "\t\tInsert:\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1118 "Check recipients: \\[mh-check-whom]" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1119 "\t\t Current message: \\[mh-yank-cur-msg]\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1120 "Encrypt message: \\[mh-mml-secure-message-encrypt-pgpmime]" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1121 "\t\t Attachment: \\[mh-compose-insertion]\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1122 "Sign message: \\[mh-mml-secure-message-sign-pgpmime]" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1123 "\t\t Message to forward: \\[mh-compose-forward]\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1124 " " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1125 "\t\t Signature: \\[mh-insert-signature]")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1126 "Key binding cheat sheet. |
6365 | 1127 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1128 This is an associative array which is used to show the most common commands. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1129 The key is a prefix char. The value is one or more strings which are |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1130 concatenated together and displayed in the minibuffer if ? is pressed after |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1131 the prefix character. The special key nil is used to display the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1132 non-prefixed commands. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1133 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1134 The substitutions described in `substitute-command-keys' are performed as |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1135 well.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1136 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1137 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1138 (defun mh-fill-paragraph-function (arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1139 "Fill paragraph at or after point. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1140 Prefix ARG means justify as well. This function enables `fill-paragraph' to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1141 work better in MH-Letter mode." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1142 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1143 (let ((fill-paragraph-function) (fill-prefix)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1144 (if (mh-in-header-p) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1145 (mail-mode-fill-paragraph arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1146 (fill-paragraph arg)))) |
6365 | 1147 |
1148 ;;;###autoload | |
29420
25fb2df6c428
(mh-send-sub): Check mh-etc is bound before using it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28739
diff
changeset
|
1149 (define-derived-mode mh-letter-mode text-mode "MH-Letter" |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1150 "Mode for composing letters in MH-E.\\<mh-letter-mode-map> |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1151 |
11332 | 1152 When you have finished composing, type \\[mh-send-letter] to send the message |
1153 using the MH mail handling system. | |
6365 | 1154 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1155 If MH MIME directives are added manually, you must first run \\[mh-edit-mhn] |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1156 before sending the message. MIME directives that are added by MH-E commands |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1157 such as \\[mh-mhn-compose-insertion] are processed automatically when the |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1158 message is sent. |
6365 | 1159 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1160 Options that control this mode can be changed with |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1161 \\[customize-group]; specify the \"mh-compose\" group. |
11332 | 1162 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1163 When a message is composed, the hooks `text-mode-hook' and |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1164 `mh-letter-mode-hook' are run. |
6365 | 1165 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1166 \\{mh-letter-mode-map}" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1167 |
6365 | 1168 (or mh-user-path (mh-find-path)) |
1169 (make-local-variable 'mh-send-args) | |
1170 (make-local-variable 'mh-annotate-char) | |
1171 (make-local-variable 'mh-annotate-field) | |
1172 (make-local-variable 'mh-previous-window-config) | |
1173 (make-local-variable 'mh-sent-from-folder) | |
1174 (make-local-variable 'mh-sent-from-msg) | |
1175 (make-local-variable 'mail-header-separator) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1176 (setq mail-header-separator mh-mail-header-separator) ;override sendmail.el |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1177 (make-local-variable 'mh-help-messages) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1178 (setq mh-help-messages mh-letter-mode-help-messages) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1179 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1180 ;; From sendmail.el for proper paragraph fill |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1181 ;; sendmail.el also sets a normal-auto-fill-function (not done here) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1182 (make-local-variable 'paragraph-separate) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1183 (make-local-variable 'paragraph-start) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1184 (make-local-variable 'fill-paragraph-function) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1185 (setq fill-paragraph-function 'mh-fill-paragraph-function) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1186 (make-local-variable 'adaptive-fill-regexp) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1187 (setq adaptive-fill-regexp |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1188 (concat adaptive-fill-regexp |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1189 "\\|[ \t]*[-[:alnum:]]*>+[ \t]*")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1190 (make-local-variable 'adaptive-fill-first-line-regexp) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1191 (setq adaptive-fill-first-line-regexp |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1192 (concat adaptive-fill-first-line-regexp |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1193 "\\|[ \t]*[-[:alnum:]]*>+[ \t]*")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1194 ;; `-- ' precedes the signature. `-----' appears at the start of the |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1195 ;; lines that delimit forwarded messages. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1196 ;; Lines containing just >= 3 dashes, perhaps after whitespace, |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1197 ;; are also sometimes used and should be separators. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1198 (setq paragraph-start (concat (regexp-quote mail-header-separator) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1199 "\\|\t*\\([-|#;>* ]\\|(?[0-9]+[.)]\\)+$" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1200 "\\|[ \t]*[[:alnum:]]*>+[ \t]*$\\|[ \t]*$\\|" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1201 "-- $\\|---+$\\|" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1202 page-delimiter)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1203 (setq paragraph-separate paragraph-start) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1204 ;; --- End of code from sendmail.el --- |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1205 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1206 (if (and (boundp 'tool-bar-mode) tool-bar-mode) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1207 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1208 (make-local-variable 'font-lock-defaults) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1209 (cond |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1210 ((or (equal mh-highlight-citation-p 'font-lock) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1211 (equal mh-highlight-citation-p 'gnus)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1212 ;; Let's use font-lock even if gnus is used in show-mode. The reason |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1213 ;; is that gnus uses static text properties which are not appropriate |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1214 ;; for a buffer that will be edited. So the choice here is either fontify |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1215 ;; the citations and header... |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1216 (setq font-lock-defaults '(mh-show-font-lock-keywords-with-cite t))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1217 (t |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1218 ;; ...or the header only |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1219 (setq font-lock-defaults '(mh-show-font-lock-keywords t)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1220 (easy-menu-add mh-letter-menu) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1221 ;; See if a "forw: -mime" message containing a MIME composition. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1222 ;; mode clears local vars, so can't do this in mh-forward. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1223 (save-excursion |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1224 (goto-char (point-min)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1225 (when (and (re-search-forward (format "^\\(%s\\)?$" mail-header-separator) nil t) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1226 (= 0 (forward-line 1)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1227 (looking-at "^#forw")) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1228 (require 'mh-mime) ;Need mh-mhn-compose-insert-flag local var |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1229 (setq mh-mhn-compose-insert-flag t))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1230 (setq fill-column mh-letter-fill-column) |
6365 | 1231 ;; if text-mode-hook turned on auto-fill, tune it for messages |
29420
25fb2df6c428
(mh-send-sub): Check mh-etc is bound before using it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28739
diff
changeset
|
1232 (when auto-fill-function |
25fb2df6c428
(mh-send-sub): Check mh-etc is bound before using it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28739
diff
changeset
|
1233 (make-local-variable 'auto-fill-function) |
25fb2df6c428
(mh-send-sub): Check mh-etc is bound before using it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28739
diff
changeset
|
1234 (setq auto-fill-function 'mh-auto-fill-for-letter))) |
6365 | 1235 |
1236 (defun mh-auto-fill-for-letter () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1237 "Perform auto-fill for message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1238 Header is treated specially by inserting a tab before continuation lines." |
6365 | 1239 (if (mh-in-header-p) |
11507 | 1240 (let ((fill-prefix "\t")) |
1241 (do-auto-fill)) | |
1242 (do-auto-fill))) | |
6365 | 1243 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1244 (defun mh-insert-header-separator () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1245 "Insert `mh-mail-header-separator', if absent." |
6365 | 1246 (save-excursion |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1247 (goto-char (point-min)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1248 (rfc822-goto-eoh) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1249 (if (looking-at "$") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1250 (insert mh-mail-header-separator)))) |
6365 | 1251 |
1252 (defun mh-to-field () | |
1253 "Move point to the end of a specified header field. | |
1254 The field is indicated by the previous keystroke (the last keystroke | |
19936 | 1255 of the command) according to the list in the variable `mh-to-field-choices'. |
6365 | 1256 Create the field if it does not exist. Set the mark to point before moving." |
1257 (interactive) | |
1258 (expand-abbrev) | |
11332 | 1259 (let ((target (cdr (or (assoc (char-to-string (logior last-input-char ?`)) |
1260 mh-to-field-choices) | |
1261 ;; also look for a char for version 4 compat | |
1262 (assoc (logior last-input-char ?`) mh-to-field-choices)))) | |
6365 | 1263 (case-fold-search t)) |
1264 (push-mark) | |
1265 (cond ((mh-position-on-field target) | |
1266 (let ((eol (point))) | |
1267 (skip-chars-backward " \t") | |
1268 (delete-region (point) eol)) | |
1269 (if (and (not (eq (logior last-input-char ?`) ?s)) | |
1270 (save-excursion | |
1271 (backward-char 1) | |
1272 (not (looking-at "[:,]")))) | |
1273 (insert ", ") | |
1274 (insert " "))) | |
1275 (t | |
1276 (if (mh-position-on-field "To:") | |
1277 (forward-line 1)) | |
1278 (insert (format "%s \n" target)) | |
1279 (backward-char 1))))) | |
1280 | |
1281 (defun mh-to-fcc (&optional folder) | |
1282 "Insert an Fcc: FOLDER field in the current message. | |
1283 Prompt for the field name with a completion list of the current folders." | |
1284 (interactive) | |
1285 (or folder | |
1286 (setq folder (mh-prompt-for-folder | |
1287 "Fcc" | |
11332 | 1288 (or (and mh-default-folder-for-message-function |
6365 | 1289 (save-excursion |
1290 (goto-char (point-min)) | |
11332 | 1291 (funcall mh-default-folder-for-message-function))) |
6365 | 1292 "") |
1293 t))) | |
1294 (let ((last-input-char ?\C-f)) | |
1295 (expand-abbrev) | |
1296 (save-excursion | |
1297 (mh-to-field) | |
1298 (insert (if (mh-folder-name-p folder) | |
1299 (substring folder 1) | |
1300 folder))))) | |
1301 | |
1302 (defun mh-insert-signature () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1303 "Insert the file named by `mh-signature-file-name' at point. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1304 The value of `mh-letter-insert-signature-hook' is a list of functions to be |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1305 called, with no arguments, before the signature is actually inserted." |
6365 | 1306 (interactive) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1307 (let ((mh-signature-file-name mh-signature-file-name)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1308 (run-hooks 'mh-letter-insert-signature-hook) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1309 (if mh-signature-file-name |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1310 (insert-file-contents mh-signature-file-name))) |
11578
d8480e4513ea
(mh-insert-signature): Use force-mode-line-update.
Karl Heuer <kwzh@gnu.org>
parents:
11507
diff
changeset
|
1311 (force-mode-line-update)) |
6365 | 1312 |
1313 (defun mh-check-whom () | |
11332 | 1314 "Verify recipients of the current letter, showing expansion of any aliases." |
6365 | 1315 (interactive) |
11332 | 1316 (let ((file-name buffer-file-name)) |
6365 | 1317 (save-buffer) |
1318 (message "Checking recipients...") | |
1319 (mh-in-show-buffer ("*Recipients*") | |
1320 (bury-buffer (current-buffer)) | |
1321 (erase-buffer) | |
1322 (mh-exec-cmd-output "whom" t file-name)) | |
1323 (message "Checking recipients...done"))) | |
1324 | |
1325 | |
1326 | |
1327 ;;; Routines to compose and send a letter. | |
1328 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1329 (defun mh-insert-x-face () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1330 "Append X-Face field to header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1331 If the field already exists, this function does nothing." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1332 (when (and (file-exists-p mh-x-face-file) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1333 (file-readable-p mh-x-face-file)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1334 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1335 (when (null (mh-position-on-field "X-Face")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1336 (insert "X-Face: ") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1337 (goto-char (+ (point) (cadr (insert-file-contents mh-x-face-file)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1338 (if (not (looking-at "^")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1339 (insert "\n")))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1340 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1341 (defun mh-insert-x-mailer () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1342 "Append an X-Mailer field to the header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1343 The versions of MH-E, Emacs, and MH are shown." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1344 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1345 ;; Lazily initialize mh-x-mailer-string. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1346 (when (null mh-x-mailer-string) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1347 (save-window-excursion |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1348 (mh-version) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1349 (set-buffer mh-temp-buffer) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1350 (if mh-nmh-flag |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1351 (search-forward-regexp "^nmh-\\(\\S +\\)") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1352 (search-forward-regexp "^MH \\(\\S +\\)" nil t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1353 (let ((x-mailer-mh (buffer-substring (match-beginning 1) (match-end 1)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1354 (setq mh-x-mailer-string |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1355 (format "MH-E %s; %s %s; %s %d.%d" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1356 mh-version (if mh-nmh-flag "nmh" "MH") x-mailer-mh |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1357 (if mh-xemacs-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1358 "XEmacs" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1359 "Emacs") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1360 emacs-major-version emacs-minor-version))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1361 (kill-buffer mh-temp-buffer))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1362 ;; Insert X-Mailer, but only if it doesn't already exist. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1363 (save-excursion |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1364 (when (null (mh-goto-header-field "X-Mailer")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1365 (mh-insert-fields "X-Mailer:" mh-x-mailer-string)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1366 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1367 (defun mh-regexp-in-field-p (regexp &rest fields) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1368 "Non-nil means REGEXP was found in FIELDS." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1369 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1370 (let ((search-result nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1371 (field)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1372 (while fields |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1373 (setq field (car fields)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1374 (if (and (mh-goto-header-field field) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1375 (re-search-forward |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1376 regexp (save-excursion (mh-header-field-end)(point)) t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1377 (setq fields nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1378 search-result t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1379 (setq fields (cdr fields)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1380 search-result))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1381 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1382 (defun mh-insert-mail-followup-to () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1383 "Insert Mail-Followup-To: if To or Cc match `mh-insert-mail-followup-to-list'." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1384 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1385 (if (and (or (mh-goto-header-field "To:")(mh-goto-header-field "cc:")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1386 (not (mh-goto-header-field "Mail-Followup-To: "))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1387 (let ((list mh-insert-mail-followup-to-list)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1388 (while list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1389 (let ((regexp (nth 0 (car list))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1390 (entry (nth 1 (car list)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1391 (when (mh-regexp-in-field-p regexp "To:" "cc:") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1392 (if (mh-goto-header-field "Mail-Followup-To: ") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1393 (insert entry ", ") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1394 (mh-goto-header-end 0) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1395 (insert "Mail-Followup-To: " entry "\n"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1396 (setq list (cdr list)))))))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1397 |
6365 | 1398 (defun mh-compose-and-send-mail (draft send-args |
1399 sent-from-folder sent-from-msg | |
1400 to subject cc | |
1401 annotate-char annotate-field | |
1402 config) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1403 "Edit and compose a draft message in buffer DRAFT and send or save it. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1404 SEND-ARGS is the argument passed to the send command. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1405 SENT-FROM-FOLDER is buffer containing scan listing of current folder, or |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1406 nil if none exists. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1407 SENT-FROM-MSG is the message number or sequence name or nil. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1408 The TO, SUBJECT, and CC fields are passed to the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1409 `mh-compose-letter-function'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1410 If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1411 message. In that case, the ANNOTATE-FIELD is used to build a string |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1412 for `mh-annotate-msg'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1413 CONFIG is the window configuration to restore after sending the letter." |
6365 | 1414 (pop-to-buffer draft) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1415 (if mh-insert-mail-followup-to-flag (mh-insert-mail-followup-to)) |
6365 | 1416 (mh-letter-mode) |
1417 (setq mh-sent-from-folder sent-from-folder) | |
1418 (setq mh-sent-from-msg sent-from-msg) | |
1419 (setq mh-send-args send-args) | |
1420 (setq mh-annotate-char annotate-char) | |
1421 (setq mh-annotate-field annotate-field) | |
1422 (setq mh-previous-window-config config) | |
1423 (setq mode-line-buffer-identification (list "{%b}")) | |
1424 (if (and (boundp 'mh-compose-letter-function) | |
11332 | 1425 mh-compose-letter-function) |
6365 | 1426 ;; run-hooks will not pass arguments. |
11332 | 1427 (let ((value mh-compose-letter-function)) |
6365 | 1428 (if (and (listp value) (not (eq (car value) 'lambda))) |
1429 (while value | |
1430 (funcall (car value) to subject cc) | |
1431 (setq value (cdr value))) | |
1432 (funcall mh-compose-letter-function to subject cc))))) | |
1433 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1434 (defun mh-letter-mode-message () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1435 "Display a help message for users of `mh-letter-mode'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1436 This should be the last function called when composing the draft." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1437 (message "%s" (substitute-command-keys |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1438 (concat "Type \\[mh-send-letter] to send message, " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1439 "\\[mh-help] for help.")))) |
6365 | 1440 |
1441 (defun mh-send-letter (&optional arg) | |
1442 "Send the draft letter in the current buffer. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1443 If optional prefix argument ARG is provided, monitor delivery. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1444 The value of `mh-before-send-letter-hook' is a list of functions to be called, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1445 with no arguments, before doing anything. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1446 Run `\\[mh-edit-mhn]' if variable `mh-mhn-compose-insert-flag' is set." |
6365 | 1447 (interactive "P") |
1448 (run-hooks 'mh-before-send-letter-hook) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1449 (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1450 ((and (boundp 'mh-mhn-compose-insert-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1451 mh-mhn-compose-insert-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1452 (mh-edit-mhn)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1453 ((and (boundp 'mh-mml-compose-insert-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1454 mh-mml-compose-insert-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1455 (mh-mml-to-mime))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1456 (if mh-insert-x-mailer-flag (mh-insert-x-mailer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1457 (mh-insert-x-face) |
6365 | 1458 (save-buffer) |
1459 (message "Sending...") | |
1460 (let ((draft-buffer (current-buffer)) | |
11332 | 1461 (file-name buffer-file-name) |
19936 | 1462 (config mh-previous-window-config) |
1463 (coding-system-for-write | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1464 (if (and (local-variable-p 'buffer-file-coding-system |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1465 (current-buffer)) ;XEmacs needs two args |
19952 | 1466 ;; We're not sure why, but buffer-file-coding-system |
1467 ;; tends to get set to undecided-unix. | |
1468 (not (memq buffer-file-coding-system | |
1469 '(undecided undecided-unix undecided-dos)))) | |
19936 | 1470 buffer-file-coding-system |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1471 (or (and (boundp 'sendmail-coding-system) sendmail-coding-system) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1472 (and (boundp 'default-buffer-file-coding-system ) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1473 default-buffer-file-coding-system) |
19936 | 1474 'iso-latin-1)))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1475 ;; The default BCC encapsulation will make a MIME message unreadable. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1476 ;; With nmh use the -mime arg to prevent this. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1477 (if (and mh-nmh-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1478 (mh-goto-header-field "Bcc:") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1479 (mh-goto-header-field "Content-Type:")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1480 (setq mh-send-args (format "-mime %s" mh-send-args))) |
6365 | 1481 (cond (arg |
1482 (pop-to-buffer "MH mail delivery") | |
1483 (erase-buffer) | |
1484 (mh-exec-cmd-output mh-send-prog t "-watch" "-nopush" | |
1485 "-nodraftfolder" mh-send-args file-name) | |
1486 (goto-char (point-max)) ; show the interesting part | |
1487 (recenter -1) | |
1488 (set-buffer draft-buffer)) ; for annotation below | |
1489 (t | |
1490 (mh-exec-cmd-daemon mh-send-prog "-nodraftfolder" "-noverbose" | |
1491 mh-send-args file-name))) | |
1492 (if mh-annotate-char | |
1493 (mh-annotate-msg mh-sent-from-msg | |
1494 mh-sent-from-folder | |
1495 mh-annotate-char | |
1496 "-component" mh-annotate-field | |
1497 "-text" (format "\"%s %s\"" | |
11332 | 1498 (mh-get-header-field "To:") |
1499 (mh-get-header-field "Cc:")))) | |
6365 | 1500 |
1501 (cond ((or (not arg) | |
1502 (y-or-n-p "Kill draft buffer? ")) | |
1503 (kill-buffer draft-buffer) | |
1504 (if config | |
1505 (set-window-configuration config)))) | |
1506 (if arg | |
1507 (message "Sending...done") | |
1508 (message "Sending...backgrounded")))) | |
1509 | |
11332 | 1510 (defun mh-insert-letter (folder message verbatim) |
1511 "Insert a message into the current letter. | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1512 Removes the message's headers using `mh-invisible-headers'. Prefixes each |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1513 non-blank line with `mh-ins-buf-prefix', unless `mh-yank-from-start-of-msg' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1514 is set for supercite and then use it to format the message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1515 Prompts for FOLDER and MESSAGE. If prefix argument VERBATIM provided, do |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1516 not indent and do not delete headers. Leaves the mark before the letter |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1517 and point after it." |
6365 | 1518 (interactive |
11332 | 1519 (list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) |
1520 (read-input (format "Message number%s: " | |
6365 | 1521 (if mh-sent-from-msg |
1522 (format " [%d]" mh-sent-from-msg) | |
11332 | 1523 ""))) |
6365 | 1524 current-prefix-arg)) |
1525 (save-restriction | |
1526 (narrow-to-region (point) (point)) | |
1527 (let ((start (point-min))) | |
11332 | 1528 (if (equal message "") (setq message (int-to-string mh-sent-from-msg))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1529 (insert-file-contents |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1530 (expand-file-name message (mh-expand-file-name folder))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1531 (when (not verbatim) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1532 (mh-clean-msg-header start mh-invisible-headers mh-visible-headers) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1533 (goto-char (point-max)) ;Needed for sc-cite-original |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1534 (push-mark) ;Needed for sc-cite-original |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1535 (goto-char (point-min)) ;Needed for sc-cite-original |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1536 (mh-insert-prefix-string mh-ins-buf-prefix))))) |
6365 | 1537 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1538 (defun mh-extract-from-attribution () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1539 "Extract phrase or comment from From header field." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1540 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1541 (if (not (mh-goto-header-field "From: ")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1542 nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1543 (skip-chars-forward " ") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1544 (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1545 ((looking-at "\"\\([^\"\n]+\\)\" \\(<.+>\\)") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1546 (format "%s %s %s" (match-string 1)(match-string 2) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1547 mh-extract-from-attribution-verb)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1548 ((looking-at "\\([^<\n]+<.+>\\)$") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1549 (format "%s %s" (match-string 1) mh-extract-from-attribution-verb)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1550 ((looking-at "\\([^ ]+@[^ ]+\\) +(\\(.+\\))$") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1551 (format "%s <%s> %s" (match-string 2)(match-string 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1552 mh-extract-from-attribution-verb)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1553 ((looking-at " *\\(.+\\)$") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1554 (format "%s %s" (match-string 1) mh-extract-from-attribution-verb)))))) |
6365 | 1555 |
1556 (defun mh-yank-cur-msg () | |
1557 "Insert the current message into the draft buffer. | |
1558 Prefix each non-blank line in the message with the string in | |
1559 `mh-ins-buf-prefix'. If a region is set in the message's buffer, then | |
1560 only the region will be inserted. Otherwise, the entire message will | |
1561 be inserted if `mh-yank-from-start-of-msg' is non-nil. If this variable | |
1562 is nil, the portion of the message following the point will be yanked. | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1563 If `mh-delete-yanked-msg-window-flag' is non-nil, any window displaying the |
6365 | 1564 yanked message will be deleted." |
1565 (interactive) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1566 (if (and mh-sent-from-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1567 (save-excursion (set-buffer mh-sent-from-folder) mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1568 (save-excursion (set-buffer mh-sent-from-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1569 (get-buffer mh-show-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1570 mh-sent-from-msg) |
6365 | 1571 (let ((to-point (point)) |
1572 (to-buffer (current-buffer))) | |
1573 (set-buffer mh-sent-from-folder) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1574 (if mh-delete-yanked-msg-window-flag |
6365 | 1575 (delete-windows-on mh-show-buffer)) |
1576 (set-buffer mh-show-buffer) ; Find displayed message | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1577 (let* ((from-attr (mh-extract-from-attribution)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1578 (yank-region (mh-mark-active-p nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1579 (mh-ins-str |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1580 (cond ((and yank-region |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1581 (or (eq 'supercite mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1582 (eq 'autosupercite mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1583 (eq t mh-yank-from-start-of-msg))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1584 ;; supercite needs the full header |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1585 (concat |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1586 (buffer-substring (point-min) (mail-header-end)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1587 "\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1588 (buffer-substring (region-beginning) (region-end)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1589 (yank-region |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1590 (buffer-substring (region-beginning) (region-end))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1591 ((or (eq 'body mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1592 (eq 'attribution |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1593 mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1594 (eq 'autoattrib |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1595 mh-yank-from-start-of-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1596 (buffer-substring |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1597 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1598 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1599 (mh-goto-header-end 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1600 (point)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1601 (point-max))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1602 ((or (eq 'supercite mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1603 (eq 'autosupercite mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1604 (eq t mh-yank-from-start-of-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1605 (buffer-substring (point-min) (point-max))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1606 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1607 (buffer-substring (point) (point-max)))))) |
6365 | 1608 (set-buffer to-buffer) |
11332 | 1609 (save-restriction |
1610 (narrow-to-region to-point to-point) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1611 (insert (mh-filter-out-non-text mh-ins-str)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1612 (goto-char (point-max)) ;Needed for sc-cite-original |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1613 (push-mark) ;Needed for sc-cite-original |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1614 (goto-char (point-min)) ;Needed for sc-cite-original |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1615 (mh-insert-prefix-string mh-ins-buf-prefix) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1616 (if (or (eq 'attribution mh-yank-from-start-of-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1617 (eq 'autoattrib mh-yank-from-start-of-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1618 (insert from-attr "\n\n")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1619 ;; If the user has selected a region, he has already "edited" the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1620 ;; text, so leave the cursor at the end of the yanked text. In |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1621 ;; either case, leave a mark at the opposite end of the included |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1622 ;; text to make it easy to jump or delete to the other end of the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1623 ;; text. |
11332 | 1624 (push-mark) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1625 (goto-char (point-max)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1626 (if (null yank-region) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1627 (mh-exchange-point-and-mark-preserving-active-mark))))) |
11332 | 1628 (error "There is no current message"))) |
6365 | 1629 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1630 (defun mh-filter-out-non-text (string) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1631 "Return STRING but without adornments such as MIME buttons and smileys." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1632 (with-temp-buffer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1633 ;; Insert the string to filter |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1634 (insert string) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1635 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1636 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1637 ;; Remove the MIME buttons |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1638 (let ((can-move-forward t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1639 (in-button nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1640 (while can-move-forward |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1641 (cond ((and (not (get-text-property (point) 'mh-data)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1642 in-button) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1643 (delete-region (save-excursion (forward-line -1) (point)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1644 (point)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1645 (setq in-button nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1646 ((get-text-property (point) 'mh-data) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1647 (delete-region (point) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1648 (save-excursion (forward-line) (point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1649 (setq in-button t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1650 (t (setq can-move-forward (= (forward-line) 0)))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1651 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1652 ;; Return the contents without properties... This gets rid of emphasis |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1653 ;; and smileys |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1654 (buffer-substring-no-properties (point-min) (point-max)))) |
6365 | 1655 |
1656 (defun mh-insert-prefix-string (mh-ins-string) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1657 "Insert prefix string before each line in buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1658 The inserted letter is cited using `sc-cite-original' if |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1659 `mh-yank-from-start-of-msg' is one of 'supercite or 'autosupercite. Otherwise, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1660 simply insert MH-INS-STRING before each line." |
11332 | 1661 (goto-char (point-min)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1662 (cond ((or (eq mh-yank-from-start-of-msg 'supercite) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1663 (eq mh-yank-from-start-of-msg 'autosupercite)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1664 (sc-cite-original)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1665 (mail-citation-hook |
11332 | 1666 (run-hooks 'mail-citation-hook)) |
1667 (mh-yank-hooks ;old hook name | |
1668 (run-hooks 'mh-yank-hooks)) | |
1669 (t | |
1670 (or (bolp) (forward-line 1)) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1671 (while (< (point) (point-max)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1672 (insert mh-ins-string) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1673 (forward-line 1)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1674 (goto-char (point-min))))) ;leave point like sc-cite-original |
6365 | 1675 |
1676 (defun mh-fully-kill-draft () | |
1677 "Kill the draft message file and the draft message buffer. | |
1678 Use \\[kill-buffer] if you don't want to delete the draft message file." | |
1679 (interactive) | |
1680 (if (y-or-n-p "Kill draft message? ") | |
1681 (let ((config mh-previous-window-config)) | |
11332 | 1682 (if (file-exists-p buffer-file-name) |
1683 (delete-file buffer-file-name)) | |
6365 | 1684 (set-buffer-modified-p nil) |
1685 (kill-buffer (buffer-name)) | |
1686 (message "") | |
1687 (if config | |
1688 (set-window-configuration config))) | |
1689 (error "Message not killed"))) | |
1690 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1691 (defun mh-current-fill-prefix () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1692 "Return the `fill-prefix' on the current line as a string." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1693 (save-excursion |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1694 (beginning-of-line) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1695 ;; This assumes that the major-mode sets up adaptive-fill-regexp |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1696 ;; correctly such as mh-letter-mode or sendmail.el's mail-mode. But |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1697 ;; perhaps I should use the variable and simply inserts its value here, |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1698 ;; and set it locally in a let scope. --psg |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1699 (if (re-search-forward adaptive-fill-regexp nil t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1700 (match-string 0) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1701 ""))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1702 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1703 (defun mh-open-line () |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1704 "Insert a newline and leave point after it. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1705 In addition, insert newline and quoting characters before text after point. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1706 This is useful in breaking up paragraphs in replies." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1707 (interactive) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1708 (let ((column (current-column)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1709 (prefix (mh-current-fill-prefix))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1710 (if (> (length prefix) column) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1711 (message "Sorry, point seems to be within the line prefix") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1712 (newline 2) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1713 (insert prefix) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1714 (while (> column (current-column)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1715 (insert " ")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1716 (forward-line -1)))) |
6365 | 1717 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1718 ;;; Build the letter-mode keymap: |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1719 ;;; If this changes, modify mh-letter-mode-help-messages accordingly, above. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1720 (gnus-define-keys mh-letter-mode-map |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1721 "\C-c?" mh-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1722 "\C-c\C-c" mh-send-letter |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1723 "\C-c\C-e" mh-edit-mhn |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1724 "\C-c\C-f\C-b" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1725 "\C-c\C-f\C-c" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1726 "\C-c\C-f\C-d" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1727 "\C-c\C-f\C-f" mh-to-fcc |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1728 "\C-c\C-f\C-r" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1729 "\C-c\C-f\C-s" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1730 "\C-c\C-f\C-t" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1731 "\C-c\C-fb" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1732 "\C-c\C-fc" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1733 "\C-c\C-fd" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1734 "\C-c\C-ff" mh-to-fcc |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1735 "\C-c\C-fr" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1736 "\C-c\C-fs" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1737 "\C-c\C-ft" mh-to-field |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1738 "\C-c\C-i" mh-insert-letter |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1739 "\C-c\C-m\C-e" mh-mml-secure-message-encrypt-pgpmime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1740 "\C-c\C-m\C-f" mh-compose-forward |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1741 "\C-c\C-m\C-i" mh-compose-insertion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1742 "\C-c\C-m\C-m" mh-mml-to-mime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1743 "\C-c\C-m\C-s" mh-mml-secure-message-sign-pgpmime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1744 "\C-c\C-m\C-u" mh-revert-mhn-edit |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1745 "\C-c\C-me" mh-mml-secure-message-encrypt-pgpmime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1746 "\C-c\C-mf" mh-compose-forward |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1747 "\C-c\C-mi" mh-compose-insertion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1748 "\C-c\C-mm" mh-mml-to-mime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1749 "\C-c\C-ms" mh-mml-secure-message-sign-pgpmime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1750 "\C-c\C-mu" mh-revert-mhn-edit |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1751 "\C-c\C-o" mh-open-line |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1752 "\C-c\C-q" mh-fully-kill-draft |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1753 "\C-c\C-\\" mh-fully-kill-draft ;if no C-q |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1754 "\C-c\C-s" mh-insert-signature |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1755 "\C-c\C-^" mh-insert-signature ;if no C-s |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1756 "\C-c\C-w" mh-check-whom |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1757 "\C-c\C-y" mh-yank-cur-msg) |
11332 | 1758 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1759 ;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el. |
11332 | 1760 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1761 (defun mh-customize () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1762 "Customize MH-E variables." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1763 (interactive) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1764 (customize-group 'mh)) |
11332 | 1765 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1766 (provide 'mh-comp) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1767 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1768 ;;; Local Variables: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1769 ;;; sentence-end-double-space: nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1770 ;;; End: |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
35975
diff
changeset
|
1771 |
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
35975
diff
changeset
|
1772 ;;; mh-comp.el ends here |