Mercurial > emacs
annotate lisp/mail/rmail.el @ 105199:8b6d9d4b0bf1
Regenerate.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 25 Sep 2009 06:15:30 +0000 |
parents | 35632fd1c56a |
children | f4199c624c3c |
rev | line source |
---|---|
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1 ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3 ;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
5 ;; Free Software Foundation, Inc. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
6 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
7 ;; Maintainer: FSF |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
8 ;; Keywords: mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
9 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
11 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
15 ;; (at your option) any later version. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
16 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
17 ;; GNU Emacs is distributed in the hope that it will be useful, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
20 ;; GNU General Public License for more details. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
21 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
24 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
25 ;;; Commentary: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
26 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
27 ;;; Code: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
28 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
29 ;; Souped up by shane@mit-ajax based on ideas of rlk@athena.mit.edu |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
30 ;; New features include attribute and keyword support, message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
31 ;; selection by dispatch table, summary by attributes and keywords, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
32 ;; expunging by dispatch table, sticky options for file commands. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
33 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
34 ;; Extended by Bob Weiner of Motorola |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
35 ;; New features include: rmail and rmail-summary buffers remain |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
36 ;; synchronized and key bindings basically operate the same way in both |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
37 ;; buffers, summary by topic or by regular expression, rmail-reply-prefix |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
38 ;; variable, and a bury rmail buffer (wipe) command. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
39 ;; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
40 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
41 (require 'mail-utils) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
42 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
43 (defconst rmail-attribute-header "X-RMAIL-ATTRIBUTES" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
44 "The header that stores the Rmail attribute data.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
45 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
46 (defconst rmail-keyword-header "X-RMAIL-KEYWORDS" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
47 "The header that stores the Rmail keyword data.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
48 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
49 ;;; Attribute indexes |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
50 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
51 (defconst rmail-answered-attr-index 0 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
52 "The index for the `answered' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
53 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
54 (defconst rmail-deleted-attr-index 1 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
55 "The index for the `deleted' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
56 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
57 (defconst rmail-edited-attr-index 2 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
58 "The index for the `edited' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
59 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
60 (defconst rmail-filed-attr-index 3 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
61 "The index for the `filed' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
62 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
63 (defconst rmail-retried-attr-index 4 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
64 "The index for the `retried' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
65 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
66 (defconst rmail-forwarded-attr-index 5 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
67 "The index for the `forwarded' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
68 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
69 (defconst rmail-unseen-attr-index 6 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
70 "The index for the `unseen' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
71 |
101684
f690c4fa34f4
(rmail-resent-attr-index): Fix index value.
Eli Zaretskii <eliz@gnu.org>
parents:
101676
diff
changeset
|
72 (defconst rmail-resent-attr-index 7 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
73 "The index for the `resent' attribute.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
74 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
75 (defconst rmail-attr-array |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
76 '[(?A "answered") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
77 (?D "deleted") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
78 (?E "edited") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
79 (?F "filed") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
80 (?R "retried") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
81 (?S "forwarded") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
82 (?U "unseen") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
83 (?r "resent")] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
84 "An array that provides a mapping between an attribute index, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
85 its character representation and its display representation.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
86 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
87 (defvar deleted-head) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
88 (defvar font-lock-fontified) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
89 (defvar mail-abbrev-syntax-table) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
90 (defvar mail-abbrevs) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
91 (defvar messages-head) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
92 (defvar total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
93 (defvar tool-bar-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
94 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
95 (defvar rmail-header-style 'normal |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
96 "The current header display style choice, one of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
97 'normal (selected headers) or 'full (all headers).") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
98 |
101632
f2c12c2dac63
(rmail-file-name): Remove duplicate definition.
Glenn Morris <rgm@gnu.org>
parents:
101628
diff
changeset
|
99 ;; rmail-spool-directory and rmail-file-name are defined in paths.el. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
100 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
101 (defgroup rmail nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
102 "Mail reader for Emacs." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
103 :group 'mail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
104 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
105 (defgroup rmail-retrieve nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
106 "Rmail retrieval options." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
107 :prefix "rmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
108 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
109 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
110 (defgroup rmail-files nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
111 "Rmail files." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
112 :prefix "rmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
113 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
114 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
115 (defgroup rmail-headers nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
116 "Rmail header options." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
117 :prefix "rmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
118 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
119 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
120 (defgroup rmail-reply nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
121 "Rmail reply options." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
122 :prefix "rmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
123 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
124 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
125 (defgroup rmail-summary nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
126 "Rmail summary options." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
127 :prefix "rmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
128 :prefix "rmail-summary-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
129 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
130 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
131 (defgroup rmail-output nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
132 "Output message to a file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
133 :prefix "rmail-output-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
134 :prefix "rmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
135 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
136 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
137 (defgroup rmail-edit nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
138 "Rmail editing." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
139 :prefix "rmail-edit-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
140 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
141 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
142 (defcustom rmail-movemail-program nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
143 "If non-nil, the file name of the `movemail' program." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
144 :group 'rmail-retrieve |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
145 :type '(choice (const nil) string)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
146 |
104384
9a190dac8f18
(rmail-obsolete): Delete custom group.
Glenn Morris <rgm@gnu.org>
parents:
104249
diff
changeset
|
147 (define-obsolete-variable-alias 'rmail-pop-password |
9a190dac8f18
(rmail-obsolete): Delete custom group.
Glenn Morris <rgm@gnu.org>
parents:
104249
diff
changeset
|
148 'rmail-remote-password "22.1") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
149 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
150 (defcustom rmail-remote-password nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
151 "Password to use when reading mail from a remote server. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
152 This setting is ignored for mailboxes whose URL already contains a password." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
153 :type '(choice (string :tag "Password") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
154 (const :tag "Not Required" nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
155 :group 'rmail-retrieve |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
156 :version "22.1") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
157 |
104384
9a190dac8f18
(rmail-obsolete): Delete custom group.
Glenn Morris <rgm@gnu.org>
parents:
104249
diff
changeset
|
158 (define-obsolete-variable-alias 'rmail-pop-password-required |
9a190dac8f18
(rmail-obsolete): Delete custom group.
Glenn Morris <rgm@gnu.org>
parents:
104249
diff
changeset
|
159 'rmail-remote-password-required "22.1") |
9a190dac8f18
(rmail-obsolete): Delete custom group.
Glenn Morris <rgm@gnu.org>
parents:
104249
diff
changeset
|
160 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
161 (defcustom rmail-remote-password-required nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
162 "Non-nil if a password is required when reading mail from a remote server." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
163 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
164 :group 'rmail-retrieve |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
165 :version "22.1") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
166 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
167 (defcustom rmail-movemail-flags nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
168 "List of flags to pass to movemail. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
169 Most commonly used to specify `-g' to enable GSS-API authentication |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
170 or `-k' to enable Kerberos authentication." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
171 :type '(repeat string) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
172 :group 'rmail-retrieve |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
173 :version "20.3") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
174 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
175 (defvar rmail-remote-password-error "invalid usercode or password\\| |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
176 unknown user name or bad password\\|Authentication failed\\|MU_ERR_AUTH_FAILURE" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
177 "Regular expression matching incorrect-password POP or IMAP server error |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
178 messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
179 If you get an incorrect-password error that this expression does not match, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
180 please report it with \\[report-emacs-bug].") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
181 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
182 (defvar rmail-encoded-remote-password nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
183 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
184 (defcustom rmail-preserve-inbox nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
185 "Non-nil means leave incoming mail in the user's inbox--don't delete it." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
186 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
187 :group 'rmail-retrieve) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
188 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
189 (defcustom rmail-movemail-search-path nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
190 "List of directories to search for movemail (in addition to `exec-path')." |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
191 :group 'rmail-retrieve |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
192 :type '(repeat (directory))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
193 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
194 (declare-function mail-position-on-field "sendmail" (field &optional soft)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
195 (declare-function mail-text-start "sendmail" ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
196 (declare-function rmail-dont-reply-to "mail-utils" (destinations)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
197 (declare-function rmail-update-summary "rmailsum" (&rest ignore)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
198 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
199 (defun rmail-probe (prog) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
200 "Determine what flavor of movemail PROG is. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
201 We do this by executing it with `--version' and analyzing its output." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
202 (with-temp-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
203 (let ((tbuf (current-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
204 (buffer-disable-undo tbuf) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
205 (call-process prog nil tbuf nil "--version") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
206 (if (not (buffer-modified-p tbuf)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
207 ;; Should not happen... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
208 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
209 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
210 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
211 ((looking-at ".*movemail: invalid option") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
212 'emacs) ;; Possibly... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
213 ((looking-at "movemail (GNU Mailutils .*)") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
214 'mailutils) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
215 (t |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
216 ;; FIXME: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
217 'emacs)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
218 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
219 (defun rmail-autodetect () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
220 "Determine the file name of the `movemail' program and return its flavor. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
221 If `rmail-movemail-program' is non-nil, use it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
222 Otherwise, look for `movemail' in the directories in |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
223 `rmail-movemail-search-path', those in `exec-path', and `exec-directory'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
224 (if rmail-movemail-program |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
225 (rmail-probe rmail-movemail-program) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
226 (catch 'scan |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
227 (dolist (dir (append rmail-movemail-search-path exec-path |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
228 (list exec-directory))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
229 (when (and dir (file-accessible-directory-p dir)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
230 ;; Previously, this didn't have to work on Windows, because |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
231 ;; rmail-insert-inbox-text before r1.439 fell back to using |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
232 ;; (expand-file-name "movemail" exec-directory) and just |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
233 ;; assuming it would work. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
234 ;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00087.html |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
235 (let ((progname (expand-file-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
236 (concat "movemail" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
237 (if (memq system-type '(ms-dos windows-nt)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
238 ".exe")) dir))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
239 (when (and (not (file-directory-p progname)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
240 (file-executable-p progname)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
241 (let ((x (rmail-probe progname))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
242 (when x |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
243 (setq rmail-movemail-program progname) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
244 (throw 'scan x)))))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
245 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
246 (defvar rmail-movemail-variant-in-use nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
247 "The movemail variant currently in use. Known variants are: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
248 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
249 `emacs' Means any implementation, compatible with the native Emacs one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
250 This is the default; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
251 `mailutils' Means GNU mailutils implementation, capable of handling full |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
252 mail URLs as the source mailbox.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
253 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
254 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
255 (defun rmail-movemail-variant-p (&rest variants) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
256 "Return t if the current movemail variant is any of VARIANTS. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
257 Currently known variants are 'emacs and 'mailutils." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
258 (when (not rmail-movemail-variant-in-use) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
259 ;; Autodetect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
260 (setq rmail-movemail-variant-in-use (rmail-autodetect))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
261 (not (null (member rmail-movemail-variant-in-use variants)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
262 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
263 ;; Call for effect, to set rmail-movemail-program (if not set by the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
264 ;; user), and rmail-movemail-variant-in-use. Used by various functions. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
265 ;; I'm not sure if M-x rmail is the only entry point to this package. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
266 ;; If so, this can be moved there. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
267 (rmail-movemail-variant-p) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
268 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
269 ;;;###autoload |
104909
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
270 (defcustom rmail-user-mail-address-regexp nil |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
271 "Regexp matching user mail addresses. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
272 If non-nil, this variable is used to identify the correspondent |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
273 when receiving new mail. If it matches the address of the sender, |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
274 the recipient is taken as correspondent of a mail. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
275 If nil \(default value\), your `user-login-name' and `user-mail-address' |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
276 are used to exclude yourself as correspondent. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
277 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
278 Usually you don't have to set this variable, except if you collect mails |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
279 sent by you under different user names. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
280 Then it should be a regexp matching your mail addresses. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
281 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
282 Setting this variable has an effect only before reading a mail." |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
283 :type '(choice (const :tag "None" nil) regexp) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
284 :group 'rmail-retrieve |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
285 :version "21.1") |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
286 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
287 ;;;###autoload |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
288 (defcustom rmail-dont-reply-to-names nil |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
289 "A regexp specifying addresses to prune from a reply message. |
102355
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
290 If this is nil, it is set the first time you compose a reply, to |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
291 a value which excludes your own email address, plus whatever is |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
292 specified by `rmail-default-dont-reply-to-names'. |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
293 |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
294 Matching addresses are excluded from the CC field in replies, and |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
295 also the To field, unless this would leave an empty To field." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
296 :type '(choice regexp (const :tag "Your Name" nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
297 :group 'rmail-reply) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
298 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
299 ;;;###autoload |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
300 (defvar rmail-default-dont-reply-to-names "\\`info-" |
102355
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
301 "Regexp specifying part of the default value of `rmail-dont-reply-to-names'. |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
302 This is used when the user does not set `rmail-dont-reply-to-names' |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
303 explicitly. (The other part of the default value is the user's |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
304 email address and name.) It is useful to set this variable in |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
305 the site customization file. The default value is conventionally |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
306 used for large mailing lists to broadcast announcements.") |
5d529b1750d2
(rmail-dont-reply-to-names, rmail-default-dont-reply-to-names): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102353
diff
changeset
|
307 ;; Is it really useful to set this site-wide? |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
308 |
101748
d69ff5f24dfd
(rmail-ignored-headers, rmail-displayed-headers)
Glenn Morris <rgm@gnu.org>
parents:
101726
diff
changeset
|
309 ;;;###autoload |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
310 (defcustom rmail-ignored-headers |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
311 (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
312 "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
313 "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
314 "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
315 "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
316 "\\|^x-mailer:\\|^delivered-to:\\|^lines:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
317 "\\|^content-transfer-encoding:\\|^x-coding-system:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
318 "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
319 "\\|^precedence:\\|^mime-version:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
320 "\\|^list-owner:\\|^list-help:\\|^list-post:\\|^list-subscribe:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
321 "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
322 "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
323 "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
324 "\\|^mbox-line:\\|^cancel-lock:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
325 "\\|^DomainKey-Signature:\\|^dkim-signature:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
326 "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
327 "\\|^x-.*:") |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
328 "Regexp to match header fields that Rmail should normally hide. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
329 \(See also `rmail-nonignored-headers', which overrides this regexp.) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
330 This variable is used for reformatting the message header, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
331 which normally happens once for each message, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
332 when you view the message for the first time in Rmail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
333 To make a change in this variable take effect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
334 for a message that you have already viewed, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
335 go to that message and type \\[rmail-toggle-header] twice." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
336 :type 'regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
337 :group 'rmail-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
338 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
339 (defcustom rmail-nonignored-headers "^x-spam-status:" |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
340 "Regexp to match X header fields that Rmail should show. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
341 This regexp overrides `rmail-ignored-headers'; if both this regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
342 and that one match a certain header field, Rmail shows the field. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
343 If this is nil, ignore all header fields in `rmail-ignored-headers'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
344 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
345 This variable is used for reformatting the message header, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
346 which normally happens once for each message, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
347 when you view the message for the first time in Rmail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
348 To make a change in this variable take effect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
349 for a message that you have already viewed, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
350 go to that message and type \\[rmail-toggle-header] twice." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
351 :type '(choice (const nil) (regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
352 :group 'rmail-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
353 |
101748
d69ff5f24dfd
(rmail-ignored-headers, rmail-displayed-headers)
Glenn Morris <rgm@gnu.org>
parents:
101726
diff
changeset
|
354 ;;;###autoload |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
355 (defcustom rmail-displayed-headers nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
356 "Regexp to match Header fields that Rmail should display. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
357 If nil, display all header fields except those matched by |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
358 `rmail-ignored-headers'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
359 :type '(choice regexp (const :tag "All")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
360 :group 'rmail-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
361 |
101748
d69ff5f24dfd
(rmail-ignored-headers, rmail-displayed-headers)
Glenn Morris <rgm@gnu.org>
parents:
101726
diff
changeset
|
362 ;;;###autoload |
103918
74a905fff633
* files.el (auto-save-mode): If buffer-saved-size is -2, don't clobber it.
Richard M. Stallman <rms@gnu.org>
parents:
103247
diff
changeset
|
363 (defcustom rmail-retry-ignored-headers "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:" |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
364 "Headers that should be stripped when retrying a failed message." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
365 :type '(choice regexp (const nil :tag "None")) |
102652
e34cdd6bbf86
(rmail-retry-ignored-headers): Add :version tag.
Glenn Morris <rgm@gnu.org>
parents:
102634
diff
changeset
|
366 :group 'rmail-headers |
103998
a909fa4b5bdd
(rmail-retry-ignored-headers): Bump :version.
Glenn Morris <rgm@gnu.org>
parents:
103918
diff
changeset
|
367 :version "23.2") ; added x-detected-operating-system, x-spam |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
368 |
101748
d69ff5f24dfd
(rmail-ignored-headers, rmail-displayed-headers)
Glenn Morris <rgm@gnu.org>
parents:
101726
diff
changeset
|
369 ;;;###autoload |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
370 (defcustom rmail-highlighted-headers "^From:\\|^Subject:" |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
371 "Regexp to match Header fields that Rmail should normally highlight. |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
372 A value of nil means don't highlight. Uses the face `rmail-highlight'." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
373 :type 'regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
374 :group 'rmail-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
375 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
376 (defface rmail-highlight |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
377 '((t (:inherit highlight))) |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
378 "Face to use for highlighting the most important header fields. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
379 The variable `rmail-highlighted-headers' specifies which headers." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
380 :group 'rmail-headers |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
381 :version "22.1") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
382 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
383 (defface rmail-header-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
384 '((t (:inherit font-lock-function-name-face))) |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
385 "Face to use for highlighting the header names. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
386 The variable `rmail-font-lock-keywords' specifies which headers |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
387 get highlighted." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
388 :group 'rmail-headers |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
389 :version "23.1") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
390 |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
391 (defcustom rmail-delete-after-output nil |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
392 "Non-nil means automatically delete a message that is copied to a file." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
393 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
394 :group 'rmail-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
395 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
396 ;;;###autoload |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
397 (defcustom rmail-primary-inbox-list nil |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
398 "List of files that are inboxes for your primary mail file `rmail-file-name'. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
399 If this is nil, uses the environment variable MAIL. If that is |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
400 unset, uses a file named by the function `user-login-name' in the |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
401 directory `rmail-spool-directory' (whose value depends on the |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
402 operating system). For example, \"/var/mail/USER\"." |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
403 ;; Don't use backquote here, because we don't want to need it at load time. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
404 ;; (That must be an old comment - it's dumped these days.) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
405 :type (list 'choice '(const :tag "Default" nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
406 (list 'repeat ':value (list (or (getenv "MAIL") |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
407 (concat rmail-spool-directory |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
408 (user-login-name)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
409 'file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
410 :group 'rmail-retrieve |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
411 :group 'rmail-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
412 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
413 (defcustom rmail-mail-new-frame nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
414 "Non-nil means Rmail makes a new frame for composing outgoing mail. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
415 This is handy if you want to preserve the window configuration of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
416 the frame where you have the RMAIL buffer displayed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
417 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
418 :group 'rmail-reply) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
419 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
420 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
421 (defcustom rmail-secondary-file-directory "~/" |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
422 "Directory for additional secondary Rmail files." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
423 :type 'directory |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
424 :group 'rmail-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
425 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
426 (defcustom rmail-secondary-file-regexp "\\.xmail$" |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
427 "Regexp for which files are secondary Rmail files." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
428 :type 'regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
429 :group 'rmail-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
430 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
431 (defcustom rmail-confirm-expunge 'y-or-n-p |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
432 "Whether and how to ask for confirmation before expunging deleted messages. |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
433 The value, if non-nil is a function to call with a question (string) |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
434 as argument, to ask the user that question." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
435 :type '(choice (const :tag "No confirmation" nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
436 (const :tag "Confirm with y-or-n-p" y-or-n-p) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
437 (const :tag "Confirm with yes-or-no-p" yes-or-no-p)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
438 :version "21.1" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
439 :group 'rmail-files) |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
440 (put 'rmail-confirm-expunge 'risky-local-variable t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
441 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
442 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
443 (defvar rmail-mode-hook nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
444 "List of functions to call when Rmail is invoked.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
445 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
446 (defvar rmail-get-new-mail-hook nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
447 "List of functions to call when Rmail has retrieved new mail.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
448 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
449 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
450 (defcustom rmail-show-message-hook nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
451 "List of functions to call when Rmail displays a message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
452 :type 'hook |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
453 :options '(goto-address) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
454 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
455 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
456 (defvar rmail-quit-hook nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
457 "List of functions to call when quitting out of Rmail.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
458 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
459 (defvar rmail-delete-message-hook nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
460 "List of functions to call when Rmail deletes a message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
461 When the hooks are called, the message has been marked deleted but is |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
462 still the current message in the Rmail buffer.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
463 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
464 ;; These may be altered by site-init.el to match the format of mmdf files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
465 ;; delimiting used on a given host (delim1 and delim2 from the config |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
466 ;; files). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
467 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
468 (defvar rmail-mmdf-delim1 "^\001\001\001\001\n" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
469 "Regexp marking the start of an mmdf message.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
470 (defvar rmail-mmdf-delim2 "^\001\001\001\001\n" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
471 "Regexp marking the end of an mmdf message.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
472 |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
473 ;; FIXME Post-mbox, this is now unused. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
474 ;; In Emacs-22, this was called: |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
475 ;; i) the very first time a message was shown. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
476 ;; ii) when toggling the headers to the normal state, every time. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
477 ;; It's not clear what it should do now, since there is nothing that |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
478 ;; records when a message is shown for the first time (unseen is not |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
479 ;; necessarily the same thing). |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
480 (defcustom rmail-message-filter nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
481 "If non-nil, a filter function for new messages in RMAIL. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
482 Called with region narrowed to the message, including headers, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
483 before obeying `rmail-ignored-headers'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
484 :group 'rmail-headers |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
485 :type '(choice (const nil) function)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
486 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
487 (defcustom rmail-automatic-folder-directives nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
488 "List of directives specifying where to put a message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
489 Each element of the list is of the form: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
490 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
491 (FOLDERNAME FIELD REGEXP [ FIELD REGEXP ] ... ) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
492 |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
493 Where FOLDERNAME is the name of a folder to put the message. |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
494 If any of the field regexp's are nil, then it is ignored. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
495 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
496 If FOLDERNAME is \"/dev/null\", it is deleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
497 If FOLDERNAME is nil then it is deleted, and skipped. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
498 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
499 FIELD is the plain text name of a field in the message, such as |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
500 \"subject\" or \"from\". A FIELD of \"to\" will automatically include |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
501 all text from the \"cc\" field as well. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
502 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
503 REGEXP is an expression to match in the preceeding specified FIELD. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
504 FIELD/REGEXP pairs continue in the list. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
505 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
506 examples: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
507 (\"/dev/null\" \"from\" \"@spam.com\") ; delete all mail from spam.com |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
508 (\"RMS\" \"from\" \"rms@\") ; save all mail from RMS. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
509 |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
510 Note that this is only applied in the folder specifed by `rmail-file-name'." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
511 :group 'rmail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
512 :version "21.1" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
513 :type '(repeat (sexp :tag "Directive"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
514 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
515 (defvar rmail-reply-prefix "Re: " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
516 "String to prepend to Subject line when replying to a message.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
517 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
518 ;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:". |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
519 ;; This pattern should catch all the common variants. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
520 ;; rms: I deleted the change to delete tags in square brackets |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
521 ;; because they mess up RT tags. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
522 (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
523 "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
524 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
525 (defcustom rmail-display-summary nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
526 "If non-nil, Rmail always displays the summary buffer." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
527 :group 'rmail-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
528 :type 'boolean) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
529 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
530 (defvar rmail-inbox-list nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
531 (put 'rmail-inbox-list 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
532 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
533 (defvar rmail-buffer nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
534 "The RMAIL buffer related to the current buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
535 In an RMAIL buffer, this holds the RMAIL buffer itself. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
536 In a summary buffer, this holds the RMAIL buffer it is a summary for.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
537 (put 'rmail-buffer 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
538 |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
539 (defvar rmail-was-converted nil |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
540 "Non-nil in an Rmail buffer that was just converted from Babyl format.") |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
541 (put 'rmail-was-converted 'permanent-local t) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
542 |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
543 (defvar rmail-seriously-modified nil |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
544 "Non-nil in an Rmail buffer that has been modified in a major way.") |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
545 (put 'rmail-seriously-modified 'permanent-local t) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
546 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
547 ;; Message counters and markers. Deleted flags. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
548 |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
549 (defvar rmail-current-message nil |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
550 "Integer specifying the message currently being displayed in this folder.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
551 (put 'rmail-current-message 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
552 |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
553 (defvar rmail-total-messages nil |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
554 "Integer specifying the total number of messages in this folder. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
555 Includes deleted messages.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
556 (put 'rmail-total-messages 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
557 |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
558 (defvar rmail-message-vector nil |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
559 "Vector of markers specifying the start and end of each message. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
560 Element N and N+1 specify the start and end of message N.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
561 (put 'rmail-message-vector 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
562 |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
563 (defvar rmail-deleted-vector nil |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
564 "A string of length `rmail-total-messages' plus one. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
565 Character N is either a space or \"D\", according to whether |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
566 message N is deleted or not.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
567 (put 'rmail-deleted-vector 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
568 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
569 (defvar rmail-msgref-vector nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
570 "In an Rmail buffer, a vector whose Nth element is a list (N). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
571 When expunging renumbers messages, these lists are modified |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
572 by substituting the new message number into the existing list.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
573 (put 'rmail-msgref-vector 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
574 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
575 (defvar rmail-overlay-list nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
576 (put 'rmail-overlay-list 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
577 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
578 ;; These are used by autoloaded rmail-summary. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
579 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
580 (defvar rmail-summary-buffer nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
581 (put 'rmail-summary-buffer 'permanent-local t) |
101991
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
582 (defvar rmail-summary-vector nil |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
583 "In an Rmail buffer, vector of (newline-terminated) strings. |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
584 Element N specifies the summary line for message N+1.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
585 (put 'rmail-summary-vector 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
586 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
587 ;; Rmail buffer swapping variables. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
588 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
589 (defvar rmail-buffer-swapped nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
590 "If non-nil, `rmail-buffer' is swapped with `rmail-view-buffer'.") |
101418
197ad3185efc
(rmail-buffer-swapped): Fix last change.
Chong Yidong <cyd@stupidchicken.com>
parents:
101411
diff
changeset
|
591 (make-variable-buffer-local 'rmail-buffer-swapped) |
101373
6681261c6f03
Sync a final change from pmail.el:
Glenn Morris <rgm@gnu.org>
parents:
101368
diff
changeset
|
592 (put 'rmail-buffer-swapped 'permanent-local t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
593 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
594 (defvar rmail-view-buffer nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
595 "Buffer which holds RMAIL message for MIME displaying.") |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
596 (make-variable-buffer-local 'rmail-view-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
597 (put 'rmail-view-buffer 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
598 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
599 ;; `Sticky' default variables. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
600 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
601 ;; Last individual label specified to a or k. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
602 (defvar rmail-last-label nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
603 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
604 ;; Last set of values specified to C-M-n, C-M-p, C-M-s or C-M-l. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
605 (defvar rmail-last-multi-labels nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
606 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
607 (defvar rmail-last-regexp nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
608 (put 'rmail-last-regexp 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
609 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
610 (defcustom rmail-default-file "~/xmail" |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
611 "Default file name for \\[rmail-output]." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
612 :type 'file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
613 :group 'rmail-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
614 (defcustom rmail-default-body-file "~/mailout" |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
615 "Default file name for \\[rmail-output-body-to-file]." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
616 :type 'file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
617 :group 'rmail-files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
618 :version "20.3") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
619 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
620 ;; Mule and MIME related variables. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
621 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
622 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
623 (defvar rmail-file-coding-system nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
624 "Coding system used in RMAIL file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
625 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
626 This is set to nil by default.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
627 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
628 (defcustom rmail-enable-mime nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
629 "If non-nil, RMAIL uses MIME features. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
630 If the value is t, RMAIL automatically shows MIME decoded message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
631 If the value is neither t nor nil, RMAIL does not show MIME decoded message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
632 until a user explicitly requires it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
633 |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
634 Even if the value is non-nil, you can't use MIME features |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
635 unless the feature specified by `rmail-mime-feature' is available." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
636 :type '(choice (const :tag "on" t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
637 (const :tag "off" nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
638 (other :tag "when asked" ask)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
639 :group 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
640 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
641 (defvar rmail-enable-mime-composing nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
642 "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
643 |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
644 ;; FIXME unused. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
645 (defvar rmail-show-mime-function nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
646 "Function to show MIME decoded message of RMAIL file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
647 This function is called when `rmail-enable-mime' is non-nil. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
648 It is called with no argument.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
649 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
650 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
651 (defvar rmail-insert-mime-forwarded-message-function nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
652 "Function to insert a message in MIME format so it can be forwarded. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
653 This function is called if `rmail-enable-mime' or |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
654 `rmail-enable-mime-composing' is non-nil. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
655 It is called with one argument FORWARD-BUFFER, which is a |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
656 buffer containing the message to forward. The current buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
657 is the outgoing mail buffer.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
658 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
659 (defvar rmail-insert-mime-resent-message-function nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
660 "Function to insert a message in MIME format so it can be resent. |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
661 This function is called by `rmail-resend' if `rmail-enable-mime' is non-nil. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
662 It is called with one argument FORWARD-BUFFER, which is a |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
663 buffer containing the message to forward. The current buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
664 is the outgoing mail buffer.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
665 |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
666 ;; FIXME one might want to pass a LIMIT, as per |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
667 ;; rmail-search-mime-header-function. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
668 (defvar rmail-search-mime-message-function nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
669 "Function to check if a regexp matches a MIME message. |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
670 This function is called by `rmail-search-message' if |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
671 `rmail-enable-mime' is non-nil. It is called (with point at the |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
672 start of the message) with two arguments MSG and REGEXP, where |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
673 MSG is the message number, REGEXP is the regular expression.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
674 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
675 (defvar rmail-search-mime-header-function nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
676 "Function to check if a regexp matches a header of MIME message. |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
677 This function is called by `rmail-message-regexp-p-1' if |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
678 `rmail-enable-mime' is non-nil. It is called (with point at the |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
679 start of the header) with three arguments MSG, REGEXP, and LIMIT, |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
680 where MSG is the message number, REGEXP is the regular |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
681 expression, LIMIT is the position specifying the end of header.") |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
682 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
683 (defvar rmail-mime-feature 'rmail-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
684 "Feature to require to load MIME support in Rmail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
685 When starting Rmail, if `rmail-enable-mime' is non-nil, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
686 this feature is required with `require'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
687 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
688 The default value is `rmail-mime'. This feature is provided by |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
689 the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
690 |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
691 ;; FIXME this is unused. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
692 (defvar rmail-decode-mime-charset t |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
693 "*Non-nil means a message is decoded by MIME's charset specification. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
694 If this variable is nil, or the message has not MIME specification, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
695 the message is decoded as normal way. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
696 |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
697 If the variable `rmail-enable-mime' is non-nil, this variable is |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
698 ignored, and all the decoding work is done by a feature specified by |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
699 the variable `rmail-mime-feature'.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
700 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
701 (defvar rmail-mime-charset-pattern |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
702 (concat "^content-type:[ \t]*text/plain;" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
703 "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
704 "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
705 "Regexp to match MIME-charset specification in a header of message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
706 The first parenthesized expression should match the MIME-charset name.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
707 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
708 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
709 (defvar rmail-unix-mail-delimiter |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
710 (let ((time-zone-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
711 (concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
712 "\\|[-+]?[0-9][0-9][0-9][0-9]" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
713 "\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
714 "\\) *"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
715 (concat |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
716 "From " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
717 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
718 ;; Many things can happen to an RFC 822 mailbox before it is put into |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
719 ;; a `From' line. The leading phrase can be stripped, e.g. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
720 ;; `Joe <@w.x:joe@y.z>' -> `<@w.x:joe@y.z>'. The <> can be stripped, e.g. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
721 ;; `<@x.y:joe@y.z>' -> `@x.y:joe@y.z'. Everything starting with a CRLF |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
722 ;; can be removed, e.g. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
723 ;; From: joe@y.z (Joe K |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
724 ;; User) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
725 ;; can yield `From joe@y.z (Joe K Fri Mar 22 08:11:15 1996', and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
726 ;; From: Joe User |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
727 ;; <joe@y.z> |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
728 ;; can yield `From Joe User Fri Mar 22 08:11:15 1996'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
729 ;; The mailbox can be removed or be replaced by white space, e.g. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
730 ;; From: "Joe User"{space}{tab} |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
731 ;; <joe@y.z> |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
732 ;; can yield `From {space}{tab} Fri Mar 22 08:11:15 1996', |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
733 ;; where {space} and {tab} represent the Ascii space and tab characters. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
734 ;; We want to match the results of any of these manglings. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
735 ;; The following regexp rejects names whose first characters are |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
736 ;; obviously bogus, but after that anything goes. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
737 "\\([^\0-\b\n-\r\^?].*\\)? " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
738 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
739 ;; The time the message was sent. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
740 "\\([^\0-\r \^?]+\\) +" ; day of the week |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
741 "\\([^\0-\r \^?]+\\) +" ; month |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
742 "\\([0-3]?[0-9]\\) +" ; day of month |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
743 "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
744 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
745 ;; Perhaps a time zone, specified by an abbreviation, or by a |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
746 ;; numeric offset. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
747 time-zone-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
748 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
749 ;; The year. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
750 " \\([0-9][0-9]+\\) *" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
751 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
752 ;; On some systems the time zone can appear after the year, too. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
753 time-zone-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
754 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
755 ;; Old uucp cruft. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
756 "\\(remote from .*\\)?" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
757 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
758 "\n")) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
759 "Regexp matching the delimiter of messages in UNIX mail format |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
760 \(UNIX From lines), minus the initial ^. Note that if you change |
101952
3fadcabd5931
(rmail-unix-mail-delimiter): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101920
diff
changeset
|
761 this expression, you must change the code in `rmail-nuke-pinhead-header' |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
762 that knows the exact ordering of the \\( \\) subexpressions.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
763 |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
764 ;; FIXME the rmail-header-name headers ought to be customizable. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
765 ;; It seems a bit arbitrary, for example, that all of the Date: line |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
766 ;; gets highlighted. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
767 (defvar rmail-font-lock-keywords |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
768 ;; These are all matched case-insensitively. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
769 (eval-when-compile |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
770 (let* ((cite-chars "[>|}]") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
771 (cite-prefix "a-z") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
772 (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
773 (list '("^\\(From\\|Sender\\|Resent-From\\):" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
774 . 'rmail-header-name) |
102588
735c4ccc513f
(rmail-font-lock-keywords): Treat "Mail-Reply-To" like "Reply-To".
Glenn Morris <rgm@gnu.org>
parents:
102405
diff
changeset
|
775 '("^\\(Mail-\\)?Reply-To:.*$" . 'rmail-header-name) |
735c4ccc513f
(rmail-font-lock-keywords): Treat "Mail-Reply-To" like "Reply-To".
Glenn Morris <rgm@gnu.org>
parents:
102405
diff
changeset
|
776 ;; FIXME Mail-Followup-To should probably be here too. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
777 '("^Subject:" . 'rmail-header-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
778 '("^X-Spam-Status:" . 'rmail-header-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
779 '("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
780 . 'rmail-header-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
781 ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
782 `(,cite-chars |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
783 (,(concat "\\=[ \t]*" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
784 "\\(\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
785 "\\(" cite-chars "[ \t]*\\)\\)+\\)" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
786 "\\(.*\\)") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
787 (beginning-of-line) (end-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
788 (1 font-lock-comment-delimiter-face nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
789 (5 font-lock-comment-face nil t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
790 '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
791 . 'rmail-header-name)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
792 "Additional expressions to highlight in Rmail mode.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
793 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
794 ;; Perform BODY in the summary buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
795 ;; in such a way that its cursor is properly updated in its own window. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
796 (defmacro rmail-select-summary (&rest body) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
797 `(let ((total rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
798 (if (rmail-summary-displayed) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
799 (let ((window (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
800 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
801 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
802 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
803 (pop-to-buffer rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
804 ;; rmail-total-messages is a buffer-local var |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
805 ;; in the rmail buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
806 ;; This way we make it available for the body |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
807 ;; even tho the rmail buffer is not current. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
808 (let ((rmail-total-messages total)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
809 ,@body)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
810 (select-window window)))) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
811 (with-current-buffer rmail-summary-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
812 (let ((rmail-total-messages total)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
813 ,@body))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
814 (rmail-maybe-display-summary))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
815 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
816 ;;;; *** Rmail Mode *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
817 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
818 (defun rmail-require-mime-maybe () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
819 "Require `rmail-mime-feature' if that is non-nil. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
820 Signal an error and set `rmail-mime-feature' to nil if the feature |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
821 isn't provided." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
822 (when rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
823 (condition-case err |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
824 (require rmail-mime-feature) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
825 (error |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
826 (display-warning |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
827 'rmail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
828 (format "Although MIME support is requested |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
829 by setting `rmail-enable-mime' to non-nil, the required feature |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
830 `%s' (the value of `rmail-mime-feature') |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
831 is not available in the current session. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
832 So, the MIME support is turned off for the moment." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
833 rmail-mime-feature) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
834 :warning) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
835 (setq rmail-enable-mime nil))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
836 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
837 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
838 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
839 (defun rmail (&optional file-name-arg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
840 "Read and edit incoming mail. |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
841 Moves messages into file named by `rmail-file-name' and edits that |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
842 file in RMAIL Mode. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
843 Type \\[describe-mode] once editing that file, for a list of RMAIL commands. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
844 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
845 May be called with file name as argument; then performs rmail editing on |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
846 that file, but does not copy any new mail into the file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
847 Interactively, if you supply a prefix argument, then you |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
848 have a chance to specify a file name with the minibuffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
849 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
850 If `rmail-display-summary' is non-nil, make a summary for this RMAIL file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
851 (interactive (if current-prefix-arg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
852 (list (read-file-name "Run rmail on RMAIL file: ")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
853 (rmail-require-mime-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
854 (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
855 ;; Use find-buffer-visiting, not get-file-buffer, for those users |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
856 ;; who have find-file-visit-truename set to t. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
857 (existed (find-buffer-visiting file-name)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
858 run-mail-hook mail-buf msg-shown) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
859 ;; Determine if an existing mail file has been changed behind the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
860 ;; scene... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
861 (if (and existed (not (verify-visited-file-modtime existed))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
862 ;; The mail file has been changed. Revisit it and reset the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
863 ;; message state variables when in rmail mode. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
864 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
865 (find-file file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
866 (when (and (verify-visited-file-modtime existed) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
867 (eq major-mode 'rmail-mode)) |
102021
c7da4634b3a9
(rmail): When reverting, swap buffers before setting counters. (Bug#2229)
Glenn Morris <rgm@gnu.org>
parents:
102012
diff
changeset
|
868 (rmail-swap-buffers-maybe) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
869 (rmail-set-message-counters))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
870 ;; The mail file is either unchanged or not visited. Visit it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
871 (switch-to-buffer |
101882
5cd64f3517f3
(rmail): Bind coding-system-for-read to no-conversion before calling
Eli Zaretskii <eliz@gnu.org>
parents:
101875
diff
changeset
|
872 (let ((enable-local-variables nil) |
5cd64f3517f3
(rmail): Bind coding-system-for-read to no-conversion before calling
Eli Zaretskii <eliz@gnu.org>
parents:
101875
diff
changeset
|
873 ;; Force no-conversion by default, since that's what |
5cd64f3517f3
(rmail): Bind coding-system-for-read to no-conversion before calling
Eli Zaretskii <eliz@gnu.org>
parents:
101875
diff
changeset
|
874 ;; pre-mbox Rmail did with BABYL files (via |
5cd64f3517f3
(rmail): Bind coding-system-for-read to no-conversion before calling
Eli Zaretskii <eliz@gnu.org>
parents:
101875
diff
changeset
|
875 ;; auto-coding-regexp-alist). |
5cd64f3517f3
(rmail): Bind coding-system-for-read to no-conversion before calling
Eli Zaretskii <eliz@gnu.org>
parents:
101875
diff
changeset
|
876 (coding-system-for-read |
5cd64f3517f3
(rmail): Bind coding-system-for-read to no-conversion before calling
Eli Zaretskii <eliz@gnu.org>
parents:
101875
diff
changeset
|
877 (or coding-system-for-read 'no-conversion))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
878 (find-file-noselect file-name)))) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
879 ;; Ensure that the collection and view buffers are in sync and |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
880 ;; ensure that a message is not being edited. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
881 (if (eq major-mode 'rmail-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
882 (rmail-swap-buffers-maybe)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
883 (if (eq major-mode 'rmail-edit-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
884 (error "Exit Rmail Edit mode before getting new mail")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
885 (or (and existed (> (buffer-size) 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
886 (setq run-mail-hook t)) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
887 ;; Ensure that the Rmail file is in mbox format, the buffer is in |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
888 ;; Rmail mode and has been scanned to find all the messages |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
889 ;; (setting the global message variables in the process). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
890 (rmail-convert-file-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
891 (unless (eq major-mode 'rmail-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
892 (rmail-mode-2)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
893 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
894 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
895 (setq mail-buf rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
896 ;; Show the first unread message and process summary mode. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
897 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
898 ;; Only get new mail when there is not a file name argument. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
899 (unless file-name-arg |
102229
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
900 (setq msg-shown (rmail-get-new-mail))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
901 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
902 (set-buffer mail-buf) |
102229
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
903 (or msg-shown |
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
904 (rmail-show-message (rmail-first-unseen-message))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
905 (if rmail-display-summary (rmail-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
906 (rmail-construct-io-menu) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
907 (if run-mail-hook |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
908 (run-hooks 'rmail-mode-hook)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
909 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
910 (defun rmail-convert-file-maybe () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
911 "Determine if the file needs to be converted to mbox format." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
912 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
913 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
914 ;; Detect previous Babyl format files. |
102012
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
915 (let ((case-fold-search nil)) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
916 (cond ((looking-at "BABYL OPTIONS:") |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
917 ;; The file is Babyl version 5. Use unrmail to convert |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
918 ;; it. |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
919 (rmail-convert-babyl-to-mbox)) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
920 ((looking-at "Version: 5\n") |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
921 ;; Losing babyl file made by old version of Rmail. Fix the |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
922 ;; babyl file header and use unrmail to convert to mbox |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
923 ;; format. |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
924 (let ((buffer-read-only nil)) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
925 (insert "BABYL OPTIONS: -*- rmail -*-\n") |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
926 (rmail-convert-babyl-to-mbox))) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
927 ((equal (point-min) (point-max)) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
928 (message "Empty Rmail file.")) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
929 ((looking-at "From ")) |
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
930 (t (error "Invalid mbox file"))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
931 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
932 (defun rmail-error-bad-format (&optional msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
933 "Report that the buffer is not in the mbox file format. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
934 MSGNUM, if present, indicates the malformed message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
935 (if msgnum |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
936 (error "Message %d is not a valid RFC2822 message" msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
937 (error "Message is not a valid RFC2822 message"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
938 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
939 (defun rmail-convert-babyl-to-mbox () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
940 "Convert the mail file from Babyl version 5 to mbox. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
941 This function also reinitializes local variables used by Rmail." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
942 (let ((old-file (make-temp-file "rmail")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
943 (new-file (make-temp-file "rmail"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
944 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
945 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
946 (kill-all-local-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
947 (write-region (point-min) (point-max) old-file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
948 (unrmail old-file new-file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
949 (message "Replacing BABYL format with mbox format...") |
101676
5fd0ba414a8c
(rmail-convert-babyl-to-mbox): Bind coding-system-for-read to `raw-text', and
Eli Zaretskii <eliz@gnu.org>
parents:
101667
diff
changeset
|
950 (let ((inhibit-read-only t) |
101766
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
951 (coding-system-for-read 'raw-text) |
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
952 (buffer-undo-list t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
953 (erase-buffer) |
101676
5fd0ba414a8c
(rmail-convert-babyl-to-mbox): Bind coding-system-for-read to `raw-text', and
Eli Zaretskii <eliz@gnu.org>
parents:
101667
diff
changeset
|
954 (insert-file-contents new-file) |
101705
f6dc10ed5a92
(rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'.
Eli Zaretskii <eliz@gnu.org>
parents:
101695
diff
changeset
|
955 ;; Rmail buffers need to be saved with Unix EOLs, or else |
f6dc10ed5a92
(rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'.
Eli Zaretskii <eliz@gnu.org>
parents:
101695
diff
changeset
|
956 ;; the format will not be recognized. |
f6dc10ed5a92
(rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'.
Eli Zaretskii <eliz@gnu.org>
parents:
101695
diff
changeset
|
957 (set-buffer-file-coding-system 'raw-text-unix) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
958 (rmail-mode-1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
959 (rmail-perm-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
960 (rmail-variables) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
961 (setq rmail-was-converted t) |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
962 (rmail-dont-modify-format) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
963 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
964 (rmail-set-message-counters)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
965 (message "Replacing BABYL format with mbox format...done")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
966 (delete-file old-file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
967 (delete-file new-file)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
968 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
969 (defun rmail-get-coding-system () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
970 "Return a suitable coding system to use for the current mail message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
971 The buffer is expected to be narrowed to just the header of the message." |
101550
28b036b7fc1c
(rmail-get-coding-system): Re-search
Kenichi Handa <handa@m17n.org>
parents:
101539
diff
changeset
|
972 (save-excursion |
28b036b7fc1c
(rmail-get-coding-system): Re-search
Kenichi Handa <handa@m17n.org>
parents:
101539
diff
changeset
|
973 (goto-char (point-min)) |
101552
095c55c0882d
(rmail-get-coding-system): Fix previous change.
Kenichi Handa <handa@m17n.org>
parents:
101550
diff
changeset
|
974 (if (re-search-forward rmail-mime-charset-pattern nil t) |
101550
28b036b7fc1c
(rmail-get-coding-system): Re-search
Kenichi Handa <handa@m17n.org>
parents:
101539
diff
changeset
|
975 (coding-system-from-name (match-string 1)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
976 'undecided))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
977 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
978 ;;; Set up Rmail mode keymaps |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
979 |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
980 (defvar rmail-mode-map |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
981 (let ((map (make-keymap))) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
982 (suppress-keymap map) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
983 (define-key map "a" 'rmail-add-label) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
984 (define-key map "b" 'rmail-bury) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
985 (define-key map "c" 'rmail-continue) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
986 (define-key map "d" 'rmail-delete-forward) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
987 (define-key map "\C-d" 'rmail-delete-backward) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
988 (define-key map "e" 'rmail-edit-current-message) |
102340
9ea8a3661105
(rmail-mode-map): Add explicit keybinding for rmail-resend in the menu.
Glenn Morris <rgm@gnu.org>
parents:
102315
diff
changeset
|
989 ;; If you change this, change the rmail-resend menu-item's :keys. |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
990 (define-key map "f" 'rmail-forward) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
991 (define-key map "g" 'rmail-get-new-mail) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
992 (define-key map "h" 'rmail-summary) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
993 (define-key map "i" 'rmail-input) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
994 (define-key map "j" 'rmail-show-message) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
995 (define-key map "k" 'rmail-kill-label) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
996 (define-key map "l" 'rmail-summary-by-labels) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
997 (define-key map "\e\C-h" 'rmail-summary) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
998 (define-key map "\e\C-l" 'rmail-summary-by-labels) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
999 (define-key map "\e\C-r" 'rmail-summary-by-recipients) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1000 (define-key map "\e\C-s" 'rmail-summary-by-regexp) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1001 (define-key map "\e\C-t" 'rmail-summary-by-topic) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1002 (define-key map "m" 'rmail-mail) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1003 (define-key map "\em" 'rmail-retry-failure) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1004 (define-key map "n" 'rmail-next-undeleted-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1005 (define-key map "\en" 'rmail-next-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1006 (define-key map "\e\C-n" 'rmail-next-labeled-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1007 (define-key map "o" 'rmail-output) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1008 (define-key map "\C-o" 'rmail-output-as-seen) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1009 (define-key map "p" 'rmail-previous-undeleted-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1010 (define-key map "\ep" 'rmail-previous-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1011 (define-key map "\e\C-p" 'rmail-previous-labeled-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1012 (define-key map "q" 'rmail-quit) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1013 (define-key map "r" 'rmail-reply) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1014 ;; I find I can't live without the default M-r command -- rms. |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1015 ;; (define-key rmail-mode-map "\er" 'rmail-search-backwards) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1016 (define-key map "s" 'rmail-expunge-and-save) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1017 (define-key map "\es" 'rmail-search) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1018 (define-key map "t" 'rmail-toggle-header) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1019 (define-key map "u" 'rmail-undelete-previous-message) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1020 (define-key map "v" 'rmail-mime) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1021 (define-key map "w" 'rmail-output-body-to-file) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1022 (define-key map "\C-c\C-w" 'rmail-widen) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1023 (define-key map "x" 'rmail-expunge) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1024 (define-key map "." 'rmail-beginning-of-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1025 (define-key map "/" 'rmail-end-of-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1026 (define-key map "<" 'rmail-first-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1027 (define-key map ">" 'rmail-last-message) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1028 (define-key map " " 'scroll-up) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1029 (define-key map "\177" 'scroll-down) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1030 (define-key map "?" 'describe-mode) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1031 (define-key map "\C-c\C-s\C-d" 'rmail-sort-by-date) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1032 (define-key map "\C-c\C-s\C-s" 'rmail-sort-by-subject) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1033 (define-key map "\C-c\C-s\C-a" 'rmail-sort-by-author) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1034 (define-key map "\C-c\C-s\C-r" 'rmail-sort-by-recipient) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1035 (define-key map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1036 (define-key map "\C-c\C-s\C-l" 'rmail-sort-by-lines) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1037 (define-key map "\C-c\C-s\C-k" 'rmail-sort-by-labels) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1038 (define-key map "\C-c\C-n" 'rmail-next-same-subject) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1039 (define-key map "\C-c\C-p" 'rmail-previous-same-subject) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1040 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1041 |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1042 (define-key map [menu-bar] (make-sparse-keymap)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1043 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1044 (define-key map [menu-bar classify] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1045 (cons "Classify" (make-sparse-keymap "Classify"))) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1046 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1047 (define-key map [menu-bar classify input-menu] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1048 nil) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1049 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1050 (define-key map [menu-bar classify output-menu] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1051 nil) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1052 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1053 (define-key map [menu-bar classify output-body] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1054 '("Output body to file..." . rmail-output-body-to-file)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1055 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1056 (define-key map [menu-bar classify output-inbox] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1057 '("Output..." . rmail-output)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1058 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1059 (define-key map [menu-bar classify output] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1060 '("Output as seen..." . rmail-output-as-seen)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1061 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1062 (define-key map [menu-bar classify kill-label] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1063 '("Kill Label..." . rmail-kill-label)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1064 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1065 (define-key map [menu-bar classify add-label] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1066 '("Add Label..." . rmail-add-label)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1067 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1068 (define-key map [menu-bar summary] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1069 (cons "Summary" (make-sparse-keymap "Summary"))) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1070 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1071 (define-key map [menu-bar summary senders] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1072 '("By Senders..." . rmail-summary-by-senders)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1073 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1074 (define-key map [menu-bar summary labels] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1075 '("By Labels..." . rmail-summary-by-labels)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1076 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1077 (define-key map [menu-bar summary recipients] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1078 '("By Recipients..." . rmail-summary-by-recipients)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1079 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1080 (define-key map [menu-bar summary topic] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1081 '("By Topic..." . rmail-summary-by-topic)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1082 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1083 (define-key map [menu-bar summary regexp] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1084 '("By Regexp..." . rmail-summary-by-regexp)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1085 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1086 (define-key map [menu-bar summary all] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1087 '("All" . rmail-summary)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1088 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1089 (define-key map [menu-bar mail] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1090 (cons "Mail" (make-sparse-keymap "Mail"))) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1091 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1092 (define-key map [menu-bar mail rmail-get-new-mail] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1093 '("Get New Mail" . rmail-get-new-mail)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1094 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1095 (define-key map [menu-bar mail lambda] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1096 '("----")) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1097 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1098 (define-key map [menu-bar mail continue] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1099 '("Continue" . rmail-continue)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1100 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1101 (define-key map [menu-bar mail resend] |
102340
9ea8a3661105
(rmail-mode-map): Add explicit keybinding for rmail-resend in the menu.
Glenn Morris <rgm@gnu.org>
parents:
102315
diff
changeset
|
1102 '(menu-item "Resend..." rmail-resend :keys "C-u f")) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1103 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1104 (define-key map [menu-bar mail forward] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1105 '("Forward" . rmail-forward)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1106 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1107 (define-key map [menu-bar mail retry] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1108 '("Retry" . rmail-retry-failure)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1109 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1110 (define-key map [menu-bar mail reply] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1111 '("Reply" . rmail-reply)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1112 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1113 (define-key map [menu-bar mail mail] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1114 '("Mail" . rmail-mail)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1115 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1116 (define-key map [menu-bar delete] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1117 (cons "Delete" (make-sparse-keymap "Delete"))) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1118 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1119 (define-key map [menu-bar delete expunge/save] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1120 '("Expunge/Save" . rmail-expunge-and-save)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1121 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1122 (define-key map [menu-bar delete expunge] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1123 '("Expunge" . rmail-expunge)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1124 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1125 (define-key map [menu-bar delete undelete] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1126 '("Undelete" . rmail-undelete-previous-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1127 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1128 (define-key map [menu-bar delete delete] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1129 '("Delete" . rmail-delete-forward)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1130 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1131 (define-key map [menu-bar move] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1132 (cons "Move" (make-sparse-keymap "Move"))) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1133 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1134 (define-key map [menu-bar move search-back] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1135 '("Search Back..." . rmail-search-backwards)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1136 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1137 (define-key map [menu-bar move search] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1138 '("Search..." . rmail-search)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1139 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1140 (define-key map [menu-bar move previous] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1141 '("Previous Nondeleted" . rmail-previous-undeleted-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1142 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1143 (define-key map [menu-bar move next] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1144 '("Next Nondeleted" . rmail-next-undeleted-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1145 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1146 (define-key map [menu-bar move last] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1147 '("Last" . rmail-last-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1148 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1149 (define-key map [menu-bar move first] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1150 '("First" . rmail-first-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1151 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1152 (define-key map [menu-bar move previous] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1153 '("Previous" . rmail-previous-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1154 |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1155 (define-key map [menu-bar move next] |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1156 '("Next" . rmail-next-message)) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1157 |
101991
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
1158 map) |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
1159 "Keymap used in Rmail mode.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1160 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1161 ;; Rmail toolbar |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1162 (defvar rmail-tool-bar-map |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1163 (let ((map (make-sparse-keymap))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1164 (tool-bar-local-item-from-menu 'rmail-get-new-mail "mail/inbox" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1165 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1166 (tool-bar-local-item-from-menu 'rmail-next-undeleted-message "right-arrow" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1167 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1168 (tool-bar-local-item-from-menu 'rmail-previous-undeleted-message "left-arrow" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1169 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1170 (tool-bar-local-item-from-menu 'rmail-search "search" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1171 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1172 (tool-bar-local-item-from-menu 'rmail-input "open" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1173 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1174 (tool-bar-local-item-from-menu 'rmail-mail "mail/compose" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1175 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1176 (tool-bar-local-item-from-menu 'rmail-reply "mail/reply-all" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1177 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1178 (tool-bar-local-item-from-menu 'rmail-forward "mail/forward" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1179 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1180 (tool-bar-local-item-from-menu 'rmail-delete-forward "close" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1181 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1182 (tool-bar-local-item-from-menu 'rmail-output "mail/move" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1183 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1184 (tool-bar-local-item-from-menu 'rmail-output-body-to-file "mail/save" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1185 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1186 (tool-bar-local-item-from-menu 'rmail-expunge "delete" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1187 map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1188 map)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1189 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1190 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1191 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1192 ;; Rmail mode is suitable only for specially formatted data. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1193 (put 'rmail-mode 'mode-class 'special) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1194 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1195 (defun rmail-mode-kill-summary () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1196 (if rmail-summary-buffer (kill-buffer rmail-summary-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1197 |
101952
3fadcabd5931
(rmail-unix-mail-delimiter): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101920
diff
changeset
|
1198 (defvar rmail-enable-multibyte) ; dynamically bound |
3fadcabd5931
(rmail-unix-mail-delimiter): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101920
diff
changeset
|
1199 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1200 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1201 (defun rmail-mode () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1202 "Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1203 All normal editing commands are turned off. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1204 Instead, these commands are available: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1205 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1206 \\[rmail-beginning-of-message] Move point to front of this message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1207 \\[rmail-end-of-message] Move point to bottom of this message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1208 \\[scroll-up] Scroll to next screen of this message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1209 \\[scroll-down] Scroll to previous screen of this message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1210 \\[rmail-next-undeleted-message] Move to Next non-deleted message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1211 \\[rmail-previous-undeleted-message] Move to Previous non-deleted message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1212 \\[rmail-next-message] Move to Next message whether deleted or not. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1213 \\[rmail-previous-message] Move to Previous message whether deleted or not. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1214 \\[rmail-first-message] Move to the first message in Rmail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1215 \\[rmail-last-message] Move to the last message in Rmail file. |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
1216 \\[rmail-show-message] Jump to message specified by numeric position in file. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1217 \\[rmail-search] Search for string and show message it is found in. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1218 \\[rmail-delete-forward] Delete this message, move to next nondeleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1219 \\[rmail-delete-backward] Delete this message, move to previous nondeleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1220 \\[rmail-undelete-previous-message] Undelete message. Tries current message, then earlier messages |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1221 till a deleted message is found. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1222 \\[rmail-edit-current-message] Edit the current message. \\[rmail-cease-edit] to return to Rmail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1223 \\[rmail-expunge] Expunge deleted messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1224 \\[rmail-expunge-and-save] Expunge and save the file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1225 \\[rmail-quit] Quit Rmail: expunge, save, then switch to another buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1226 \\[save-buffer] Save without expunging. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1227 \\[rmail-get-new-mail] Move new mail from system spool directory into this file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1228 \\[rmail-mail] Mail a message (same as \\[mail-other-window]). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1229 \\[rmail-continue] Continue composing outgoing message started before. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1230 \\[rmail-reply] Reply to this message. Like \\[rmail-mail] but initializes some fields. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1231 \\[rmail-retry-failure] Send this message again. Used on a mailer failure message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1232 \\[rmail-forward] Forward this message to another user. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1233 \\[rmail-output] Output (append) this message to another mail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1234 \\[rmail-output-as-seen] Output (append) this message to file as it's displayed. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1235 \\[rmail-output-body-to-file] Save message body to a file. Default filename comes from Subject line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1236 \\[rmail-input] Input Rmail file. Run Rmail on that file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1237 \\[rmail-add-label] Add label to message. It will be displayed in the mode line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1238 \\[rmail-kill-label] Kill label. Remove a label from current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1239 \\[rmail-next-labeled-message] Move to Next message with specified label |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1240 (label defaults to last one specified). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1241 Standard labels: filed, unseen, answered, forwarded, deleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1242 Any other label is present only if you add it with \\[rmail-add-label]. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1243 \\[rmail-previous-labeled-message] Move to Previous message with specified label |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1244 \\[rmail-summary] Show headers buffer, with a one line summary of each message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1245 \\[rmail-summary-by-labels] Summarize only messages with particular label(s). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1246 \\[rmail-summary-by-recipients] Summarize only messages with particular recipient(s). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1247 \\[rmail-summary-by-regexp] Summarize only messages with particular regexp(s). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1248 \\[rmail-summary-by-topic] Summarize only messages with subject line regexp(s). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1249 \\[rmail-toggle-header] Toggle display of complete header." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1250 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1251 (let ((finding-rmail-file (not (eq major-mode 'rmail-mode)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1252 (rmail-mode-2) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1253 (when (and finding-rmail-file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1254 (null coding-system-for-read) |
104823
68150c643e2e
Use default-value rather than default-enable-multibyte-characters.
Glenn Morris <rgm@gnu.org>
parents:
104384
diff
changeset
|
1255 (default-value 'enable-multibyte-characters)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1256 (let ((rmail-enable-multibyte t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1257 (rmail-require-mime-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1258 (rmail-convert-file-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1259 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1260 (set-buffer-multibyte t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1261 (rmail-set-message-counters) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
1262 (rmail-show-message rmail-total-messages) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1263 (when finding-rmail-file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1264 (when rmail-display-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1265 (rmail-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1266 (rmail-construct-io-menu)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1267 (run-mode-hooks 'rmail-mode-hook))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1268 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1269 (defun rmail-mode-2 () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1270 (kill-all-local-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1271 (rmail-mode-1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1272 (rmail-perm-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1273 (rmail-variables)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1274 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1275 (defun rmail-mode-1 () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1276 (setq major-mode 'rmail-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1277 (setq mode-name "RMAIL") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1278 (setq buffer-read-only t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1279 ;; No need to auto save RMAIL files in normal circumstances |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1280 ;; because they contain no info except attribute changes |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1281 ;; and deletion of messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1282 ;; The one exception is when messages are copied into another mbox buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1283 ;; rmail-output enables auto save when you do that. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1284 (setq buffer-auto-save-file-name nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1285 (use-local-map rmail-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1286 (set-syntax-table text-mode-syntax-table) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1287 (setq local-abbrev-table text-mode-abbrev-table) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1288 ;; Functions to support buffer swapping: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1289 (add-hook 'write-region-annotate-functions |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1290 'rmail-write-region-annotate nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1291 (add-hook 'kill-buffer-hook 'rmail-mode-kill-buffer-hook nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1292 (add-hook 'change-major-mode-hook 'rmail-change-major-mode-hook nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1293 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1294 (defun rmail-generate-viewer-buffer () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1295 "Return a reusable buffer suitable for viewing messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1296 Create the buffer if necessary." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1297 (let* ((suffix (file-name-nondirectory (or buffer-file-name (buffer-name)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1298 (name (format " *message-viewer %s*" suffix)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1299 (buf (get-buffer name))) |
101408
ffa1ec11b74f
(rmail-generate-viewer-buffer): Fix typo.
Chong Yidong <cyd@stupidchicken.com>
parents:
101396
diff
changeset
|
1300 (or buf |
ffa1ec11b74f
(rmail-generate-viewer-buffer): Fix typo.
Chong Yidong <cyd@stupidchicken.com>
parents:
101396
diff
changeset
|
1301 (generate-new-buffer name)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1302 |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1303 (defun rmail-swap-buffers () |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1304 "Swap text between current buffer and `rmail-view-buffer'. |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1305 This function preserves the current buffer's modified flag, and also |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1306 sets the current buffer's `buffer-file-coding-system' to that of |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1307 `rmail-view-buffer'." |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1308 (let ((modp (buffer-modified-p)) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1309 (coding |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1310 (with-current-buffer rmail-view-buffer |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1311 buffer-file-coding-system))) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1312 (buffer-swap-text rmail-view-buffer) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1313 (setq buffer-file-coding-system coding) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1314 (restore-buffer-modified-p modp))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1315 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1316 (defun rmail-buffers-swapped-p () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1317 "Return non-nil if the message collection is in `rmail-view-buffer'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1318 ;; This is analogous to tar-data-swapped-p in tar-mode.el. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1319 (and (buffer-live-p rmail-view-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1320 rmail-buffer-swapped)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1321 |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1322 (defun rmail-change-major-mode-hook () |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1323 ;; Bring the actual Rmail messages back into the main buffer. |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1324 (when (rmail-buffers-swapped-p) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1325 (rmail-swap-buffers) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1326 (setq rmail-buffer-swapped nil))) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1327 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1328 (defun rmail-swap-buffers-maybe () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1329 "Determine if the Rmail buffer is showing a message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1330 If so restore the actual mbox message collection." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1331 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1332 (when (rmail-buffers-swapped-p) |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
1333 (rmail-swap-buffers) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1334 (setq rmail-buffer-swapped nil)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1335 |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1336 (defun rmail-modify-format () |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1337 "Warn if important modifications would change Rmail file's format." |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1338 (with-current-buffer rmail-buffer |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1339 (and rmail-was-converted |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1340 ;; If it's already modified, don't warn again. |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1341 (not rmail-seriously-modified) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1342 (not |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1343 (yes-or-no-p |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1344 (message "After this, %s would be saved in mbox format. Proceed? " |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1345 (buffer-name)))) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1346 (error "Aborted")) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1347 (setq rmail-seriously-modified t))) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1348 |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1349 (defun rmail-dont-modify-format () |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1350 (when (and rmail-was-converted (not rmail-seriously-modified)) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1351 (set-buffer-modified-p nil) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1352 (message "Marking buffer unmodified to avoid rewriting Babyl file as mbox file"))) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1353 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1354 (defun rmail-mode-kill-buffer-hook () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1355 (if (buffer-live-p rmail-view-buffer) (kill-buffer rmail-view-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1356 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1357 ;; Set up the permanent locals associated with an Rmail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1358 (defun rmail-perm-variables () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1359 (make-local-variable 'rmail-last-regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1360 (make-local-variable 'rmail-deleted-vector) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1361 (make-local-variable 'rmail-buffer) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1362 (make-local-variable 'rmail-was-converted) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1363 (setq rmail-was-converted nil) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1364 (make-local-variable 'rmail-seriously-modified) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1365 (setq rmail-seriously-modified nil) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1366 (setq rmail-buffer (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1367 (set-buffer-multibyte nil) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1368 (with-current-buffer (setq rmail-view-buffer (rmail-generate-viewer-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1369 (setq buffer-undo-list t) |
102405
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
1370 (set (make-local-variable 'rmail-overlay-list) nil) |
101705
f6dc10ed5a92
(rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'.
Eli Zaretskii <eliz@gnu.org>
parents:
101695
diff
changeset
|
1371 (set-buffer-multibyte t) |
f6dc10ed5a92
(rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'.
Eli Zaretskii <eliz@gnu.org>
parents:
101695
diff
changeset
|
1372 ;; Force C-x C-s write Unix EOLs. |
f6dc10ed5a92
(rmail-convert-babyl-to-mbox): Set Rmail's buffer encoding to `raw-text-unix'.
Eli Zaretskii <eliz@gnu.org>
parents:
101695
diff
changeset
|
1373 (set-buffer-file-coding-system 'undecided-unix)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1374 (make-local-variable 'rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1375 (make-local-variable 'rmail-summary-vector) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1376 (make-local-variable 'rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1377 (make-local-variable 'rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1378 (setq rmail-total-messages 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1379 (make-local-variable 'rmail-message-vector) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1380 (make-local-variable 'rmail-msgref-vector) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1381 (make-local-variable 'rmail-inbox-list) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1382 ;; Provide default set of inboxes for primary mail file ~/RMAIL. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1383 (and (null rmail-inbox-list) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1384 (or (equal buffer-file-name (expand-file-name rmail-file-name)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1385 (equal buffer-file-truename |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1386 (abbreviate-file-name (file-truename rmail-file-name)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1387 (setq rmail-inbox-list |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1388 (or rmail-primary-inbox-list |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1389 (list (or (getenv "MAIL") |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1390 ;; FIXME expand-file-name? |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1391 (concat rmail-spool-directory |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1392 (user-login-name))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1393 (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1394 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1395 ;; Set up the non-permanent locals associated with Rmail mode. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1396 (defun rmail-variables () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1397 ;; Turn off undo. We turn it back on in rmail-edit. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1398 (setq buffer-undo-list t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1399 ;; Don't let a local variables list in a message cause confusion. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1400 (make-local-variable 'local-enable-local-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1401 (setq local-enable-local-variables nil) |
103918
74a905fff633
* files.el (auto-save-mode): If buffer-saved-size is -2, don't clobber it.
Richard M. Stallman <rms@gnu.org>
parents:
103247
diff
changeset
|
1402 ;; Don't turn off auto-saving based on the size of the buffer |
74a905fff633
* files.el (auto-save-mode): If buffer-saved-size is -2, don't clobber it.
Richard M. Stallman <rms@gnu.org>
parents:
103247
diff
changeset
|
1403 ;; because that code does not understand buffer-swapping. |
104016
e59e70025fe8
* mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions.
Chong Yidong <cyd@stupidchicken.com>
parents:
103998
diff
changeset
|
1404 (make-local-variable 'auto-save-include-big-deletions) |
e59e70025fe8
* mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions.
Chong Yidong <cyd@stupidchicken.com>
parents:
103998
diff
changeset
|
1405 (setq auto-save-include-big-deletions t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1406 (make-local-variable 'revert-buffer-function) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1407 (setq revert-buffer-function 'rmail-revert) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1408 (make-local-variable 'font-lock-defaults) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1409 (setq font-lock-defaults |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1410 '(rmail-font-lock-keywords |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1411 t t nil nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1412 (font-lock-maximum-size . nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1413 (font-lock-fontify-buffer-function . rmail-fontify-buffer-function) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1414 (font-lock-unfontify-buffer-function . rmail-unfontify-buffer-function) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1415 (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1416 (make-local-variable 'require-final-newline) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1417 (setq require-final-newline nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1418 (make-local-variable 'version-control) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1419 (setq version-control 'never) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1420 (make-local-variable 'kill-buffer-hook) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1421 (add-hook 'kill-buffer-hook 'rmail-mode-kill-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1422 (make-local-variable 'file-precious-flag) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1423 (setq file-precious-flag t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1424 (make-local-variable 'desktop-save-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1425 (setq desktop-save-buffer t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1426 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1427 ;; Handle M-x revert-buffer done in an rmail-mode buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1428 (defun rmail-revert (arg noconfirm) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1429 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1430 (let* ((revert-buffer-function (default-value 'revert-buffer-function)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1431 (rmail-enable-multibyte enable-multibyte-characters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1432 ;; See similar code in `rmail'. |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
1433 ;; FIXME needs updating? |
102021
c7da4634b3a9
(rmail): When reverting, swap buffers before setting counters. (Bug#2229)
Glenn Morris <rgm@gnu.org>
parents:
102012
diff
changeset
|
1434 (coding-system-for-read (and rmail-enable-multibyte 'raw-text)) |
c7da4634b3a9
(rmail): When reverting, swap buffers before setting counters. (Bug#2229)
Glenn Morris <rgm@gnu.org>
parents:
102012
diff
changeset
|
1435 (before-revert-hook 'rmail-swap-buffers-maybe)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1436 ;; Call our caller again, but this time it does the default thing. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1437 (when (revert-buffer arg noconfirm) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1438 ;; If the user said "yes", and we changed something, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1439 ;; reparse the messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1440 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1441 (rmail-mode-2) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1442 ;; Convert all or part to Babyl file if possible. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1443 (rmail-convert-file-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1444 ;; We have read the file as raw-text, so the buffer is set to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1445 ;; unibyte. Make it multibyte if necessary. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1446 (if (and rmail-enable-multibyte |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1447 (not enable-multibyte-characters)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1448 (set-buffer-multibyte t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1449 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1450 (rmail-set-message-counters) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
1451 (rmail-show-message rmail-total-messages) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1452 (run-hooks 'rmail-mode-hook)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1453 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1454 (defun rmail-expunge-and-save () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1455 "Expunge and save RMAIL file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1456 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1457 (set-buffer rmail-buffer) |
102874
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
1458 (rmail-expunge) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1459 ;; No need to swap buffers: rmail-write-region-annotate takes care of it. |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
1460 ;; (rmail-swap-buffers-maybe) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1461 (save-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1462 (if (rmail-summary-exists) |
102874
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
1463 (rmail-select-summary (set-buffer-modified-p nil)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1464 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1465 (defun rmail-quit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1466 "Quit out of RMAIL. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1467 Hook `rmail-quit-hook' is run after expunging." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1468 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1469 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1470 (rmail-expunge t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1471 (save-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1472 (when (boundp 'rmail-quit-hook) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1473 (run-hooks 'rmail-quit-hook)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1474 ;; Don't switch to the summary buffer even if it was recently visible. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1475 (when rmail-summary-buffer |
102874
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
1476 (with-current-buffer rmail-summary-buffer |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
1477 (set-buffer-modified-p nil)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1478 (replace-buffer-in-windows rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1479 (bury-buffer rmail-summary-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1480 (if rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1481 (let ((obuf rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1482 (ovbuf rmail-view-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1483 (set-buffer rmail-view-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1484 (quit-window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1485 (replace-buffer-in-windows ovbuf) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1486 (replace-buffer-in-windows obuf) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1487 (bury-buffer obuf)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1488 (let ((obuf (current-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1489 (quit-window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1490 (replace-buffer-in-windows obuf)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1491 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1492 (defun rmail-bury () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1493 "Bury current Rmail buffer and its summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1494 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1495 ;; This let var was called rmail-buffer, but that interfered |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1496 ;; with the buffer-local var used in summary buffers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1497 (let ((buffer-to-bury (current-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1498 (if (rmail-summary-exists) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1499 (let (window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1500 (while (setq window (get-buffer-window rmail-summary-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1501 (quit-window nil window)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1502 (bury-buffer rmail-summary-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1503 (quit-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1504 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1505 (defun rmail-duplicate-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1506 "Create a duplicated copy of the current message. |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
1507 The duplicate copy goes into the Rmail file just after the original." |
101817
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1508 ;; If we are in a summary buffer, switch to the Rmail buffer. |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
1509 ;; FIXME simpler to swap the contents, not the buffers? |
101817
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1510 (set-buffer rmail-buffer) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1511 (rmail-modify-format) |
101817
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1512 (let ((buff (current-buffer)) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1513 (n rmail-current-message) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1514 (beg (rmail-msgbeg rmail-current-message)) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1515 (end (rmail-msgend rmail-current-message))) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1516 (if (rmail-buffers-swapped-p) (set-buffer rmail-view-buffer)) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
1517 (widen) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
1518 (let ((buffer-read-only nil) |
101817
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1519 (string (buffer-substring-no-properties beg end))) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1520 (goto-char end) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1521 (insert string)) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1522 (set-buffer buff) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1523 (rmail-swap-buffers-maybe) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1524 (goto-char (point-max)) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1525 (rmail-set-message-counters) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1526 (set-buffer-modified-p t) |
101992
ef7ed7efa61c
(rmail-show-message-1): New name for the old rmail-show-message.
Glenn Morris <rgm@gnu.org>
parents:
101991
diff
changeset
|
1527 (rmail-show-message-1 n)) |
101817
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1528 (if (rmail-summary-exists) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1529 (rmail-select-summary (rmail-update-summary))) |
47b9194b4a87
(rmail-duplicate-message): Make it work.
Glenn Morris <rgm@gnu.org>
parents:
101810
diff
changeset
|
1530 (message "Message duplicated")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1531 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1532 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1533 (defun rmail-input (filename) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1534 "Run Rmail on file FILENAME." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1535 (interactive "FRun rmail on RMAIL file: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1536 (rmail filename)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1537 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1538 ;; This used to scan subdirectories recursively, but someone pointed out |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1539 ;; that if the user wants that, person can put all the files in one dir. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1540 ;; And the recursive scan was slow. So I took it out. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1541 ;; rms, Sep 1996. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1542 (defun rmail-find-all-files (start) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1543 "Return list of file in dir START that match `rmail-secondary-file-regexp'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1544 (if (file-accessible-directory-p start) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1545 ;; Don't sort here. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1546 (let* ((case-fold-search t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1547 (files (directory-files start t rmail-secondary-file-regexp))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1548 ;; Sort here instead of in directory-files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1549 ;; because this list is usually much shorter. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1550 (sort files 'string<)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1551 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1552 (defun rmail-list-to-menu (menu-name l action &optional full-name) |
102229
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
1553 (let ((menu (make-sparse-keymap menu-name)) |
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
1554 name) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1555 (mapc |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1556 (lambda (item) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1557 (let (command) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1558 (if (consp item) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1559 (setq command |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1560 (rmail-list-to-menu |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1561 (car item) (cdr item) action |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1562 (if full-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1563 (concat full-name "/" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1564 (car item)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1565 (car item))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1566 name (car item)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1567 (setq name item) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1568 (setq command |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1569 (list 'lambda () '(interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1570 (list action |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1571 (expand-file-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1572 (if full-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1573 (concat full-name "/" item) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1574 item) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1575 rmail-secondary-file-directory))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1576 (define-key menu (vector (intern name)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1577 (cons name command)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1578 (reverse l)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1579 menu)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1580 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1581 ;; This command is always "disabled" when it appears in a menu. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1582 (put 'rmail-disable-menu 'menu-enable ''nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1583 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1584 (defun rmail-construct-io-menu () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1585 (let ((files (rmail-find-all-files rmail-secondary-file-directory))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1586 (if files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1587 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1588 (define-key rmail-mode-map [menu-bar classify input-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1589 (cons "Input Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1590 (rmail-list-to-menu "Input Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1591 files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1592 'rmail-input))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1593 (define-key rmail-mode-map [menu-bar classify output-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1594 (cons "Output Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1595 (rmail-list-to-menu "Output Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1596 files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1597 'rmail-output)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1598 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1599 (define-key rmail-mode-map [menu-bar classify input-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1600 '("Input Rmail File" . rmail-disable-menu)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1601 (define-key rmail-mode-map [menu-bar classify output-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1602 '("Output Rmail File" . rmail-disable-menu))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1603 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1604 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1605 ;;;; *** Rmail input *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1606 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1607 (declare-function rmail-summary-goto-msg "rmailsum" (&optional n nowarn skip-rmail)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1608 (declare-function rmail-summary-mark-undeleted "rmailsum" (n)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1609 (declare-function rmail-summary-mark-deleted "rmailsum" (&optional n undel)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1610 (declare-function rfc822-addresses "rfc822" (header-text)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1611 (declare-function mail-abbrev-make-syntax-table "mailabbrev.el" ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1612 (declare-function mail-sendmail-delimit-header "sendmail" ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1613 (declare-function mail-header-end "sendmail" ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1614 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1615 ;; RLK feature not added in this version: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1616 ;; argument specifies inbox file or files in various ways. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1617 |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1618 ;; In Babyl, the Mail: header in the preamble overrode rmail-inbox-list. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1619 ;; Mbox does not have this feature. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1620 (defun rmail-get-new-mail (&optional file-name) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1621 "Move any new mail from this Rmail file's inbox files. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1622 The buffer-local variable `rmail-inbox-list' specifies the list |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1623 of inbox files. By default, this is nil, except for your primary |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1624 Rmail file `rmail-file-name'. In this case, when you first visit |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1625 the Rmail file it is initialized using either |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1626 `rmail-primary-inbox-list', or the \"MAIL\" environment variable, |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1627 or the function `user-login-name' and the directory |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1628 `rmail-spool-directory' (whose value depends on the operating system). |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1629 |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1630 The command `set-rmail-inbox-list' sets `rmail-inbox-list' to the |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1631 value you specify. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1632 |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1633 You can also specify the file to get new mail from just for one |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1634 instance of this command. In this case, the file of new mail is |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1635 not changed or deleted. Noninteractively, you can pass the inbox |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1636 file name as an argument. Interactively, a prefix argument |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1637 causes us to read a file name and use that file as the inbox. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1638 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1639 If the variable `rmail-preserve-inbox' is non-nil, new mail will |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1640 always be left in inbox files rather than deleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1641 |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1642 Before doing anything, this runs `rmail-before-get-new-mail-hook'. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1643 Just before returning, it runs `rmail-after-get-new-mail-hook', |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1644 whether or not there is new mail. |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1645 |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1646 If there is new mail, it runs `rmail-get-new-mail-hook', saves |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1647 the updated file, and shows the first unseen message (which might |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1648 not be a new one). It returns non-nil if it got any new messages." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1649 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1650 (list (if current-prefix-arg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1651 (read-file-name "Get new mail from file: ")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1652 (run-hooks 'rmail-before-get-new-mail-hook) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1653 ;; If the disk file has been changed from under us, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1654 ;; revert to it before we get new mail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1655 (or (verify-visited-file-modtime (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1656 (find-file (buffer-file-name))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1657 (set-buffer rmail-buffer) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
1658 (rmail-modify-format) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1659 (rmail-swap-buffers-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1660 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1661 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1662 ;; Get rid of all undo records for this buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1663 (or (eq buffer-undo-list t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1664 (setq buffer-undo-list nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1665 (let ((all-files (if file-name (list file-name) rmail-inbox-list)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1666 (rmail-enable-multibyte (default-value 'enable-multibyte-characters)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1667 found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1668 (unwind-protect |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1669 (progn |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1670 ;; This loops if any members of the inbox list have the same |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1671 ;; basename (see "name conflict" below). |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1672 (while all-files |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1673 (let ((opoint (point)) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1674 ;; If buffer has not changed yet, and has not been |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1675 ;; saved yet, don't replace the old backup file now. |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1676 (make-backup-files (and make-backup-files |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1677 (buffer-modified-p))) |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1678 (buffer-read-only nil) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1679 ;; Don't make undo records while getting mail. |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1680 (buffer-undo-list t) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1681 delete-files success files file-last-names) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1682 ;; Pull files off all-files onto files as long as there is |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1683 ;; no name conflict. A conflict happens when two inbox |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1684 ;; file names have the same last component. |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1685 ;; The reason this careful handling is necessary seems |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1686 ;; to be that rmail-insert-inbox-text uses .newmail-BASENAME. |
101766
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
1687 (while (and all-files |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1688 (not (member (file-name-nondirectory (car all-files)) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1689 file-last-names))) |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1690 (setq files (cons (car all-files) files) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1691 file-last-names |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1692 (cons (file-name-nondirectory (car all-files)) files)) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1693 (setq all-files (cdr all-files))) |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1694 ;; Put them back in their original order. |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1695 (setq files (nreverse files)) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1696 ;; In case of brain damage caused by require-final-newline. |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1697 (goto-char (point-max)) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1698 (skip-chars-backward " \t\n") |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
1699 (delete-region (point) (point-max)) |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1700 (setq found (or |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1701 (rmail-get-new-mail-1 file-name files delete-files) |
101766
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
1702 found)))) |
101784
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1703 ;; Move to the first new message unless we have other unseen |
d9595deb9142
No need for mule-util when compiling.
Glenn Morris <rgm@gnu.org>
parents:
101766
diff
changeset
|
1704 ;; messages before it. |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
1705 (if found (rmail-show-message (rmail-first-unseen-message))) |
101766
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
1706 (run-hooks 'rmail-after-get-new-mail-hook) |
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
1707 found) |
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
1708 ;; Don't leave the buffer screwed up if we get a disk-full error. |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
1709 (rmail-show-message)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1710 |
102111
206623e4bc00
(rsf-beep, rsf-sleep-after-message, rmail-spam-filter): Don't declare.
Glenn Morris <rgm@gnu.org>
parents:
102097
diff
changeset
|
1711 (defvar rmail-use-spam-filter) |
206623e4bc00
(rsf-beep, rsf-sleep-after-message, rmail-spam-filter): Don't declare.
Glenn Morris <rgm@gnu.org>
parents:
102097
diff
changeset
|
1712 (declare-function rmail-get-new-mail-filter-spam "rmail-spam-filter" (nnew)) |
206623e4bc00
(rsf-beep, rsf-sleep-after-message, rmail-spam-filter): Don't declare.
Glenn Morris <rgm@gnu.org>
parents:
102097
diff
changeset
|
1713 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1714 (defun rmail-get-new-mail-1 (file-name files delete-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1715 "Return t if new messages are detected without error, nil otherwise." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1716 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1717 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1718 (let ((new-messages 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1719 (spam-filter-p (and (featurep 'rmail-spam-filter) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1720 rmail-use-spam-filter)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1721 (blurb "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1722 result success suffix) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1723 (narrow-to-region (point) (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1724 ;; Read in the contents of the inbox files, renaming them as |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1725 ;; necessary, and adding to the list of files to delete |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1726 ;; eventually. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1727 (if file-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1728 (rmail-insert-inbox-text files nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1729 (setq delete-files (rmail-insert-inbox-text files t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1730 ;; Scan the new text and convert each message to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1731 ;; Rmail/mbox format. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1732 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1733 (skip-chars-forward " \n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1734 (narrow-to-region (point) (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1735 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1736 (setq new-messages (rmail-add-mbox-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1737 success t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1738 ;; Try to delete the garbage just inserted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1739 (or success (delete-region (point-min) (point-max))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1740 ;; If we could not convert the file's inboxes, rename the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1741 ;; files we tried to read so we won't over and over again. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1742 (if (and (not file-name) (not success)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1743 (let ((delfiles delete-files) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1744 (count 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1745 (while delfiles |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1746 (while (file-exists-p (format "RMAILOSE.%d" count)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1747 (setq count (1+ count))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1748 (rename-file (car delfiles) (format "RMAILOSE.%d" count)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1749 (setq delfiles (cdr delfiles)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1750 ;; Determine if there are messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1751 (unless (zerop new-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1752 ;; There are. Process them. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1753 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1754 (rmail-count-new-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1755 (run-hooks 'rmail-get-new-mail-hook) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1756 (save-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1757 ;; Delete the old files, now that the Rmail file is saved. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1758 (while delete-files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1759 (condition-case () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1760 ;; First, try deleting. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1761 (condition-case () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1762 (delete-file (car delete-files)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1763 (file-error |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1764 ;; If we can't delete it, truncate it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1765 (write-region (point) (point) (car delete-files)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1766 (file-error nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1767 (setq delete-files (cdr delete-files))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1768 (if (zerop new-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1769 (when (or file-name rmail-inbox-list) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1770 (message "(No new mail has arrived)")) |
102111
206623e4bc00
(rsf-beep, rsf-sleep-after-message, rmail-spam-filter): Don't declare.
Glenn Morris <rgm@gnu.org>
parents:
102097
diff
changeset
|
1771 (if spam-filter-p |
206623e4bc00
(rsf-beep, rsf-sleep-after-message, rmail-spam-filter): Don't declare.
Glenn Morris <rgm@gnu.org>
parents:
102097
diff
changeset
|
1772 (setq blurb (rmail-get-new-mail-filter-spam new-messages)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1773 (if (rmail-summary-exists) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1774 (rmail-select-summary (rmail-update-summary))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1775 (setq suffix (if (= 1 new-messages) "" "s")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1776 (message "%d new message%s read%s" new-messages suffix blurb) |
101766
4c8d51496578
(rmail-convert-babyl-to-mbox): Disable undo while
Glenn Morris <rgm@gnu.org>
parents:
101748
diff
changeset
|
1777 ;; Establish the return value. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1778 (setq result (> new-messages 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1779 result)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1780 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1781 (defun rmail-parse-url (file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1782 "Parse the supplied URL. Return (list MAILBOX-NAME REMOTE PASSWORD GOT-PASSWORD) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1783 WHERE MAILBOX-NAME is the name of the mailbox suitable as argument to the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1784 actual version of `movemail', REMOTE is non-nil if MAILBOX-NAME refers to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1785 a remote mailbox, PASSWORD is the password if it should be |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1786 supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1787 is non-nil if the user has supplied the password interactively. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1788 " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1789 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1790 ((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1791 (let (got-password supplied-password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1792 (proto (match-string 1 file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1793 (user (match-string 3 file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1794 (pass (match-string 5 file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1795 (host (substring file (or (match-end 2) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1796 (+ 3 (match-end 1)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1797 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1798 (if (not pass) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1799 (when rmail-remote-password-required |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1800 (setq got-password (not (rmail-have-password))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1801 (setq supplied-password (rmail-get-remote-password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1802 (string-equal proto "imap")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1803 ;; The password is embedded. Strip it out since movemail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1804 ;; does not really like it, in spite of the movemail spec. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1805 (setq file (concat proto "://" user "@" host))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1806 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1807 (if (rmail-movemail-variant-p 'emacs) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1808 (if (string-equal proto "pop") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1809 (list (concat "po:" user ":" host) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1810 t |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1811 (or pass supplied-password) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1812 got-password) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1813 (error "Emacs movemail does not support %s protocol" proto)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1814 (list file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1815 (or (string-equal proto "pop") (string-equal proto "imap")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1816 (or supplied-password pass) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1817 got-password)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1818 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1819 ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1820 (let (got-password supplied-password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1821 (proto "pop") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1822 (user (match-string 1 file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1823 (host (match-string 3 file))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1824 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1825 (when rmail-remote-password-required |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1826 (setq got-password (not (rmail-have-password))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1827 (setq supplied-password (rmail-get-remote-password nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1828 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1829 (list file "pop" supplied-password got-password))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1830 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1831 (t |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1832 (list file nil nil nil)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1833 |
102925
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1834 (defun rmail-unrmail-new-mail (from-file) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1835 "Replace newly read mail in Babyl format with equivalent mbox format. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1836 |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1837 FROM-FILE is the Babyl file from which the new mail should be read." |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1838 (let ((to-file (make-temp-file "rmail")) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1839 size) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1840 (unrmail from-file to-file) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1841 (let ((inhibit-read-only t) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1842 (coding-system-for-read 'raw-text) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1843 (buffer-undo-list t)) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1844 (delete-region (point) (point-max)) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1845 (setq size (nth 1 (insert-file-contents to-file))) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1846 (delete-file to-file) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1847 size))) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1848 |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1849 (defun rmail-unrmail-new-mail-maybe (file size) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1850 "If newly read mail from FILE is in Babyl format, convert it to mbox format. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1851 |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1852 SIZE is the original size of the newly read mail. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1853 Value is the size of the newly read mail after conversion." |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1854 ;; Detect previous Babyl format files. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1855 (let ((case-fold-search nil) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1856 (old-file file) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1857 new-file) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1858 (cond ((looking-at "BABYL OPTIONS:") |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1859 ;; The new mail is in Babyl version 5 format. Use unrmail |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1860 ;; to convert it. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1861 (setq size (rmail-unrmail-new-mail old-file))) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1862 ((looking-at "Version: 5\n") |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1863 ;; New mail is in Babyl format made by old version of |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1864 ;; Rmail. Fix the babyl file header and use unrmail to |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1865 ;; convert it. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1866 (let ((buffer-read-only nil) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1867 (write-region-annotate-functions nil) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1868 (write-region-post-annotation-function nil) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1869 (old-file (make-temp-file "rmail"))) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1870 (insert "BABYL OPTIONS: -*- rmail -*-\n") |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1871 (forward-line -1) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1872 (write-region (point) (point-max) old-file) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1873 (setq size (rmail-unrmail-new-mail old-file)) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1874 (delete-file old-file)))) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1875 size)) |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1876 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1877 (defun rmail-insert-inbox-text (files renamep) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1878 ;; Detect a locked file now, so that we avoid moving mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1879 ;; out of the real inbox file. (That could scare people.) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1880 (or (memq (file-locked-p buffer-file-name) '(nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1881 (error "RMAIL file %s is locked" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1882 (file-name-nondirectory buffer-file-name))) |
101426
ad60c4496a16
(rmail-insert-inbox-text): Revert replacement of "popmail" by "pormail".
Glenn Morris <rgm@gnu.org>
parents:
101418
diff
changeset
|
1883 (let (file tofile delete-files movemail popmail got-password password) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1884 (while files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1885 ;; Handle remote mailbox names specially; don't expand as filenames |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1886 ;; in case the userid contains a directory separator. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1887 (setq file (car files)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1888 (let ((url-data (rmail-parse-url file))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1889 (setq file (nth 0 url-data)) |
101426
ad60c4496a16
(rmail-insert-inbox-text): Revert replacement of "popmail" by "pormail".
Glenn Morris <rgm@gnu.org>
parents:
101418
diff
changeset
|
1890 (setq popmail (nth 1 url-data)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1891 (setq password (nth 2 url-data)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1892 (setq got-password (nth 3 url-data))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1893 |
101426
ad60c4496a16
(rmail-insert-inbox-text): Revert replacement of "popmail" by "pormail".
Glenn Morris <rgm@gnu.org>
parents:
101418
diff
changeset
|
1894 (if popmail |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1895 (setq renamep t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1896 (setq file (file-truename |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1897 (substitute-in-file-name (expand-file-name file))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1898 (setq tofile (expand-file-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1899 ;; Generate name to move to from inbox name, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1900 ;; in case of multiple inboxes that need moving. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1901 (concat ".newmail-" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1902 (file-name-nondirectory |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1903 (if (memq system-type '(windows-nt cygwin ms-dos)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1904 ;; cannot have colons in file name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1905 (replace-regexp-in-string ":" "-" file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1906 file))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1907 ;; Use the directory of this rmail file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1908 ;; because it's a nuisance to use the homedir |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1909 ;; if that is on a full disk and this rmail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1910 ;; file isn't. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1911 (file-name-directory |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1912 (expand-file-name buffer-file-name)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1913 ;; Always use movemail to rename the file, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1914 ;; since there can be mailboxes in various directories. |
101426
ad60c4496a16
(rmail-insert-inbox-text): Revert replacement of "popmail" by "pormail".
Glenn Morris <rgm@gnu.org>
parents:
101418
diff
changeset
|
1915 (when (not popmail) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1916 ;; On some systems, /usr/spool/mail/foo is a directory |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1917 ;; and the actual inbox is /usr/spool/mail/foo/foo. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1918 (if (file-directory-p file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1919 (setq file (expand-file-name (user-login-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1920 file)))) |
101426
ad60c4496a16
(rmail-insert-inbox-text): Revert replacement of "popmail" by "pormail".
Glenn Morris <rgm@gnu.org>
parents:
101418
diff
changeset
|
1921 (cond (popmail |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1922 (message "Getting mail from the remote server ...")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1923 ((and (file-exists-p tofile) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1924 (/= 0 (nth 7 (file-attributes tofile)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1925 (message "Getting mail from %s..." tofile)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1926 ((and (file-exists-p file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1927 (/= 0 (nth 7 (file-attributes file)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1928 (message "Getting mail from %s..." file))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1929 ;; Set TOFILE if have not already done so, and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1930 ;; rename or copy the file FILE to TOFILE if and as appropriate. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1931 (cond ((not renamep) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1932 (setq tofile file)) |
101426
ad60c4496a16
(rmail-insert-inbox-text): Revert replacement of "popmail" by "pormail".
Glenn Morris <rgm@gnu.org>
parents:
101418
diff
changeset
|
1933 ((or (file-exists-p tofile) (and (not popmail) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1934 (not (file-exists-p file)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1935 nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1936 (t |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1937 (with-temp-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1938 (let ((errors (current-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1939 (buffer-disable-undo errors) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1940 (let ((args |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1941 (append |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1942 (list (or rmail-movemail-program "movemail") nil errors nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1943 (if rmail-preserve-inbox |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1944 (list "-p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1945 nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1946 (if (rmail-movemail-variant-p 'mailutils) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1947 (append (list "--emacs") rmail-movemail-flags) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1948 rmail-movemail-flags) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1949 (list file tofile) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1950 (if password (list password) nil)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1951 (apply 'call-process args)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1952 (if (not (buffer-modified-p errors)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1953 ;; No output => movemail won |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1954 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1955 (set-buffer errors) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1956 (subst-char-in-region (point-min) (point-max) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
1957 ?\n ?\s) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1958 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1959 (skip-chars-backward " \t") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1960 (delete-region (point) (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1961 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1962 (if (looking-at "movemail: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1963 (delete-region (point-min) (match-end 0))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1964 (beep t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1965 ;; If we just read the password, most likely it is |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1966 ;; wrong. Otherwise, see if there is a specific |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1967 ;; reason to think that the problem is a wrong passwd. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1968 (if (or got-password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1969 (re-search-forward rmail-remote-password-error |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1970 nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1971 (rmail-set-remote-password nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1972 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1973 ;; If using Mailutils, remove initial error code |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1974 ;; abbreviation |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1975 (when (rmail-movemail-variant-p 'mailutils) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1976 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1977 (when (looking-at "[A-Z][A-Z0-9_]*:") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1978 (delete-region (point-min) (match-end 0)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1979 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1980 (message "movemail: %s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1981 (buffer-substring (point-min) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1982 (point-max))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1983 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1984 (sit-for 3) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1985 nil))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1986 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1987 ;; At this point, TOFILE contains the name to read: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1988 ;; Either the alternate name (if we renamed) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1989 ;; or the actual inbox (if not renaming). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1990 (if (file-exists-p tofile) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1991 (let ((coding-system-for-read 'no-conversion) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1992 size) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1993 (goto-char (point-max)) |
102925
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1994 (setq size |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1995 ;; If new mail is in Babyl format, convert it to mbox. |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1996 (rmail-unrmail-new-mail-maybe |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1997 tofile |
f0dd383a41d7
(rmail-unrmail-new-mail, rmail-unrmail-new-mail-maybe): New functions.
Eli Zaretskii <eliz@gnu.org>
parents:
102910
diff
changeset
|
1998 (nth 1 (insert-file-contents tofile)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1999 ;; Determine if a pair of newline message separators need |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2000 ;; to be added to the new collection of messages. This is |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2001 ;; the case for all new message collections added to a |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2002 ;; non-empty mail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2003 (unless (zerop size) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2004 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2005 (let ((start (point-min))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2006 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2007 (unless (eq start (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2008 (goto-char start) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2009 (insert "\n\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2010 (setq size (+ 2 size)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2011 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2012 (or (= (preceding-char) ?\n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2013 (zerop size) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2014 (insert ?\n)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2015 (if (not (and rmail-preserve-inbox (string= file tofile))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2016 (setq delete-files (cons tofile delete-files))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2017 (message "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2018 (setq files (cdr files))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2019 delete-files)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2020 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2021 ;; Decode the region specified by FROM and TO by CODING. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2022 ;; If CODING is nil or an invalid coding system, decode by `undecided'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2023 (defun rmail-decode-region (from to coding &optional destination) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2024 (if (or (not coding) (not (coding-system-p coding))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2025 (setq coding 'undecided)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2026 ;; Use -dos decoding, to remove ^M characters left from base64 or |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2027 ;; rogue qp-encoded text. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2028 (decode-coding-region |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2029 from to (coding-system-change-eol-conversion coding 1) destination) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2030 ;; Don't reveal the fact we used -dos decoding, as users generally |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2031 ;; will not expect the RMAIL buffer to use DOS EOL format. |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2032 (cond |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2033 ((null destination) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2034 (setq buffer-file-coding-system |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2035 (setq last-coding-system-used |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2036 (coding-system-change-eol-conversion coding 0)))) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2037 ((bufferp destination) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2038 (with-current-buffer destination |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2039 (setq buffer-file-coding-system |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2040 (setq last-coding-system-used |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2041 (coding-system-change-eol-conversion coding 0))))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2042 |
102405
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2043 (defun rmail-ensure-blank-line () |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2044 "Ensure a message ends in a blank line. |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2045 Call with point at the end of the message." |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2046 (unless (bolp) |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2047 (insert "\n")) |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2048 (unless (looking-back "\n\n") |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2049 (insert "\n"))) |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2050 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2051 (defun rmail-add-mbox-headers () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2052 "Validate the RFC2822 format for the new messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2053 Point should be at the first new message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2054 An error is signalled if the new messages are not RFC2822 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2055 compliant. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2056 Unless an Rmail attribute header already exists, add it to the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2057 new messages. Return the number of new messages." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2058 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2059 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2060 (let ((count 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2061 (start (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2062 (value "------U-") |
102012
6ae248938872
(rmail-convert-file-maybe): Turn off case-fold-search.
Richard M. Stallman <rms@gnu.org>
parents:
101994
diff
changeset
|
2063 (case-fold-search nil) |
104197
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2064 (delim (concat "\n\n" rmail-unix-mail-delimiter)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2065 limit stop) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2066 ;; Detect an empty inbox file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2067 (unless (= start (point-max)) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
2068 ;; Scan the new messages to establish a count and to ensure that |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2069 ;; an attribute header is present. |
104197
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2070 (if (looking-at rmail-unix-mail-delimiter) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2071 (while (not stop) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2072 ;; Determine if a new attribute header needs to be |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2073 ;; added to the message. |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2074 (if (search-forward "\n\n" nil t) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2075 (progn |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2076 (setq count (1+ count)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2077 (narrow-to-region start (point)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2078 (unless (mail-fetch-field rmail-attribute-header) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2079 (backward-char 1) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2080 (insert rmail-attribute-header ": " value "\n")) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2081 (widen)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2082 (rmail-error-bad-format)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2083 ;; Move to the next message. |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2084 (if (not (re-search-forward delim nil 'move)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2085 (setq stop t) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2086 (goto-char (match-beginning 0)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2087 (forward-char 2)) |
104199
0462fa7b12af
(rmail-add-mbox-headers): Restore error message about invalid RFC2822 format.
Eli Zaretskii <eliz@gnu.org>
parents:
104197
diff
changeset
|
2088 (setq start (point))) |
0462fa7b12af
(rmail-add-mbox-headers): Restore error message about invalid RFC2822 format.
Eli Zaretskii <eliz@gnu.org>
parents:
104197
diff
changeset
|
2089 (rmail-error-bad-format))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2090 count)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2091 |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2092 (defun rmail-get-header-1 (name) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2093 "Subroutine of `rmail-get-header'. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2094 Narrow to header, call `mail-fetch-field' to find header NAME." |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2095 (if (search-forward "\n\n" nil t) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2096 (progn |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2097 (narrow-to-region (point-min) (point)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2098 (mail-fetch-field name)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2099 (rmail-error-bad-format))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2100 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2101 (defun rmail-get-header (name &optional msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2102 "Return the value of message header NAME, nil if it has none. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2103 MSGNUM specifies the message number to get it from. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2104 If MSGNUM is nil, use the current message." |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2105 (rmail-apply-in-message msgnum 'rmail-get-header-1 name)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2106 |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2107 (defun rmail-set-header-1 (name value) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2108 "Subroutine of `rmail-set-header'. |
101991
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2109 Narrow to header, set header NAME to VALUE, replacing existing if present. |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2110 VALUE nil means to remove NAME altogether." |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2111 (if (search-forward "\n\n" nil t) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2112 (progn |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2113 (forward-char -1) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2114 (narrow-to-region (point-min) (point)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2115 (goto-char (point-min)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2116 (if (re-search-forward (concat "^" (regexp-quote name) ":") nil 'move) |
101991
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2117 (if value |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2118 (progn |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2119 (delete-region (point) (line-end-position)) |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2120 (insert " " value)) |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2121 (delete-region (line-beginning-position) |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2122 (line-beginning-position 2))) |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2123 (if value (insert name ": " value "\n")))) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2124 (rmail-error-bad-format))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2125 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2126 (defun rmail-set-header (name &optional msgnum value) |
101991
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2127 "Set message header NAME to VALUE in message number MSGNUM. |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2128 If MSGNUM is nil, use the current message. NAME and VALUE are strings. |
22fabdb9d445
(rmail-summary-vector, rmail-mode-map): Add doc string.
Glenn Morris <rgm@gnu.org>
parents:
101954
diff
changeset
|
2129 VALUE may also be nil, meaning to remove the header." |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2130 (rmail-apply-in-message msgnum 'rmail-set-header-1 name value) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2131 (with-current-buffer rmail-buffer |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2132 ;; Ensure header changes get saved. |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2133 ;; (Note replacing a header with an identical copy modifies.) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2134 (set-buffer-modified-p t) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2135 ;; However: don't save in mbox format over a Babyl file |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2136 ;; merely because of this. |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2137 (rmail-dont-modify-format))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2138 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2139 ;;;; *** Rmail Attributes and Keywords *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2140 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2141 (defun rmail-get-attr-names (&optional msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2142 "Return the message attributes in a comma separated string. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2143 MSG specifies the message number to get it from. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2144 If MSG is nil, use the current message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2145 (let ((value (rmail-get-header rmail-attribute-header msg)) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2146 (nmax (length rmail-attr-array)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2147 result temp) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2148 (when value |
104248
0655506844f6
* mail/rmail.el (rmail-get-attr-names):
Richard M. Stallman <rms@gnu.org>
parents:
104199
diff
changeset
|
2149 (if (> (length value) nmax) |
102063
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2150 (message "Warning: corrupt attribute header in message") |
104248
0655506844f6
* mail/rmail.el (rmail-get-attr-names):
Richard M. Stallman <rms@gnu.org>
parents:
104199
diff
changeset
|
2151 (dotimes (index (length value)) |
102063
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2152 (setq temp (and (not (= ?- (aref value index))) |
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2153 (nth 1 (aref rmail-attr-array index))) |
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2154 result |
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2155 (cond |
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2156 ((and temp result) (format "%s, %s" result temp)) |
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2157 (temp temp) |
4576476829ed
(rmail-get-attr-names): Give a warning rather than an error if the
Glenn Morris <rgm@gnu.org>
parents:
102021
diff
changeset
|
2158 (t result))))) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2159 result))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2160 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2161 (defun rmail-get-keywords (&optional msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2162 "Return the message keywords in a comma separated string. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2163 MSG, if non-nil, identifies the message number to use. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2164 If nil, that means the current message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2165 (rmail-get-header rmail-keyword-header msg)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2166 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2167 (defun rmail-get-labels (&optional msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2168 "Return a string with the labels (attributes and keywords) of msg MSG. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2169 It is put in comma-separated form. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2170 MSG, if non-nil, identifies the message number to use. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2171 If nil, that means the current message." |
101411
d59cc7925a91
(rmail-get-labels): Obey the MSG argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
101408
diff
changeset
|
2172 (or msg (setq msg rmail-current-message)) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2173 (let (attr-names keywords) |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
2174 ;; Combine the message attributes and keywords |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2175 ;; into a comma-separated list. |
101411
d59cc7925a91
(rmail-get-labels): Obey the MSG argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
101408
diff
changeset
|
2176 (setq attr-names (rmail-get-attr-names msg) |
d59cc7925a91
(rmail-get-labels): Obey the MSG argument.
Chong Yidong <cyd@stupidchicken.com>
parents:
101408
diff
changeset
|
2177 keywords (rmail-get-keywords msg)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2178 (if (string= keywords "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2179 (setq keywords nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2180 (cond |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2181 ;; FIXME ? old rmail did not have spaces in the comma-separated lists. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2182 ((and attr-names keywords) (concat " " attr-names "; " keywords)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2183 (attr-names (concat " " attr-names)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2184 (keywords (concat " " keywords)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2185 (t "")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2186 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2187 (defun rmail-display-labels () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2188 "Update the current messages's attributes and keywords in mode line." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2189 (let ((blurb (rmail-get-labels))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2190 (setq mode-line-process |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2191 (format " %d/%d%s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2192 rmail-current-message rmail-total-messages blurb)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2193 ;; If rmail-enable-mime is non-nil, we may have to update |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2194 ;; `mode-line-process' of rmail-view-buffer too. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2195 (if (and rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2196 (not (eq (current-buffer) rmail-view-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2197 (buffer-live-p rmail-view-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2198 (let ((mlp mode-line-process)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2199 (with-current-buffer rmail-view-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2200 (setq mode-line-process mlp)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2201 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2202 (defun rmail-get-attr-value (attr state) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2203 "Return the character value for ATTR. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2204 ATTR is a (numeric) index, an offset into the mbox attribute |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2205 header value. STATE is one of nil, t, or a character value." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2206 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2207 ((numberp state) state) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2208 ((not state) ?-) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2209 (t (nth 0 (aref rmail-attr-array attr))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2210 |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2211 (defun rmail-set-attribute-1 (attr state) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2212 "Subroutine of `rmail-set-attribute'. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2213 Set Rmail attribute ATTR to STATE in `rmail-attribute-header', |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2214 creating the header if necessary. Returns non-nil if a |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2215 significant attribute change was made." |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2216 (let ((limit (search-forward "\n\n" nil t)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2217 (value (rmail-get-attr-value attr state)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2218 (inhibit-read-only t) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2219 altered) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2220 (goto-char (point-min)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2221 (if (search-forward (concat rmail-attribute-header ": ") limit t) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2222 ;; If this message already records attributes, just change the |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2223 ;; value for this one. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2224 (let ((missing (- (+ (point) attr) (line-end-position)))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2225 ;; Position point at this attribute, adding attributes if necessary. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2226 (if (> missing 0) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2227 (progn |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2228 (end-of-line) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2229 (insert-char ?- missing) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2230 (backward-char 1)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2231 (forward-char attr)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2232 ;; Change this attribute. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2233 (when (/= value (char-after)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2234 (setq altered t) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2235 (delete-char 1) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2236 (insert value))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2237 ;; Otherwise add a header line to record the attributes and set |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2238 ;; all but this one to no. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2239 (let ((header-value "--------")) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2240 (aset header-value attr value) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2241 (goto-char (if limit (1- limit) (point-max))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2242 (setq altered (/= value ?-)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2243 (insert rmail-attribute-header ": " header-value "\n"))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2244 altered)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2245 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2246 (defun rmail-set-attribute (attr state &optional msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2247 "Turn an attribute of a message on or off according to STATE. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2248 STATE is either nil or the character (numeric) value associated |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2249 with the state (nil represents off and non-nil represents on). |
101920
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2250 ATTR is either the index number of the attribute, or a string, |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2251 both from `rmail-attr-array'. MSGNUM is message number to |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2252 change; nil means current message." |
101920
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2253 (let ((n 0) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2254 (nmax (length rmail-attr-array))) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2255 (while (and (stringp attr) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2256 (< n nmax)) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2257 (if (string-equal attr (cadr (aref rmail-attr-array n))) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2258 (setq attr n)) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2259 (setq n (1+ n)))) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2260 (if (stringp attr) |
7e12da77ac12
(rmail-set-attribute): Allow ATTR to be a string.
Glenn Morris <rgm@gnu.org>
parents:
101916
diff
changeset
|
2261 (error "Unknown attribute `%s'" attr)) |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2262 ;; Ask for confirmation before setting any attribute except `unseen' |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2263 ;; if it would force a format change. |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2264 (unless (= attr rmail-unseen-attr-index) |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2265 (rmail-modify-format)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2266 (with-current-buffer rmail-buffer |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2267 (or msgnum (setq msgnum rmail-current-message)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2268 (when (> msgnum 0) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2269 ;; The "deleted" attribute is also stored in a special vector so |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2270 ;; update that too. |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2271 (if (= attr rmail-deleted-attr-index) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2272 (rmail-set-message-deleted-p msgnum state)) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2273 (if (prog1 |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2274 (rmail-apply-in-message msgnum 'rmail-set-attribute-1 attr state) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2275 (if (= msgnum rmail-current-message) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2276 (rmail-display-labels))) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2277 ;; Don't save in mbox format over a Babyl file |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2278 ;; merely because of a change in `unseen' attribute. |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2279 (if (= attr rmail-unseen-attr-index) |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2280 (rmail-dont-modify-format) |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2281 ;; Otherwise, if we modified the file text via the view buffer, |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2282 ;; mark the main buffer modified too. |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
2283 (set-buffer-modified-p t)))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2284 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2285 (defun rmail-message-attr-p (msg attrs) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2286 "Return non-nil if message number MSG has attributes matching regexp ATTRS." |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2287 (let ((value (rmail-get-header rmail-attribute-header msg))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2288 (and value (string-match attrs value)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2289 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2290 (defun rmail-message-unseen-p (msgnum) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2291 "Return non-nil if message number MSGNUM has the unseen attribute." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2292 (rmail-message-attr-p msgnum "......U")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2293 |
102405
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2294 ;; FIXME rmail-get-labels does some formatting (eg leading space, `;' |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2295 ;; between attributes and labels), so this might not do what you want. |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2296 ;; Eg see rmail-sort-by-labels. rmail-get-labels could have an |
7289f3ee7996
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
Glenn Morris <rgm@gnu.org>
parents:
102368
diff
changeset
|
2297 ;; optional `noformat' argument. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2298 (defun rmail-message-labels-p (msg labels) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2299 "Return non-nil if message number MSG has labels matching regexp LABELS." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2300 (string-match labels (rmail-get-labels msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2301 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2302 ;;;; *** Rmail Message Selection And Support *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2303 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2304 (defun rmail-msgend (n) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2305 "Return the start position for message number N." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2306 (marker-position (aref rmail-message-vector (1+ n)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2307 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2308 (defun rmail-msgbeg (n) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2309 "Return the end position for message number N." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2310 (marker-position (aref rmail-message-vector n))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2311 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2312 (defun rmail-apply-in-message (msgnum function &rest args) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2313 "Call FUNCTION on ARGS while narrowed to message MSGNUM. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2314 Point is at the start of the message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2315 This returns what the call to FUNCTION returns. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2316 If MSGNUM is nil, use the current message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2317 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2318 (or msgnum (setq msgnum rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2319 (when (> msgnum 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2320 (let (msgbeg msgend) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2321 (setq msgbeg (rmail-msgbeg msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2322 (setq msgend (rmail-msgend msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2323 ;; All access to the rmail-buffer's local variables is now finished... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2324 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2325 ;; ... so it is ok to go to a different buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2326 (if (rmail-buffers-swapped-p) (set-buffer rmail-view-buffer)) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2327 (save-excursion |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2328 (save-restriction |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2329 (widen) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2330 (goto-char msgbeg) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2331 (narrow-to-region msgbeg msgend) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2332 (apply function args)))))))) |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2333 |
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2334 ;; Unused (save for commented out code in rmailedit.el). |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2335 (defun rmail-widen-to-current-msgbeg (function) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2336 "Call FUNCTION with point at start of internal data of current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2337 Assumes that bounds were previously narrowed to display the message in Rmail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2338 The bounds are widened enough to move point where desired, then narrowed |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2339 again afterward. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2340 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2341 FUNCTION may not change the visible text of the message, but it may |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2342 change the invisible header text." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2343 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2344 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2345 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2346 (narrow-to-region (rmail-msgbeg rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2347 (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2348 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2349 (funcall function)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2350 ;; Note: we don't use save-restriction because that does not work right |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2351 ;; if changes are made outside the saved restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2352 ;; before that restriction is restored. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2353 (narrow-to-region (rmail-msgbeg rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2354 (rmail-msgend rmail-current-message))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2355 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2356 ;; Manage the message vectors and counters. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2357 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2358 (defun rmail-forget-messages () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2359 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2360 (if (vectorp rmail-message-vector) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2361 (let* ((v rmail-message-vector) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2362 (n (length v))) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2363 (dotimes (i n) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2364 (if (aref v i) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2365 (move-marker (aref v i) nil))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2366 (setq rmail-message-vector nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2367 (setq rmail-msgref-vector nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2368 (setq rmail-deleted-vector nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2369 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2370 (defun rmail-maybe-set-message-counters () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2371 (if (not (and rmail-deleted-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2372 rmail-message-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2373 rmail-current-message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2374 rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2375 (rmail-set-message-counters))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2376 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2377 (defun rmail-count-new-messages (&optional nomsg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2378 "Count the number of new messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2379 The buffer should be narrowed to include only the new messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2380 Output a helpful message unless NOMSG is non-nil." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2381 (let* ((case-fold-search nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2382 (total-messages 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2383 (messages-head nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2384 (deleted-head nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2385 (or nomsg (message "Counting new messages...")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2386 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2387 ;; Put at the end of messages-head |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2388 ;; the entry for message N+1, which marks |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2389 ;; the end of message N. (N = number of messages). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2390 (setq messages-head (list (point-marker))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2391 (rmail-set-message-counters-counter (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2392 (setq rmail-current-message (1+ rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2393 (setq rmail-total-messages |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2394 (+ rmail-total-messages total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2395 (setq rmail-message-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2396 (vconcat rmail-message-vector (cdr messages-head))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2397 (aset rmail-message-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2398 rmail-current-message (car messages-head)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2399 (setq rmail-deleted-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2400 (concat rmail-deleted-vector deleted-head)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2401 (setq rmail-summary-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2402 (vconcat rmail-summary-vector (make-vector total-messages nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2403 (setq rmail-msgref-vector |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2404 (vconcat rmail-msgref-vector (make-vector total-messages nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2405 ;; Fill in the new elements of rmail-msgref-vector. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2406 (let ((i (1+ (- rmail-total-messages total-messages)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2407 (while (<= i rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2408 (aset rmail-msgref-vector i (list i)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2409 (setq i (1+ i)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2410 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2411 (or nomsg (message "Counting new messages...done (%d)" total-messages)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2412 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2413 (defun rmail-set-message-counters () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2414 (rmail-forget-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2415 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2416 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2417 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2418 (let* ((point-save (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2419 (total-messages 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2420 (messages-after-point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2421 (case-fold-search nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2422 (messages-head nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2423 (deleted-head nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2424 ;; Determine how many messages follow point. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2425 (message "Counting messages...") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2426 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2427 ;; Put at the end of messages-head |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2428 ;; the entry for message N+1, which marks |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2429 ;; the end of message N. (N = number of messages). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2430 (setq messages-head (list (point-marker))) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2431 (setq messages-after-point |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2432 (or (rmail-set-message-counters-counter (min (point) point-save)) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2433 0)) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2434 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2435 (setq rmail-total-messages total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2436 (setq rmail-current-message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2437 (min total-messages |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2438 (max 1 (- total-messages messages-after-point)))) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2439 |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2440 ;; Make an element 0 in rmail-message-vector and rmail-deleted-vector |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2441 ;; which will never be used. |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2442 (push nil messages-head) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2443 (push ?0 deleted-head) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2444 (setq rmail-message-vector (apply 'vector messages-head) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2445 rmail-deleted-vector (concat deleted-head)) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2446 |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2447 (setq rmail-summary-vector (make-vector rmail-total-messages nil) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2448 rmail-msgref-vector (make-vector (1+ rmail-total-messages) nil)) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2449 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2450 (let ((i 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2451 (while (<= i rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2452 (aset rmail-msgref-vector i (list i)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2453 (setq i (1+ i)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2454 (let ((i 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2455 (while (<= i rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2456 (rmail-set-message-deleted-p i (rmail-message-attr-p i ".D")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2457 (setq i (1+ i)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2458 (message "Counting messages...done"))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2459 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2460 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2461 (defsubst rmail-collect-deleted (message-end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2462 "Collect the message deletion flags for each message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2463 MESSAGE-END is the buffer position corresponding to the end of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2464 the message. Point is at the beginning of the message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2465 ;; NOTE: This piece of code will be executed on a per-message basis. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2466 ;; In the face of thousands of messages, it has to be as fast as |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2467 ;; possible, hence some brute force constant use is employed in |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2468 ;; addition to inlining. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2469 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2470 (setq deleted-head |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2471 (cons (if (and (search-forward (concat rmail-attribute-header ": ") message-end t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2472 (looking-at "?D")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2473 ?D |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
2474 ?\s) deleted-head)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2475 |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2476 (defun rmail-set-message-counters-counter (&optional spot-to-find) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2477 "Collect the start positions of messages in list `messages-head'. |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2478 Return the number of messages after the one containing SPOT-TO-FIND." |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2479 (let ((start (point)) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2480 messages-after-spot) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2481 (while (search-backward "\n\nFrom " nil t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2482 (forward-char 2) |
104197
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2483 (when (looking-at rmail-unix-mail-delimiter) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2484 (if (and (<= (point) spot-to-find) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2485 (null messages-after-spot)) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2486 (setq messages-after-spot total-messages)) |
104197
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2487 (rmail-collect-deleted start) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2488 (setq messages-head (cons (point-marker) messages-head) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2489 total-messages (1+ total-messages) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2490 start (point)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2491 ;; Show progress after every 20 messages or so. |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2492 (if (zerop (% total-messages 20)) |
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2493 (message "Counting messages...%d" total-messages)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2494 ;; Handle the first message, maybe. |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2495 (goto-char (point-min)) |
104197
b0dfefd17d86
(rmail-add-mbox-headers, rmail-set-message-counters-counter): Search for
Eli Zaretskii <eliz@gnu.org>
parents:
104016
diff
changeset
|
2496 (unless (not (looking-at rmail-unix-mail-delimiter)) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2497 (if (and (<= (point) spot-to-find) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2498 (null messages-after-spot)) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2499 (setq messages-after-spot total-messages)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2500 (rmail-collect-deleted start) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2501 (setq messages-head (cons (point-marker) messages-head) |
104249
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2502 total-messages (1+ total-messages))) |
592d4dbcbe86
* mail/rmail.el (rmail-set-message-counters):
Richard M. Stallman <rms@gnu.org>
parents:
104248
diff
changeset
|
2503 messages-after-spot)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2504 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2505 ;; Display a message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2506 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2507 ;;;; *** Rmail Message Formatting and Header Manipulation *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2508 |
101695
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2509 ;; This is used outside of rmail. |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2510 (defun rmail-msg-is-pruned () |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2511 "Return nil if the current message is showing full headers." |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2512 (with-current-buffer (if (rmail-buffers-swapped-p) rmail-view-buffer |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2513 rmail-buffer) |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2514 (eq rmail-header-style 'normal))) |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2515 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2516 (defun rmail-toggle-header (&optional arg) |
101695
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2517 "Toggle between showing full and normal message headers. |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2518 With optional integer ARG, show the normal message header if ARG |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2519 is greater than zero; otherwise, show it in full." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2520 (interactive "P") |
101616
3fd27701bdb1
(rmail-toggle-header): Don't reset
Chong Yidong <cyd@stupidchicken.com>
parents:
101595
diff
changeset
|
2521 (let ((rmail-header-style |
101644
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2522 (if (numberp arg) |
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2523 (if (> arg 0) 'normal 'full) |
101695
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
2524 (if (rmail-msg-is-pruned) 'full 'normal)))) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2525 (rmail-show-message))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2526 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2527 (defun rmail-beginning-of-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2528 "Show current message starting from the beginning." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2529 (interactive) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2530 (let ((rmail-show-message-hook '((lambda () (goto-char (point-min))))) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2531 (rmail-header-style (with-current-buffer (if (rmail-buffers-swapped-p) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2532 rmail-view-buffer |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2533 rmail-buffer) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2534 rmail-header-style))) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2535 (rmail-show-message rmail-current-message))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2536 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2537 (defun rmail-end-of-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2538 "Show bottom of current message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2539 (interactive) |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2540 (let ((rmail-show-message-hook '((lambda () |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2541 (goto-char (point-max)) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2542 (recenter (1- (window-height)))))) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2543 (rmail-header-style (with-current-buffer (if (rmail-buffers-swapped-p) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2544 rmail-view-buffer |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2545 rmail-buffer) |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2546 rmail-header-style))) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2547 (rmail-show-message rmail-current-message))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2548 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2549 (defun rmail-unknown-mail-followup-to () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2550 "Handle a \"Mail-Followup-To\" header field with an unknown mailing list. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2551 Ask the user whether to add that list name to `mail-mailing-lists'." |
102315
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2552 ;; FIXME s-r not needed? Use rmail-get-header? |
d823cdbe1ce5
(rmail-primary-inbox-list): Doc fix. Fix custom choice to match default.
Glenn Morris <rgm@gnu.org>
parents:
102308
diff
changeset
|
2553 ;; We have not narrowed to the headers at ths point? |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2554 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2555 (let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2556 (when mail-followup-to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2557 (let ((addresses |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2558 (split-string |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2559 (mail-strip-quoted-names mail-followup-to) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2560 ",[[:space:]]+" t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2561 (dolist (addr addresses) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2562 (when (and (not (member addr mail-mailing-lists)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2563 (not |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2564 ;; taken from rmailsum.el |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2565 (string-match |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2566 (or rmail-user-mail-address-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2567 (concat "^\\(" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2568 (regexp-quote (user-login-name)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2569 "\\($\\|@\\)\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2570 (regexp-quote |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2571 (or user-mail-address |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2572 (concat (user-login-name) "@" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2573 (or mail-host-address |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2574 (system-name))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2575 "\\>\\)")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2576 addr)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2577 (y-or-n-p |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2578 (format "Add `%s' to `mail-mailing-lists'? " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2579 addr))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2580 (customize-save-variable 'mail-mailing-lists |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2581 (cons addr mail-mailing-lists))))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2582 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2583 (defun rmail-widen () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2584 "Display the entire mailbox file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2585 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2586 (rmail-swap-buffers-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2587 (widen)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2588 |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2589 (defun rmail-no-mail-p () |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2590 "Return nil if there is mail, else \"No mail.\"." |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2591 (if (zerop rmail-total-messages) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2592 (save-excursion |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2593 (with-current-buffer rmail-view-buffer |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2594 (erase-buffer) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2595 "No mail.")))) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2596 |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2597 (defun rmail-show-message (&optional n no-summary) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2598 "Show message number N (prefix argument), counting from start of file. |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2599 If summary buffer is currently displayed, update current message there also. |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2600 N defaults to the current message." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2601 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2602 (or (eq major-mode 'rmail-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2603 (switch-to-buffer rmail-buffer)) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
2604 ;; FIXME: Why do we swap the raw data back in? |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2605 (rmail-swap-buffers-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2606 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2607 (widen) |
101992
ef7ed7efa61c
(rmail-show-message-1): New name for the old rmail-show-message.
Glenn Morris <rgm@gnu.org>
parents:
101991
diff
changeset
|
2608 (let ((blurb (rmail-show-message-1 n))) |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2609 (or (zerop rmail-total-messages) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2610 (progn |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2611 (when mail-mailing-lists |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2612 (rmail-unknown-mail-followup-to)) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2613 (if transient-mark-mode (deactivate-mark)) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2614 ;; If there is a summary buffer, try to move to this message |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2615 ;; in that buffer. But don't complain if this message is |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2616 ;; not mentioned in the summary. Don't do this at all if we |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2617 ;; were called on behalf of cursor motion in the summary |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2618 ;; buffer. |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2619 (and (rmail-summary-exists) (not no-summary) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2620 (let ((curr-msg rmail-current-message)) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2621 (rmail-select-summary |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2622 (rmail-summary-goto-msg curr-msg t t)))) |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2623 (with-current-buffer rmail-buffer |
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2624 (rmail-auto-file)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2625 (if blurb |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2626 (message blurb)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2627 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2628 (defun rmail-is-text-p () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2629 "Return t if the region contains a text message, nil otherwise." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2630 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2631 (let ((text-regexp "\\(text\\|message\\)/") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2632 (content-type-header (mail-fetch-field "content-type"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2633 ;; The message is text if either there is no content type header |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2634 ;; (a default of "text/plain; charset=US-ASCII" is assumed) or |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2635 ;; the base content type is either text or message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2636 (or (not content-type-header) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2637 (string-match text-regexp content-type-header))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2638 |
101954
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2639 (defcustom rmail-show-message-verbose-min 200000 |
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2640 "Message size at which to show progress messages for displaying it." |
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2641 :type 'integer |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2642 :group 'rmail |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2643 :version "23.1") |
101954
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2644 |
101992
ef7ed7efa61c
(rmail-show-message-1): New name for the old rmail-show-message.
Glenn Morris <rgm@gnu.org>
parents:
101991
diff
changeset
|
2645 (defun rmail-show-message-1 (&optional msg) |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2646 "Show message MSG (default: current message) using `rmail-view-buffer'. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2647 Return text to display in the minibuffer if MSG is out of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2648 range (displaying a reasonable choice as well), nil otherwise. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2649 The current mail message becomes the message displayed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2650 (let ((mbox-buf rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2651 (view-buf rmail-view-buffer) |
101644
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2652 blurb beg end body-start coding-system character-coding |
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2653 is-text-message header-style) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2654 (if (not msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2655 (setq msg rmail-current-message)) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2656 (unless (setq blurb (rmail-no-mail-p)) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2657 (cond ((<= msg 0) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2658 (setq msg 1 |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2659 rmail-current-message 1 |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2660 blurb "No previous message")) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2661 ((> msg rmail-total-messages) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2662 (setq msg rmail-total-messages |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2663 rmail-current-message rmail-total-messages |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2664 blurb "No following message")) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2665 (t (setq rmail-current-message msg))) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2666 (with-current-buffer rmail-buffer |
101644
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2667 (setq header-style rmail-header-style) |
102910
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2668 ;; Mark the message as seen |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2669 (rmail-set-attribute rmail-unseen-attr-index nil) |
3d4fe9d9e9e6
Don't query before visiting a Babyl file.
Richard M. Stallman <rms@gnu.org>
parents:
102886
diff
changeset
|
2670 ;; bracket the message in the mail |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2671 ;; buffer and determine the coding system the transfer encoding. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2672 (rmail-swap-buffers-maybe) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2673 (setq beg (rmail-msgbeg msg) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2674 end (rmail-msgend msg)) |
101954
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2675 (when (> (- end beg) rmail-show-message-verbose-min) |
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2676 (message "Showing message %d" msg)) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2677 (narrow-to-region beg end) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2678 (goto-char beg) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2679 (setq body-start (search-forward "\n\n" nil t)) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2680 (narrow-to-region beg (point)) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2681 (goto-char beg) |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2682 (save-excursion |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2683 (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2684 (setq coding-system (intern (match-string 1))) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2685 (setq coding-system (rmail-get-coding-system)))) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2686 (setq character-coding (mail-fetch-field "content-transfer-encoding") |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2687 is-text-message (rmail-is-text-p)) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2688 (if character-coding |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2689 (setq character-coding (downcase character-coding))) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2690 (narrow-to-region beg end) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2691 ;; Decode the message body into an empty view buffer using a |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2692 ;; unibyte temporary buffer where the character decoding takes |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2693 ;; place. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2694 (with-current-buffer rmail-view-buffer |
101644
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2695 ;; We give the view buffer a buffer-local value of |
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2696 ;; rmail-header-style based on the binding in effect when |
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2697 ;; this function is called; `rmail-toggle-headers' can |
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2698 ;; inspect this value to determine how to toggle. |
13e00d6e6541
(rmail-toggle-header): Determine current header
Chong Yidong <cyd@stupidchicken.com>
parents:
101632
diff
changeset
|
2699 (set (make-local-variable 'rmail-header-style) header-style) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2700 (erase-buffer)) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2701 (if (null character-coding) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2702 ;; Do it directly since that is fast. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2703 (rmail-decode-region body-start end coding-system view-buf) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2704 ;; Can this be done directly, skipping the temp buffer? |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2705 (with-temp-buffer |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2706 (set-buffer-multibyte nil) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2707 (insert-buffer-substring mbox-buf body-start end) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2708 (cond |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2709 ((string= character-coding "quoted-printable") |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2710 (mail-unquote-printable-region (point-min) (point-max))) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2711 ((and (string= character-coding "base64") is-text-message) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2712 (base64-decode-region (point-min) (point-max))) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2713 ((eq character-coding 'uuencode) |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2714 (error "uuencoded messages are not supported yet")) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2715 (t)) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2716 (rmail-decode-region (point-min) (point-max) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2717 coding-system view-buf))) |
101628
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2718 (with-current-buffer rmail-view-buffer |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2719 ;; Unquote quoted From lines |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2720 (goto-char (point-min)) |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2721 (while (re-search-forward "^>+From " nil t) |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2722 (beginning-of-line) |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2723 (delete-char 1) |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2724 (forward-line)) |
a00762725924
(rmail-show-message): Unquote From lines.
Chong Yidong <cyd@stupidchicken.com>
parents:
101626
diff
changeset
|
2725 (goto-char (point-min))) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2726 ;; Copy the headers to the front of the message view buffer. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2727 (rmail-copy-headers beg end) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2728 ;; Add the separator (blank line) between headers and body; |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2729 ;; highlight the message, activate any URL like text and add |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2730 ;; special highlighting for and quoted material. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2731 (with-current-buffer rmail-view-buffer |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2732 (insert "\n") |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2733 (goto-char (point-min)) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2734 (rmail-highlight-headers) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2735 ;(rmail-activate-urls) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2736 ;(rmail-process-quoted-material) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2737 ) |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2738 ;; Update the mode-line with message status information and swap |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2739 ;; the view buffer/mail buffer contents. |
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2740 (rmail-display-labels) |
101709
16e67945499c
(rmail-automatic-folder-directives, rmail): Doc fixes.
Eli Zaretskii <eliz@gnu.org>
parents:
101707
diff
changeset
|
2741 (rmail-swap-buffers) |
101595
93295628737c
(rmail-expunge-and-save): Always show a message,
Glenn Morris <rgm@gnu.org>
parents:
101591
diff
changeset
|
2742 (setq rmail-buffer-swapped t) |
101954
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2743 (run-hooks 'rmail-show-message-hook) |
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2744 (when (> (- end beg) rmail-show-message-verbose-min) |
a7b2ac5493bd
(rmail-show-message-verbose-min): New option.
Richard M. Stallman <rms@gnu.org>
parents:
101952
diff
changeset
|
2745 (message "Showing message %d...done" msg)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2746 blurb)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2747 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2748 (defun rmail-copy-headers (beg end &optional ignored-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2749 "Copy displayed header fields to the message viewer buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2750 BEG and END marks the start and end positions of the message in |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2751 the mbox buffer. If the optional argument IGNORED-HEADERS is |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2752 non-nil, ignore all header fields whose names match that regexp. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2753 Otherwise, if `rmail-displayed-headers' is non-nil, copy only |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2754 those header fields whose names match that regexp. Otherwise, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2755 copy all header fields whose names do not match |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2756 `rmail-ignored-headers' (unless they also match |
101565 | 2757 `rmail-nonignored-headers'). Moves point in the message viewer |
2758 buffer to the end of the headers." | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2759 (let ((header-start-regexp "\n[^ \t]") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2760 lim) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2761 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2762 (when (search-forward "\n\n" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2763 (forward-char -1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2764 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2765 ;; Put point right after the From header line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2766 (narrow-to-region beg (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2767 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2768 (unless (re-search-forward header-start-regexp nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2769 (rmail-error-bad-format)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2770 (forward-char -1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2771 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2772 ;; Handle the case where all headers should be copied. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2773 ((eq rmail-header-style 'full) |
101564
fe1cbb7012eb
(rmail-copy-headers): Doc fix. Leave point at the end
Glenn Morris <rgm@gnu.org>
parents:
101552
diff
changeset
|
2774 (prepend-to-buffer rmail-view-buffer beg (point-max)) |
101992
ef7ed7efa61c
(rmail-show-message-1): New name for the old rmail-show-message.
Glenn Morris <rgm@gnu.org>
parents:
101991
diff
changeset
|
2775 ;; rmail-show-message-1 expects this function to leave point |
101564
fe1cbb7012eb
(rmail-copy-headers): Doc fix. Leave point at the end
Glenn Morris <rgm@gnu.org>
parents:
101552
diff
changeset
|
2776 ;; at the end of the headers. |
102073
a03d06977060
(rmail-copy-headers): When copying full headers,
Richard M. Stallman <rms@gnu.org>
parents:
102063
diff
changeset
|
2777 |
a03d06977060
(rmail-copy-headers): When copying full headers,
Richard M. Stallman <rms@gnu.org>
parents:
102063
diff
changeset
|
2778 (let ((len (- (point-max) beg))) |
a03d06977060
(rmail-copy-headers): When copying full headers,
Richard M. Stallman <rms@gnu.org>
parents:
102063
diff
changeset
|
2779 (with-current-buffer rmail-view-buffer |
a03d06977060
(rmail-copy-headers): When copying full headers,
Richard M. Stallman <rms@gnu.org>
parents:
102063
diff
changeset
|
2780 (goto-char (1+ len))))) |
a03d06977060
(rmail-copy-headers): When copying full headers,
Richard M. Stallman <rms@gnu.org>
parents:
102063
diff
changeset
|
2781 |
101564
fe1cbb7012eb
(rmail-copy-headers): Doc fix. Leave point at the end
Glenn Morris <rgm@gnu.org>
parents:
101552
diff
changeset
|
2782 ;; Handle the case where the headers matching the displayed |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2783 ;; headers regexp should be copied. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2784 ((and rmail-displayed-headers (null ignored-headers)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2785 (while (not (eobp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2786 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2787 (setq lim (if (re-search-forward header-start-regexp nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2788 (1+ (match-beginning 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2789 (point-max)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2790 (when (looking-at rmail-displayed-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2791 (append-to-buffer rmail-view-buffer (point) lim)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2792 (goto-char lim))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2793 ;; Handle the ignored headers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2794 ((or ignored-headers (setq ignored-headers rmail-ignored-headers)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2795 (while (and ignored-headers (not (eobp))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2796 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2797 (setq lim (if (re-search-forward header-start-regexp nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2798 (1+ (match-beginning 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2799 (point-max)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2800 (if (and (looking-at ignored-headers) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2801 (not (looking-at rmail-nonignored-headers))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2802 (goto-char lim) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2803 (append-to-buffer rmail-view-buffer (point) lim) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2804 (goto-char lim)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2805 (t (error "No headers selected for display!")))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2806 |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2807 (defun rmail-redecode-body (coding) |
101626
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2808 "Decode the body of the current message using coding system CODING. |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2809 This is useful with mail messages that have malformed or missing |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2810 charset= headers. |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2811 |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2812 This function assumes that the current message is already decoded |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2813 and displayed in the RMAIL buffer, but the coding system used to |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2814 decode it was incorrect. It then decodes the message again, |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2815 using the coding system CODING." |
101626
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2816 (interactive "zCoding system for re-decoding this message: ") |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2817 (when (not rmail-enable-mime) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
2818 (with-current-buffer rmail-buffer |
101626
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2819 (rmail-swap-buffers-maybe) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2820 (save-restriction |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2821 (widen) |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2822 (let ((msgbeg (rmail-msgbeg rmail-current-message)) |
101626
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2823 (msgend (rmail-msgend rmail-current-message)) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2824 (buffer-read-only nil) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2825 body-start x-coding-header old-coding) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2826 (narrow-to-region msgbeg msgend) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2827 (goto-char (point-min)) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2828 (unless (setq body-start (search-forward "\n\n" (point-max) 1)) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2829 (error "No message body")) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2830 |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2831 (save-restriction |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2832 ;; Narrow to headers |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2833 (narrow-to-region (point-min) body-start) |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2834 (setq x-coding-header (goto-char (point-min))) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2835 (if (not (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2836 (setq old-coding (rmail-get-coding-system)) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2837 (setq old-coding (intern (match-string 1))) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2838 (setq x-coding-header (point))) |
101626
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2839 (check-coding-system old-coding) |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2840 ;; Make sure the new coding system uses the same EOL |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2841 ;; conversion, to prevent ^M characters from popping up |
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2842 ;; all over the place. |
101707
4bb10611bac4
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
Eli Zaretskii <eliz@gnu.org>
parents:
101705
diff
changeset
|
2843 (let ((eol-type (coding-system-eol-type old-coding))) |
4bb10611bac4
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
Eli Zaretskii <eliz@gnu.org>
parents:
101705
diff
changeset
|
2844 (if (numberp eol-type) |
4bb10611bac4
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
Eli Zaretskii <eliz@gnu.org>
parents:
101705
diff
changeset
|
2845 (setq coding |
4bb10611bac4
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
Eli Zaretskii <eliz@gnu.org>
parents:
101705
diff
changeset
|
2846 (coding-system-change-eol-conversion coding eol-type)))) |
101875
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2847 (when (not (coding-system-equal |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2848 (coding-system-base old-coding) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2849 (coding-system-base coding))) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2850 ;; Rewrite the coding-system header. |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2851 (goto-char x-coding-header) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2852 (if (> (point) (point-min)) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2853 (delete-region (line-beginning-position) (point)) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2854 (forward-line) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2855 (insert "\n") |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2856 (forward-line -1)) |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2857 (insert "X-Coding-System: " |
595dd77c0199
(rmail-redecode-body): Don't encode/decode the message; instead, just rewrite
Eli Zaretskii <eliz@gnu.org>
parents:
101817
diff
changeset
|
2858 (symbol-name coding)))) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2859 (rmail-show-message)))))) |
101626
feacaf76f65e
(rmail-redecode-body): New function, based on old version removed in
Chong Yidong <cyd@stupidchicken.com>
parents:
101616
diff
changeset
|
2860 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2861 (defun rmail-highlight-headers () |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2862 "Highlight the headers specified by `rmail-highlighted-headers'. |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2863 Uses the face `rmail-highlight'." |
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2864 (if rmail-highlighted-headers |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2865 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2866 (search-forward "\n\n" nil 'move) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2867 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2868 (narrow-to-region (point-min) (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2869 (let ((case-fold-search t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2870 (inhibit-read-only t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2871 ;; List of overlays to reuse. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2872 (overlays rmail-overlay-list)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2873 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2874 (while (re-search-forward rmail-highlighted-headers nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2875 (skip-chars-forward " \t") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2876 (let ((beg (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2877 overlay) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2878 (while (progn (forward-line 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2879 (looking-at "[ \t]"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2880 ;; Back up over newline, then trailing spaces or tabs |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2881 (forward-char -1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2882 (while (member (preceding-char) '(? ?\t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2883 (forward-char -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2884 (if overlays |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2885 ;; Reuse an overlay we already have. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2886 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2887 (setq overlay (car overlays) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2888 overlays (cdr overlays)) |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2889 (overlay-put overlay 'face 'rmail-highlight) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2890 (move-overlay overlay beg (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2891 ;; Make a new overlay and add it to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2892 ;; rmail-overlay-list. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2893 (setq overlay (make-overlay beg (point))) |
102368
968d71b7a967
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
102357
diff
changeset
|
2894 (overlay-put overlay 'face 'rmail-highlight) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2895 (setq rmail-overlay-list |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2896 (cons overlay rmail-overlay-list)))))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2897 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2898 (defun rmail-auto-file () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2899 "Automatically move a message into a sub-folder based on criteria. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2900 Called when a new message is displayed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2901 (if (or (zerop rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2902 (rmail-message-attr-p rmail-current-message "...F") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2903 (not (string= (buffer-file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2904 (expand-file-name rmail-file-name)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2905 ;; Do nothing if the message has already been filed or if there |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2906 ;; are no messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2907 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2908 ;; Find out some basics (common fields) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2909 (let ((from (mail-fetch-field "from")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2910 (subj (mail-fetch-field "subject")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2911 (to (concat (mail-fetch-field "to") "," (mail-fetch-field "cc"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2912 (d rmail-automatic-folder-directives) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2913 (directive-loop nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2914 (folder nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2915 (while d |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2916 (setq folder (car (car d)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2917 directive-loop (cdr (car d))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2918 (while (and (car directive-loop) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2919 (let ((f (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2920 ((string= (car directive-loop) "from") from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2921 ((string= (car directive-loop) "to") to) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2922 ((string= (car directive-loop) "subject") subj) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2923 (t (mail-fetch-field (car directive-loop)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2924 (and f (string-match (car (cdr directive-loop)) f)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2925 (setq directive-loop (cdr (cdr directive-loop)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2926 ;; If there are no directives left, then it was a complete match. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2927 (if (null directive-loop) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2928 (if (null folder) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2929 (rmail-delete-forward) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2930 (if (string= "/dev/null" folder) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2931 (rmail-delete-message) |
101916
85a6bf6279eb
(rmail-automatic-folder-directives): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101882
diff
changeset
|
2932 (rmail-output folder 1) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2933 (setq d nil)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2934 (setq d (cdr d)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2935 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2936 ;; Simple message motion commands. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2937 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2938 (defun rmail-next-message (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2939 "Show following message whether deleted or not. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2940 With prefix arg N, moves forward N messages, or backward if N is negative." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2941 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2942 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2943 (rmail-maybe-set-message-counters) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2944 (rmail-show-message (+ rmail-current-message n))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2945 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2946 (defun rmail-previous-message (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2947 "Show previous message whether deleted or not. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2948 With prefix arg N, moves backward N messages, or forward if N is negative." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2949 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2950 (rmail-next-message (- n))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2951 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2952 (defun rmail-next-undeleted-message (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2953 "Show following non-deleted message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2954 With prefix arg N, moves forward N non-deleted messages, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2955 or backward if N is negative. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2956 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2957 Returns t if a new message is being shown, nil otherwise." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2958 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2959 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2960 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2961 (let ((lastwin rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2962 (current rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2963 (while (and (> n 0) (< current rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2964 (setq current (1+ current)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2965 (if (not (rmail-message-deleted-p current)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2966 (setq lastwin current n (1- n)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2967 (while (and (< n 0) (> current 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2968 (setq current (1- current)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2969 (if (not (rmail-message-deleted-p current)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2970 (setq lastwin current n (1+ n)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2971 (if (/= lastwin rmail-current-message) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2972 (progn (rmail-show-message lastwin) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2973 t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2974 (if (< n 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2975 (message "No previous nondeleted message")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2976 (if (> n 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2977 (message "No following nondeleted message")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2978 nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2979 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2980 (defun rmail-previous-undeleted-message (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2981 "Show previous non-deleted message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2982 With prefix argument N, moves backward N non-deleted messages, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2983 or forward if N is negative." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2984 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2985 (rmail-next-undeleted-message (- n))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2986 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2987 (defun rmail-first-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2988 "Show first message in file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2989 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2990 (rmail-maybe-set-message-counters) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2991 (rmail-show-message 1)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2992 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2993 (defun rmail-last-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2994 "Show last message in file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2995 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2996 (rmail-maybe-set-message-counters) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
2997 (rmail-show-message rmail-total-messages)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2998 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2999 (defun rmail-what-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3000 "For debugging Rmail: find the message number that point is in." |
101810
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3001 (let* ((high rmail-total-messages) |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3002 (mid (/ high 2)) |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3003 (low 1) |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3004 (where (with-current-buffer (if (rmail-buffers-swapped-p) |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3005 rmail-view-buffer |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3006 (current-buffer)) |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3007 (point)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3008 (while (> (- high low) 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3009 (if (>= where (rmail-msgbeg mid)) |
101810
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3010 (setq low mid) |
57264a933a63
(rmail-what-message): Unbreak it.
Glenn Morris <rgm@gnu.org>
parents:
101784
diff
changeset
|
3011 (setq high mid)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3012 (setq mid (+ low (/ (- high low) 2)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3013 (if (>= where (rmail-msgbeg high)) high low))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3014 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3015 ;; Searching in Rmail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3016 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3017 (defun rmail-search-message (msg regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3018 "Return non-nil, if for message number MSG, regexp REGEXP matches." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3019 ;; This is adequate because its only caller, rmail-search, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3020 ;; unswaps the buffers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3021 (goto-char (rmail-msgbeg msg)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3022 (if rmail-enable-mime |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3023 (if rmail-search-mime-message-function |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3024 (funcall rmail-search-mime-message-function msg regexp) |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3025 (error "You must set `rmail-search-mime-message-function'")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3026 (re-search-forward regexp (rmail-msgend msg) t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3027 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3028 (defvar rmail-search-last-regexp nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3029 (defun rmail-search (regexp &optional n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3030 "Show message containing next match for REGEXP (but not the current msg). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3031 Prefix argument gives repeat count; negative argument means search |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3032 backwards (through earlier messages). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3033 Interactively, empty argument means use same regexp used last time." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3034 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3035 (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3036 (prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3037 (concat (if reversep "Reverse " "") "Rmail search (regexp")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3038 regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3039 (setq prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3040 (concat prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3041 (if rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3042 (concat ", default " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3043 rmail-search-last-regexp "): ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3044 "): "))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3045 (setq regexp (read-string prompt)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3046 (cond ((not (equal regexp "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3047 (setq rmail-search-last-regexp regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3048 ((not rmail-search-last-regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3049 (error "No previous Rmail search string"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3050 (list rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3051 (prefix-numeric-value current-prefix-arg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3052 (or n (setq n 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3053 (message "%sRmail search for %s..." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3054 (if (< n 0) "Reverse " "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3055 regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3056 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3057 (let ((orig-message rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3058 (msg rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3059 (reversep (< n 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3060 (opoint (if (rmail-buffers-swapped-p) (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3061 found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3062 (rmail-swap-buffers-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3063 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3064 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3065 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3066 (while (/= n 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3067 ;; Check messages one by one, advancing message number up or |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3068 ;; down but searching forward through each message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3069 (if reversep |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3070 (while (and (null found) (> msg 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3071 (setq msg (1- msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3072 found (rmail-search-message msg regexp))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3073 (while (and (null found) (< msg rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3074 (setq msg (1+ msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3075 found (rmail-search-message msg regexp)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3076 (setq n (+ n (if reversep 1 -1)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3077 (if found |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3078 (progn |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
3079 (rmail-show-message msg) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3080 ;; Search forward (if this is a normal search) or backward |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3081 ;; (if this is a reverse search) through this message to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3082 ;; position point. This search may fail because REGEXP |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3083 ;; was found in the hidden portion of this message. In |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3084 ;; that case, move point to the beginning of visible |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3085 ;; portion. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3086 (if reversep |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3087 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3088 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3089 (re-search-backward regexp nil 'move)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3090 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3091 (re-search-forward regexp nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3092 (message "%sRmail search for %s...done" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3093 (if reversep "Reverse " "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3094 regexp)) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
3095 (rmail-show-message orig-message) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3096 (if opoint (goto-char opoint)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3097 (ding) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3098 (message "Search failed: %s" regexp))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3099 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3100 (defun rmail-search-backwards (regexp &optional n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3101 "Show message containing previous match for REGEXP. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3102 Prefix argument gives repeat count; negative argument means search |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3103 forward (through later messages). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3104 Interactively, empty argument means use same regexp used last time." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3105 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3106 (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3107 (prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3108 (concat (if reversep "Reverse " "") "Rmail search (regexp")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3109 regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3110 (setq prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3111 (concat prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3112 (if rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3113 (concat ", default " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3114 rmail-search-last-regexp "): ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3115 "): "))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3116 (setq regexp (read-string prompt)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3117 (cond ((not (equal regexp "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3118 (setq rmail-search-last-regexp regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3119 ((not rmail-search-last-regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3120 (error "No previous Rmail search string"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3121 (list rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3122 (prefix-numeric-value current-prefix-arg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3123 (rmail-search regexp (- (or n 1)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3124 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3125 ;; Scan for attributes, and compare subjects. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3126 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3127 (defun rmail-first-unseen-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3128 "Return message number of first message which has `unseen' attribute." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3129 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3130 (let ((current 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3131 found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3132 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3133 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3134 (while (and (not found) (<= current rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3135 (if (rmail-message-attr-p current "......U") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3136 (setq found current)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3137 (setq current (1+ current)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3138 found)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3139 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3140 (defun rmail-simplified-subject (&optional msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3141 "Return the simplified subject of message MSGNUM (or current message). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3142 Simplifying the subject means stripping leading and trailing whitespace, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3143 and typical reply prefixes such as Re:." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3144 (let ((subject (or (rmail-get-header "Subject" msgnum) ""))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3145 (if (string-match "\\`[ \t]+" subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3146 (setq subject (substring subject (match-end 0)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3147 (if (string-match rmail-reply-regexp subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3148 (setq subject (substring subject (match-end 0)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3149 (if (string-match "[ \t]+\\'" subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3150 (setq subject (substring subject 0 (match-beginning 0)))) |
102886
68831fc17805
(rmail-simplified-subject): Normalize whitespace in subject. This
Eli Zaretskii <eliz@gnu.org>
parents:
102874
diff
changeset
|
3151 ;; If Subject is long, mailers will break it into several lines at |
68831fc17805
(rmail-simplified-subject): Normalize whitespace in subject. This
Eli Zaretskii <eliz@gnu.org>
parents:
102874
diff
changeset
|
3152 ;; arbitrary places, so normalize whitespace by replacing every |
68831fc17805
(rmail-simplified-subject): Normalize whitespace in subject. This
Eli Zaretskii <eliz@gnu.org>
parents:
102874
diff
changeset
|
3153 ;; run of whitespace characters with a single space. |
68831fc17805
(rmail-simplified-subject): Normalize whitespace in subject. This
Eli Zaretskii <eliz@gnu.org>
parents:
102874
diff
changeset
|
3154 (setq subject (replace-regexp-in-string "[ \t\n]+" " " subject)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3155 subject)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3156 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3157 (defun rmail-simplified-subject-regexp () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3158 "Return a regular expression matching the current simplified subject. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3159 The idea is to match it against simplified subjects of other messages." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3160 (let ((subject (rmail-simplified-subject))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3161 (setq subject (regexp-quote subject)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3162 ;; Hide commas so it will work ok if parsed as a comma-separated list |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3163 ;; of regexps. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3164 (setq subject |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3165 (replace-regexp-in-string "," "\054" subject t t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3166 (concat "\\`" subject "\\'"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3167 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3168 (defun rmail-next-same-subject (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3169 "Go to the next mail message having the same subject header. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3170 With prefix argument N, do this N times. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3171 If N is negative, go backwards instead." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3172 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3173 (let ((subject (rmail-simplified-subject)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3174 (forward (> n 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3175 (i rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3176 found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3177 (while (and (/= n 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3178 (if forward |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3179 (< i rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3180 (> i 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3181 (let (done) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3182 (while (and (not done) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3183 (if forward |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3184 (< i rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3185 (> i 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3186 (setq i (if forward (1+ i) (1- i))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3187 (setq done (string-equal subject (rmail-simplified-subject i)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3188 (if done (setq found i))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3189 (setq n (if forward (1- n) (1+ n)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3190 (if found |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
3191 (rmail-show-message found) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3192 (error "No %s message with same subject" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3193 (if forward "following" "previous"))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3194 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3195 (defun rmail-previous-same-subject (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3196 "Go to the previous mail message having the same subject header. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3197 With prefix argument N, do this N times. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3198 If N is negative, go forwards instead." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3199 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3200 (rmail-next-same-subject (- n))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3201 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3202 ;;;; *** Rmail Message Deletion Commands *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3203 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3204 (defun rmail-message-deleted-p (n) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3205 "Return non-nil if message number N is deleted (in `rmail-deleted-vector')." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3206 (= (aref rmail-deleted-vector n) ?D)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3207 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3208 (defun rmail-set-message-deleted-p (n state) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3209 "Set the deleted state of message number N (in `rmail-deleted-vector'). |
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3210 STATE non-nil means mark as deleted." |
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3211 (aset rmail-deleted-vector n (if state ?D ?\s))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3212 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3213 (defun rmail-delete-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3214 "Delete this message and stay on it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3215 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3216 (rmail-set-attribute rmail-deleted-attr-index t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3217 (run-hooks 'rmail-delete-message-hook)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3218 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3219 (defun rmail-undelete-previous-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3220 "Back up to deleted message, select it, and undelete it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3221 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3222 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3223 (let ((msg rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3224 (while (and (> msg 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3225 (not (rmail-message-deleted-p msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3226 (setq msg (1- msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3227 (if (= msg 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3228 (error "No previous deleted message") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3229 (if (/= msg rmail-current-message) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
3230 (rmail-show-message msg)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3231 (rmail-set-attribute rmail-deleted-attr-index nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3232 (if (rmail-summary-exists) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
3233 (with-current-buffer rmail-summary-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3234 (rmail-summary-mark-undeleted msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3235 (rmail-maybe-display-summary)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3236 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3237 (defun rmail-delete-forward (&optional backward) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3238 "Delete this message and move to next nondeleted one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3239 Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3240 With prefix argument, delete and move backward. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3241 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3242 Returns t if a new message is displayed after the delete, or nil otherwise." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3243 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3244 (rmail-set-attribute rmail-deleted-attr-index t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3245 (run-hooks 'rmail-delete-message-hook) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3246 (let ((del-msg rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3247 (if (rmail-summary-exists) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3248 (rmail-select-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3249 (rmail-summary-mark-deleted del-msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3250 (prog1 (rmail-next-undeleted-message (if backward -1 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3251 (rmail-maybe-display-summary)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3252 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3253 (defun rmail-delete-backward () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3254 "Delete this message and move to previous nondeleted one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3255 Deleted messages stay in the file until the \\[rmail-expunge] command is given." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3256 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3257 (rmail-delete-forward t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3258 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3259 ;; Expunging. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3260 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3261 ;; Compute the message number a given message would have after expunging. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3262 ;; The present number of the message is OLDNUM. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3263 ;; DELETEDVEC should be rmail-deleted-vector. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3264 ;; The value is nil for a message that would be deleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3265 (defun rmail-msg-number-after-expunge (deletedvec oldnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3266 (if (or (null oldnum) (= (aref deletedvec oldnum) ?D)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3267 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3268 (let ((i 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3269 (newnum 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3270 (while (< i oldnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3271 (if (/= (aref deletedvec i) ?D) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3272 (setq newnum (1+ newnum))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3273 (setq i (1+ i))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3274 newnum))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3275 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3276 (defun rmail-expunge-confirmed () |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3277 "Return t if expunge is needed and desirable. |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3278 If `rmail-confirm-expunge' is non-nil, ask user to confirm." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3279 (set-buffer rmail-buffer) |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3280 (and (stringp rmail-deleted-vector) |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3281 (string-match "D" rmail-deleted-vector) |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3282 (if rmail-confirm-expunge |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3283 (funcall rmail-confirm-expunge |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3284 "Erase deleted messages from Rmail file? ") |
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3285 t))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3286 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3287 (defun rmail-only-expunge (&optional dont-show) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3288 "Actually erase all deleted messages in the file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3289 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3290 (rmail-swap-buffers-maybe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3291 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3292 (message "Expunging deleted messages...") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3293 ;; Discard all undo records for this buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3294 (or (eq buffer-undo-list t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3295 (setq buffer-undo-list nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3296 (rmail-maybe-set-message-counters) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3297 (let* ((omax (- (buffer-size) (point-max))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3298 (omin (- (buffer-size) (point-min))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3299 (opoint (if (and (> rmail-current-message 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3300 (rmail-message-deleted-p rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3301 0 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3302 (if rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3303 (with-current-buffer rmail-view-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3304 (- (point)(point-min))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3305 (- (point) (point-min))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3306 (messages-head (cons (aref rmail-message-vector 0) nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3307 (messages-tail messages-head) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3308 ;; Don't make any undo records for the expunging. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3309 (buffer-undo-list t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3310 (win)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3311 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3312 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3313 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3314 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3315 (let ((counter 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3316 (number 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3317 new-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3318 (new-msgref (list (list 0))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3319 (buffer-read-only nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3320 (total rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3321 (new-message-number rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3322 (messages rmail-message-vector) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3323 (deleted rmail-deleted-vector) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3324 (summary rmail-summary-vector)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3325 (setq rmail-total-messages nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3326 rmail-current-message nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3327 rmail-message-vector nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3328 rmail-deleted-vector nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3329 rmail-summary-vector nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3330 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3331 (while (<= number total) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3332 (if (= (aref deleted number) ?D) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3333 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3334 (delete-region (aref messages number) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3335 (aref messages (1+ number))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3336 (move-marker (aref messages number) nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3337 (if (> new-message-number counter) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3338 (setq new-message-number (1- new-message-number)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3339 (setq counter (1+ counter)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3340 (setq messages-tail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3341 (setcdr messages-tail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3342 (cons (aref messages number) nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3343 (setq new-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3344 (cons (if (= counter number) (aref summary (1- number))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3345 new-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3346 (setq new-msgref |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3347 (cons (aref rmail-msgref-vector number) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3348 new-msgref)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3349 (setcar (car new-msgref) counter)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3350 (if (zerop (% (setq number (1+ number)) 20)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3351 (message "Expunging deleted messages...%d" number))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3352 (setq messages-tail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3353 (setcdr messages-tail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3354 (cons (aref messages number) nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3355 (setq rmail-current-message new-message-number |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3356 rmail-total-messages counter |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3357 rmail-message-vector (apply 'vector messages-head) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3358 rmail-deleted-vector (make-string (1+ counter) ?\s) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3359 rmail-summary-vector (vconcat (nreverse new-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3360 rmail-msgref-vector (apply 'vector (nreverse new-msgref)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3361 win t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3362 (message "Expunging deleted messages...done") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3363 (if (not win) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3364 (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3365 (if (not dont-show) |
101994
12c790fb58af
(rmail-show-message): New name for the old rmail-show-message-maybe.
Glenn Morris <rgm@gnu.org>
parents:
101992
diff
changeset
|
3366 (rmail-show-message (min rmail-current-message rmail-total-messages))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3367 (if rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3368 (goto-char (+ (point-min) opoint)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3369 (goto-char (+ (point) opoint)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3370 |
102874
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3371 ;; The DONT-SHOW argument is new in 23. Does not seem very important. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3372 (defun rmail-expunge (&optional dont-show) |
102874
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3373 "Erase deleted messages from Rmail file and summary buffer. |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3374 This always shows a message (so as not to leave the Rmail buffer |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3375 unswapped), and always updates any summary (so that it remains |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3376 consistent with the Rmail buffer). If DONT-SHOW is non-nil, it |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3377 does not pop any summary buffer." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3378 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3379 (when (rmail-expunge-confirmed) |
103247
0eb3cdddefb2
* mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
Richard M. Stallman <rms@gnu.org>
parents:
102925
diff
changeset
|
3380 (rmail-modify-format) |
102605
d95dfcc4b888
(rmail-expunge): Show the message only once, and only if needed.
Richard M. Stallman <rms@gnu.org>
parents:
102604
diff
changeset
|
3381 (let ((was-deleted (rmail-message-deleted-p rmail-current-message)) |
102692
4108d3644bad
(rmail-expunge): Without DONT-SHOW, show the message even after
Richard M. Stallman <rms@gnu.org>
parents:
102690
diff
changeset
|
3382 (was-swapped (rmail-buffers-swapped-p))) |
102605
d95dfcc4b888
(rmail-expunge): Show the message only once, and only if needed.
Richard M. Stallman <rms@gnu.org>
parents:
102604
diff
changeset
|
3383 (rmail-only-expunge t) |
102874
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3384 ;; We always update the summary buffer, so that the contents |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3385 ;; remain consistent with the rmail buffer. |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3386 ;; The only difference is, in the dont-show case, we use a |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3387 ;; cut-down version of rmail-select-summary that does not pop |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3388 ;; the summary buffer. It's only used by rmail-quit, which is |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3389 ;; just going to bury any summary immediately after. If we made |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3390 ;; rmail-quit bury the summary first, dont-show could be removed. |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3391 ;; But the expunge might not be confirmed... |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3392 (if (rmail-summary-exists) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3393 (if dont-show |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3394 (let ((total rmail-total-messages)) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3395 (with-current-buffer rmail-summary-buffer |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3396 (let ((rmail-total-messages total)) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3397 (rmail-update-summary)))) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3398 (rmail-select-summary (rmail-update-summary)))) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3399 ;; We always show a message, because (rmail-only-expunge t) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3400 ;; leaves the rmail buffer unswapped. |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3401 ;; If we expunged the current message, a new one is current now, |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3402 ;; so show it. If we weren't showing a message, show it. |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3403 (if (or was-deleted (not was-swapped)) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3404 (rmail-show-message-1 rmail-current-message) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3405 ;; We can just show the same message that was being shown before. |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3406 (rmail-display-labels) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3407 (rmail-swap-buffers) |
5c62d70b7ef3
(rmail-expunge-and-save): Let rmail-expunge show the message.
Glenn Morris <rgm@gnu.org>
parents:
102692
diff
changeset
|
3408 (setq rmail-buffer-swapped t))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3409 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3410 ;;;; *** Rmail Mailing Commands *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3411 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3412 (defun rmail-start-mail (&optional noerase to subject in-reply-to cc |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3413 replybuffer sendactions same-window others) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3414 (let (yank-action) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3415 (if replybuffer |
102229
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
3416 ;; The function used here must behave like insert-buffer wrt |
c3b2c25cfe3f
(rmail): Don't show a message if rmail-get-new-mail already did. (Bug#2440)
Glenn Morris <rgm@gnu.org>
parents:
102142
diff
changeset
|
3417 ;; point and mark (see doc of sc-cite-original). |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3418 (setq yank-action (list 'insert-buffer replybuffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3419 (setq others (cons (cons "cc" cc) others)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3420 (setq others (cons (cons "in-reply-to" in-reply-to) others)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3421 (if same-window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3422 (compose-mail to subject others |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3423 noerase nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3424 yank-action sendactions) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3425 (if rmail-mail-new-frame |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3426 (prog1 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3427 (compose-mail to subject others |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3428 noerase 'switch-to-buffer-other-frame |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3429 yank-action sendactions) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3430 ;; This is not a standard frame parameter; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3431 ;; nothing except sendmail.el looks at it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3432 (modify-frame-parameters (selected-frame) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3433 '((mail-dedicated-frame . t)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3434 (compose-mail to subject others |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3435 noerase 'switch-to-buffer-other-window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3436 yank-action sendactions))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3437 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3438 (defun rmail-mail () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3439 "Send mail in another window. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3440 While composing the message, use \\[mail-yank-original] to yank the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3441 original message into it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3442 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3443 (rmail-start-mail nil nil nil nil nil rmail-view-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3444 |
102340
9ea8a3661105
(rmail-mode-map): Add explicit keybinding for rmail-resend in the menu.
Glenn Morris <rgm@gnu.org>
parents:
102315
diff
changeset
|
3445 ;; FIXME should complain if there is nothing to continue. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3446 (defun rmail-continue () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3447 "Continue composing outgoing message previously being composed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3448 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3449 (rmail-start-mail t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3450 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3451 (defun rmail-reply (just-sender) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3452 "Reply to the current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3453 Normally include CC: to all other recipients of original message; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3454 prefix argument means ignore them. While composing the reply, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3455 use \\[mail-yank-original] to yank the original message into it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3456 (interactive "P") |
101661
26b8d12cf7a4
(rmail-reply): Handle empty folders.
Glenn Morris <rgm@gnu.org>
parents:
101644
diff
changeset
|
3457 (if (zerop rmail-current-message) |
26b8d12cf7a4
(rmail-reply): Handle empty folders.
Glenn Morris <rgm@gnu.org>
parents:
101644
diff
changeset
|
3458 (error "There is no message to reply to")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3459 (let (from reply-to cc subject date to message-id references |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3460 resent-to resent-cc resent-reply-to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3461 (msgnum rmail-current-message)) |
102353
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3462 (rmail-apply-in-message |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3463 rmail-current-message |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3464 (lambda () |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3465 (search-forward "\n\n" nil 'move) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3466 (narrow-to-region (point-min) (point)) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3467 (setq from (mail-fetch-field "from") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3468 reply-to (or (mail-fetch-field "mail-reply-to" nil t) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3469 (mail-fetch-field "reply-to" nil t) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3470 from) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3471 subject (mail-fetch-field "subject") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3472 date (mail-fetch-field "date") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3473 message-id (mail-fetch-field "message-id") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3474 references (mail-fetch-field "references" nil nil t) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3475 resent-reply-to (mail-fetch-field "resent-reply-to" nil t) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3476 ;; Bug#512. It's inappropriate to reply to these addresses. |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3477 ;;; resent-cc (and (not just-sender) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3478 ;;; (mail-fetch-field "resent-cc" nil t)) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3479 ;;; resent-to (or (mail-fetch-field "resent-to" nil t) "") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3480 ;;; resent-subject (mail-fetch-field "resent-subject") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3481 ;;; resent-date (mail-fetch-field "resent-date") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3482 ;;; resent-message-id (mail-fetch-field "resent-message-id") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3483 ) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3484 (unless just-sender |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3485 (if (mail-fetch-field "mail-followup-to" nil t) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3486 ;; If this header field is present, use it instead of the |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3487 ;; To and CC fields. |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3488 (setq to (mail-fetch-field "mail-followup-to" nil t)) |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3489 (setq cc (or (mail-fetch-field "cc" nil t) "") |
a2de015c936d
(rmail-reply): Use rmail-apply-in-message so that this function has
Glenn Morris <rgm@gnu.org>
parents:
102340
diff
changeset
|
3490 to (or (mail-fetch-field "to" nil t) "")))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3491 ;; Merge the resent-to and resent-cc into the to and cc. |
101508
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3492 ;; Bug#512. It's inappropriate to reply to these addresses. |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3493 ;;; (if (and resent-to (not (equal resent-to ""))) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3494 ;;; (if (not (equal to "")) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3495 ;;; (setq to (concat to ", " resent-to)) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3496 ;;; (setq to resent-to))) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3497 ;;; (if (and resent-cc (not (equal resent-cc ""))) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3498 ;;; (if (not (equal cc "")) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3499 ;;; (setq cc (concat cc ", " resent-cc)) |
86f67454cfbb
(rmail-reply): Don't include Resent-To and Resent-Cc in replies. (Bug#512)
Glenn Morris <rgm@gnu.org>
parents:
101426
diff
changeset
|
3500 ;;; (setq cc resent-cc))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3501 ;; Add `Re: ' to subject if not there already. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3502 (and (stringp subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3503 (setq subject |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3504 (concat rmail-reply-prefix |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3505 (if (let ((case-fold-search t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3506 (string-match rmail-reply-regexp subject)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3507 (substring subject (match-end 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3508 subject)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3509 (rmail-start-mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3510 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3511 ;; Using mail-strip-quoted-names is undesirable with newer mailers |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3512 ;; since they can handle the names unstripped. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3513 ;; I don't know whether there are other mailers that still |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3514 ;; need the names to be stripped. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3515 ;;; (mail-strip-quoted-names reply-to) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3516 ;; Remove unwanted names from reply-to, since Mail-Followup-To |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3517 ;; header causes all the names in it to wind up in reply-to, not |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3518 ;; in cc. But if what's left is an empty list, use the original. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3519 (let* ((reply-to-list (rmail-dont-reply-to reply-to))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3520 (if (string= reply-to-list "") reply-to reply-to-list)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3521 subject |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3522 (rmail-make-in-reply-to-field from date message-id) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3523 (if just-sender |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3524 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3525 ;; mail-strip-quoted-names is NOT necessary for rmail-dont-reply-to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3526 ;; to do its job. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3527 (let* ((cc-list (rmail-dont-reply-to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3528 (mail-strip-quoted-names |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3529 (if (null cc) to (concat to ", " cc)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3530 (if (string= cc-list "") nil cc-list))) |
101695
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
3531 (if (rmail-buffers-swapped-p) |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
3532 rmail-buffer |
6241a2905cf0
(rmail-msg-is-pruned): New (restored) function.
Glenn Morris <rgm@gnu.org>
parents:
101684
diff
changeset
|
3533 rmail-view-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3534 (list (list 'rmail-mark-message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3535 rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3536 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3537 (aref rmail-msgref-vector msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3538 rmail-answered-attr-index)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3539 nil |
105158
bbb939ac799d
(rmail-reply): Don't try to add a References header when replying to
Glenn Morris <rgm@gnu.org>
parents:
105035
diff
changeset
|
3540 (if (or references message-id) |
bbb939ac799d
(rmail-reply): Don't try to add a References header when replying to
Glenn Morris <rgm@gnu.org>
parents:
105035
diff
changeset
|
3541 (list (cons "References" (if references |
bbb939ac799d
(rmail-reply): Don't try to add a References header when replying to
Glenn Morris <rgm@gnu.org>
parents:
105035
diff
changeset
|
3542 (concat |
bbb939ac799d
(rmail-reply): Don't try to add a References header when replying to
Glenn Morris <rgm@gnu.org>
parents:
105035
diff
changeset
|
3543 (mapconcat 'identity references " ") |
bbb939ac799d
(rmail-reply): Don't try to add a References header when replying to
Glenn Morris <rgm@gnu.org>
parents:
105035
diff
changeset
|
3544 " " message-id) |
bbb939ac799d
(rmail-reply): Don't try to add a References header when replying to
Glenn Morris <rgm@gnu.org>
parents:
105035
diff
changeset
|
3545 message-id))))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3546 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3547 (defun rmail-mark-message (buffer msgnum-list attribute) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3548 "Give BUFFER's message number in MSGNUM-LIST the attribute ATTRIBUTE. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3549 This is use in the send-actions for message buffers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3550 MSGNUM-LIST is a list of the form (MSGNUM) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3551 which is an element of rmail-msgref-vector." |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
3552 (with-current-buffer buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3553 (if (car msgnum-list) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3554 (rmail-set-attribute attribute t (car msgnum-list))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3555 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3556 (defun rmail-make-in-reply-to-field (from date message-id) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3557 (cond ((not from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3558 (if message-id |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3559 message-id |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3560 nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3561 (mail-use-rfc822 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3562 (require 'rfc822) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3563 (let ((tem (car (rfc822-addresses from)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3564 (if message-id |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3565 (if (or (not tem) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3566 (string-match |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3567 (regexp-quote (if (string-match "@[^@]*\\'" tem) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3568 (substring tem 0 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3569 (match-beginning 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3570 tem)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3571 message-id)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3572 ;; missing From, or Message-ID is sufficiently informative |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3573 message-id |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3574 (concat message-id " (" tem ")")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3575 ;; Copy TEM, discarding text properties. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3576 (setq tem (copy-sequence tem)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3577 (set-text-properties 0 (length tem) nil tem) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3578 (setq tem (copy-sequence tem)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3579 ;; Use prin1 to fake RFC822 quoting |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3580 (let ((field (prin1-to-string tem))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3581 (if date |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3582 (concat field "'s message of " date) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3583 field))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3584 ((let* ((foo "[^][\000-\037()<>@,;:\\\" ]+") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3585 (bar "[^][\000-\037()<>@,;:\\\"]+")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3586 ;; These strings both match all non-ASCII characters. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3587 (or (string-match (concat "\\`[ \t]*\\(" bar |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3588 "\\)\\(<" foo "@" foo ">\\)?[ \t]*\\'") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3589 ;; "Unix Loser <Foo@bar.edu>" => "Unix Loser" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3590 from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3591 (string-match (concat "\\`[ \t]*<" foo "@" foo ">[ \t]*(\\(" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3592 bar "\\))[ \t]*\\'") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3593 ;; "<Bugs@bar.edu>" (Losing Unix) => "Losing Unix" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3594 from))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3595 (let ((start (match-beginning 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3596 (end (match-end 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3597 ;; Trim whitespace which above regexp match allows |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3598 (while (and (< start end) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3599 (memq (aref from start) '(?\t ?\s))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3600 (setq start (1+ start))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3601 (while (and (< start end) |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
3602 (memq (aref from (1- end)) '(?\t ?\s))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3603 (setq end (1- end))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3604 (let ((field (substring from start end))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3605 (if date (setq field (concat "message from " field " on " date))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3606 (if message-id |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3607 ;; "<AA259@bar.edu> (message from Unix Loser on 1-Apr-89)" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3608 (concat message-id " (" field ")") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3609 field)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3610 (t |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3611 ;; If we can't kludge it simply, do it correctly |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3612 (let ((mail-use-rfc822 t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3613 (rmail-make-in-reply-to-field from date message-id))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3614 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3615 (defun rmail-forward (resend) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3616 "Forward the current message to another user. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3617 With prefix argument, \"resend\" the message instead of forwarding it; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3618 see the documentation of `rmail-resend'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3619 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3620 (if resend |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3621 (call-interactively 'rmail-resend) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3622 (let ((forward-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3623 (msgnum rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3624 (subject (concat "[" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3625 (let ((from (or (mail-fetch-field "From") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3626 (mail-fetch-field ">From")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3627 (if from |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3628 (concat (mail-strip-quoted-names from) ": ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3629 "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3630 (or (mail-fetch-field "Subject") "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3631 "]"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3632 (if (rmail-start-mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3633 nil nil subject nil nil nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3634 (list (list 'rmail-mark-message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3635 forward-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3636 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3637 (aref rmail-msgref-vector msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3638 rmail-forwarded-attr-index)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3639 ;; If only one window, use it for the mail buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3640 ;; Otherwise, use another window for the mail buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3641 ;; so that the Rmail buffer remains visible |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3642 ;; and sending the mail will get back to it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3643 (and (not rmail-mail-new-frame) (one-window-p t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3644 ;; The mail buffer is now current. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3645 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3646 ;; Insert after header separator--before signature if any. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3647 (goto-char (mail-text-start)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3648 (if (or rmail-enable-mime rmail-enable-mime-composing) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3649 (funcall rmail-insert-mime-forwarded-message-function |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3650 forward-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3651 (insert "------- Start of forwarded message -------\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3652 ;; Quote lines with `- ' if they start with `-'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3653 (let ((beg (point)) end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3654 (setq end (point-marker)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3655 (set-marker-insertion-type end t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3656 (insert-buffer-substring forward-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3657 (goto-char beg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3658 (while (re-search-forward "^-" end t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3659 (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3660 (insert "- ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3661 (forward-line 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3662 (goto-char end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3663 (skip-chars-backward "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3664 (if (< (point) end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3665 (forward-char 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3666 (delete-region (point) end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3667 (set-marker end nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3668 (insert "------- End of forwarded message -------\n")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3669 (push-mark)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3670 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3671 (defun rmail-resend (address &optional from comment mail-alias-file) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3672 "Resend current message to ADDRESSES. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3673 ADDRESSES should be a single address, a string consisting of several |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3674 addresses separated by commas, or a list of addresses. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3675 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3676 Optional FROM is the address to resend the message from, and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3677 defaults from the value of `user-mail-address'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3678 Optional COMMENT is a string to insert as a comment in the resent message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3679 Optional ALIAS-FILE is alternate aliases file to be used by sendmail, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3680 typically for purposes of moderating a list." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3681 (interactive "sResend to: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3682 (require 'sendmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3683 (require 'mailalias) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3684 (unless (or (eq rmail-view-buffer (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3685 (eq rmail-buffer (current-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3686 (error "Not an Rmail buffer")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3687 (if (not from) (setq from user-mail-address)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3688 (let ((tembuf (generate-new-buffer " sendmail temp")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3689 (case-fold-search nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3690 (mail-personal-alias-file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3691 (or mail-alias-file mail-personal-alias-file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3692 (mailbuf rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3693 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3694 (with-current-buffer tembuf |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3695 ;;>> Copy message into temp buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3696 (if rmail-enable-mime |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3697 (if rmail-insert-mime-resent-message-function |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3698 (funcall rmail-insert-mime-resent-message-function mailbuf) |
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3699 (error "You must set `rmail-insert-mime-resent-message-function'")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3700 (insert-buffer-substring mailbuf)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3701 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3702 ;; Delete any Sender field, since that's not specifiable. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3703 ; Only delete Sender fields in the actual header. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3704 (re-search-forward "^$" nil 'move) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3705 ; Using "while" here rather than "if" because some buggy mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3706 ; software may have inserted multiple Sender fields. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3707 (while (re-search-backward "^Sender:" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3708 (let (beg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3709 (setq beg (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3710 (forward-line 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3711 (while (looking-at "[ \t]") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3712 (forward-line 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3713 (delete-region beg (point)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3714 ; Go back to the beginning of the buffer so the Resent- fields |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3715 ; are inserted there. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3716 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3717 ;;>> Insert resent-from: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3718 (insert "Resent-From: " from "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3719 (insert "Resent-Date: " (mail-rfc822-date) "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3720 ;;>> Insert resent-to: and bcc if need be. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3721 (let ((before (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3722 (if mail-self-blind |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3723 (insert "Resent-Bcc: " (user-login-name) "\n")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3724 (insert "Resent-To: " (if (stringp address) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3725 address |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3726 (mapconcat 'identity address ",\n\t")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3727 "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3728 ;; Expand abbrevs in the recipients. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3729 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3730 (if (featurep 'mailabbrev) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3731 (let ((end (point-marker)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3732 (local-abbrev-table mail-abbrevs) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3733 (old-syntax-table (syntax-table))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3734 (if (and (not (vectorp mail-abbrevs)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3735 (file-exists-p mail-personal-alias-file)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3736 (build-mail-abbrevs)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3737 (unless mail-abbrev-syntax-table |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3738 (mail-abbrev-make-syntax-table)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3739 (set-syntax-table mail-abbrev-syntax-table) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3740 (goto-char before) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3741 (while (and (< (point) end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3742 (progn (forward-word 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3743 (<= (point) end))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3744 (expand-abbrev)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3745 (set-syntax-table old-syntax-table)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3746 (expand-mail-aliases before (point))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3747 ;;>> Set up comment, if any. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3748 (if (and (sequencep comment) (not (zerop (length comment)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3749 (let ((before (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3750 after) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3751 (insert comment) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3752 (or (eolp) (insert "\n")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3753 (setq after (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3754 (goto-char before) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3755 (while (< (point) after) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3756 (insert "Resent-Comment: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3757 (forward-line 1)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3758 ;; Don't expand aliases in the destination fields |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3759 ;; of the original message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3760 (let (mail-aliases) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3761 (funcall send-mail-function))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3762 (kill-buffer tembuf)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3763 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3764 (rmail-set-attribute rmail-resent-attr-index t rmail-current-message)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3765 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3766 (defvar mail-unsent-separator |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3767 (concat "^ *---+ +Unsent message follows +---+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3768 "^ *---+ +Returned message +---+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3769 "^ *---+ *Returned mail follows *---+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3770 "^Start of returned message$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3771 "^---+ Below this line is a copy of the message.$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3772 "^ *---+ +Original message +---+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3773 "^ *--+ +begin message +--+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3774 "^ *---+ +Original message follows +---+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3775 "^ *---+ +Your message follows +---+ *$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3776 "^|? *---+ +Message text follows: +---+ *|?$\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3777 "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *$") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3778 "A regexp that matches the separator before the text of a failed message.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3779 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3780 (defvar mail-mime-unsent-header "^Content-Type: message/rfc822 *$" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3781 "A regexp that matches the header of a MIME body part with a failed message.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3782 |
102357
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3783 ;; This is a cut-down version of rmail-clear-headers from Emacs 22. |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3784 ;; It doesn't have the same functionality, hence the name change. |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3785 (defun rmail-delete-headers (regexp) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3786 "Delete any mail headers matching REGEXP. |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3787 The message should be narrowed to just the headers." |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3788 (when regexp |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3789 (goto-char (point-min)) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3790 (while (re-search-forward regexp nil t) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3791 (beginning-of-line) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3792 ;; This code from Emacs 22 doesn't seem right, since r-n-h is |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3793 ;; just for display. |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3794 ;;; (if (looking-at rmail-nonignored-headers) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3795 ;;; (forward-line 1) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3796 (delete-region (point) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3797 (save-excursion |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3798 (if (re-search-forward "\n[^ \t]" nil t) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3799 (1- (point)) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3800 (point-max))))))) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3801 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3802 (defun rmail-retry-failure () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3803 "Edit a mail message which is based on the contents of the current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3804 For a message rejected by the mail system, extract the interesting headers and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3805 the body of the original message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3806 If the failed message is a MIME multipart message, it is searched for a |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3807 body part with a header which matches the variable `mail-mime-unsent-header'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3808 Otherwise, the variable `mail-unsent-separator' should match the string that |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3809 delimits the returned original message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3810 The variable `rmail-retry-ignored-headers' is a regular expression |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3811 specifying headers which should not be copied into the new message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3812 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3813 (require 'mail-utils) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3814 (let ((rmail-this-buffer (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3815 (msgnum rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3816 bounce-start bounce-end bounce-indent resending |
102356
fd6b5c8dd39b
(rmail-retry-failure): Use rmail-get-header rather than a magical
Glenn Morris <rgm@gnu.org>
parents:
102355
diff
changeset
|
3817 (content-type (rmail-get-header "Content-Type"))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3818 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3819 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3820 (let ((case-fold-search t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3821 (if (and content-type |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3822 (string-match |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3823 ";[\n\t ]*boundary=\"?\\([-0-9a-z'()+_,./:=? ]+\\)\"?" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3824 content-type)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3825 ;; Handle a MIME multipart bounce message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3826 (let ((codestring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3827 (concat "\n--" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3828 (substring content-type (match-beginning 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3829 (match-end 1))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3830 (unless (re-search-forward mail-mime-unsent-header nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3831 (error "Cannot find beginning of header in failed message")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3832 (unless (search-forward "\n\n" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3833 (error "Cannot find start of Mime data in failed message")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3834 (setq bounce-start (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3835 (if (search-forward codestring nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3836 (setq bounce-end (match-beginning 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3837 (setq bounce-end (point-max)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3838 ;; Non-MIME bounce. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3839 (or (re-search-forward mail-unsent-separator nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3840 (error "Cannot parse this as a failure message")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3841 (skip-chars-forward "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3842 ;; Support a style of failure message in which the original |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3843 ;; message is indented, and included within lines saying |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3844 ;; `Start of returned message' and `End of returned message'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3845 (if (looking-at " +Received:") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3846 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3847 (setq bounce-start (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3848 (skip-chars-forward " ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3849 (setq bounce-indent (- (current-column))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3850 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3851 (re-search-backward "^End of returned message$" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3852 (setq bounce-end (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3853 ;; One message contained a few random lines before |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3854 ;; the old message header. The first line of the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3855 ;; message started with two hyphens. A blank line |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3856 ;; followed these random lines. The same line |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3857 ;; beginning with two hyphens was possibly marking |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3858 ;; the end of the message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3859 (if (looking-at "^--") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3860 (let ((boundary (buffer-substring-no-properties |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3861 (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3862 (progn (end-of-line) (point))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3863 (search-forward "\n\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3864 (skip-chars-forward "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3865 (setq bounce-start (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3866 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3867 (search-backward (concat "\n\n" boundary) bounce-start t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3868 (setq bounce-end (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3869 (setq bounce-start (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3870 bounce-end (point-max))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3871 (unless (search-forward "\n\n" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3872 (error "Cannot find end of header in failed message")))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3873 ;; We have found the message that bounced, within the current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3874 ;; Now start sending new message; default header fields from original. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3875 ;; Turn off the usual actions for initializing the message body |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3876 ;; because we want to get only the text from the failure message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3877 (let (mail-signature mail-setup-hook) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3878 (if (rmail-start-mail nil nil nil nil nil rmail-this-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3879 (list (list 'rmail-mark-message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3880 rmail-this-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3881 (aref rmail-msgref-vector msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3882 rmail-retried-attr-index))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3883 ;; Insert original text as initial text of new draft message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3884 ;; Bind inhibit-read-only since the header delimiter |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3885 ;; of the previous message was probably read-only. |
102357
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3886 (let ((inhibit-read-only t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3887 (erase-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3888 (insert-buffer-substring rmail-this-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3889 bounce-start bounce-end) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3890 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3891 (if bounce-indent |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3892 (indent-rigidly (point-min) (point-max) bounce-indent)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3893 (mail-sendmail-delimit-header) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3894 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3895 (narrow-to-region (point-min) (mail-header-end)) |
102357
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3896 (rmail-delete-headers rmail-retry-ignored-headers) |
965102fa40ea
(rmail-delete-headers): New function.
Glenn Morris <rgm@gnu.org>
parents:
102356
diff
changeset
|
3897 (rmail-delete-headers "^\\(sender\\|return-path\\|received\\):") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3898 (setq resending (mail-fetch-field "resent-to")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3899 (if mail-self-blind |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3900 (if resending |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3901 (insert "Resent-Bcc: " (user-login-name) "\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3902 (insert "BCC: " (user-login-name) "\n")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3903 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3904 (mail-position-on-field (if resending "Resent-To" "To") t)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3905 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3906 (defun rmail-summary-exists () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3907 "Non-nil if in an RMAIL buffer and an associated summary buffer exists. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3908 In fact, the non-nil value returned is the summary buffer itself." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3909 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3910 rmail-summary-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3911 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3912 (defun rmail-summary-displayed () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3913 "t if in RMAIL buffer and an associated summary buffer is displayed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3914 (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3915 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3916 (defcustom rmail-redisplay-summary nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3917 "Non-nil means Rmail should show the summary when it changes. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3918 This has an effect only if a summary buffer exists." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3919 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3920 :group 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3921 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3922 (defcustom rmail-summary-window-size nil |
101539
8f87ea6e3964
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101508
diff
changeset
|
3923 "Non-nil means specify the height for an Rmail summary window." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3924 :type '(choice (const :tag "Disabled" nil) integer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3925 :group 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3926 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3927 ;; Put the summary buffer back on the screen, if user wants that. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3928 (defun rmail-maybe-display-summary () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3929 (let ((selected (selected-window)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3930 window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3931 ;; If requested, make sure the summary is displayed. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3932 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3933 rmail-redisplay-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3934 (if (get-buffer-window rmail-summary-buffer 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3935 ;; It's already in some frame; show that one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3936 (let ((frame (window-frame |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3937 (get-buffer-window rmail-summary-buffer 0)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3938 (make-frame-visible frame) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3939 (raise-frame frame)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3940 (display-buffer rmail-summary-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3941 ;; If requested, set the height of the summary window. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3942 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3943 rmail-summary-window-size |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3944 (setq window (get-buffer-window rmail-summary-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3945 ;; Don't try to change the size if just one window in frame. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3946 (not (eq window (frame-root-window (window-frame window)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3947 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3948 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3949 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3950 (enlarge-window (- rmail-summary-window-size (window-height)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3951 (select-window selected))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3952 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3953 ;;;; *** Rmail Local Fontification *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3954 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3955 (defun rmail-fontify-buffer-function () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3956 ;; This function's symbol is bound to font-lock-fontify-buffer-function. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3957 (add-hook 'rmail-show-message-hook 'rmail-fontify-message nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3958 ;; If we're already showing a message, fontify it now. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3959 (if rmail-current-message (rmail-fontify-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3960 ;; Prevent Font Lock mode from kicking in. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3961 (setq font-lock-fontified t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3962 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3963 (defun rmail-unfontify-buffer-function () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3964 ;; This function's symbol is bound to font-lock-fontify-unbuffer-function. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3965 (let ((modified (buffer-modified-p)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3966 (buffer-undo-list t) (inhibit-read-only t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3967 before-change-functions after-change-functions |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3968 buffer-file-name buffer-file-truename) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3969 (save-restriction |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3970 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3971 (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3972 (remove-text-properties (point-min) (point-max) '(rmail-fontified nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3973 (font-lock-default-unfontify-buffer) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
3974 (and (not modified) (buffer-modified-p) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
3975 (restore-buffer-modified-p nil))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3976 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3977 (defun rmail-fontify-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3978 ;; Fontify the current message if it is not already fontified. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3979 (if (text-property-any (point-min) (point-max) 'rmail-fontified nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3980 (let ((modified (buffer-modified-p)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3981 (buffer-undo-list t) (inhibit-read-only t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3982 before-change-functions after-change-functions |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3983 buffer-file-name buffer-file-truename) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3984 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3985 (save-match-data |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3986 (add-text-properties (point-min) (point-max) '(rmail-fontified t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3987 (font-lock-fontify-region (point-min) (point-max)) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
3988 (and (not modified) (buffer-modified-p) |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
3989 (restore-buffer-modified-p nil))))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3990 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3991 ;;; Speedbar support for RMAIL files. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3992 (eval-when-compile (require 'speedbar)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3993 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3994 (defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3995 "*This regex is used to match folder names to be displayed in speedbar. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3996 Enabling this will permit speedbar to display your folders for easy |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3997 browsing, and moving of messages.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3998 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3999 (defvar rmail-speedbar-last-user nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4000 "The last user to be displayed in the speedbar.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4001 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4002 (defvar rmail-speedbar-key-map nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4003 "Keymap used when in rmail display mode.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4004 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4005 (defun rmail-install-speedbar-variables () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4006 "Install those variables used by speedbar to enhance rmail." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4007 (if rmail-speedbar-key-map |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4008 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4009 (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4010 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4011 (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4012 (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4013 (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4014 (define-key rmail-speedbar-key-map "M" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4015 'rmail-speedbar-move-message-to-folder-on-line))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4016 |
102142 | 4017 ;; Mouse-3. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4018 (defvar rmail-speedbar-menu-items |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4019 '(["Read Folder" speedbar-edit-line t] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4020 ["Move message to folder" rmail-speedbar-move-message-to-folder-on-line |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4021 (save-excursion (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4022 (looking-at "<M> "))]) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4023 "Additional menu-items to add to speedbar frame.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4024 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4025 ;; Make sure our special speedbar major mode is loaded |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4026 (if (featurep 'speedbar) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4027 (rmail-install-speedbar-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4028 (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4029 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4030 (defun rmail-speedbar-buttons (buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4031 "Create buttons for BUFFER containing rmail messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4032 Click on the address under Reply to: to reply to this person. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4033 Under Folders: Click a name to read it, or on the <M> to move the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4034 current message into that RMAIL folder." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4035 (let ((from nil)) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
4036 (with-current-buffer buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4037 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4038 (if (not (re-search-forward "^Reply-To: " nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4039 (if (not (re-search-forward "^From:? " nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4040 (setq from t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4041 (if from |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4042 nil |
101667
ecf38b9f654d
(rmail-speedbar-buttons, rmail-speedbar-move-message-to-folder-on-line):
Glenn Morris <rgm@gnu.org>
parents:
101661
diff
changeset
|
4043 (setq from (buffer-substring (point) (line-end-position))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4044 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4045 (if (and (looking-at "Reply to:") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4046 (equal from rmail-speedbar-last-user)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4047 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4048 (setq rmail-speedbar-last-user from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4049 (erase-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4050 (insert "Reply To:\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4051 (if (stringp from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4052 (speedbar-insert-button from 'speedbar-directory-face 'highlight |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4053 'rmail-speedbar-button 'rmail-reply)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4054 (insert "Folders:\n") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4055 (let* ((case-fold-search nil) |
101726
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
4056 (df (directory-files (with-current-buffer buffer |
72dd6e84d495
(rmail-view-buffer): Make buffer-local.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101719
diff
changeset
|
4057 default-directory) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4058 nil rmail-speedbar-match-folder-regexp))) |
102139
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4059 (dolist (file df) |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4060 (when (file-regular-p file) |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4061 (speedbar-insert-button "<M>" 'speedbar-button-face 'highlight |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4062 'rmail-speedbar-move-message file) |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4063 (speedbar-insert-button file 'speedbar-file-face 'highlight |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4064 'rmail-speedbar-find-file nil t))))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4065 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4066 (defun rmail-speedbar-button (text token indent) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4067 "Execute an rmail command specified by TEXT. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4068 The command used is TOKEN. INDENT is not used." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4069 (speedbar-with-attached-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4070 (funcall token t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4071 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4072 (defun rmail-speedbar-find-file (text token indent) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4073 "Load in the rmail file TEXT. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4074 TOKEN and INDENT are not used." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4075 (speedbar-with-attached-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4076 (message "Loading in RMAIL file %s..." text) |
102139
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4077 (rmail text))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4078 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4079 (defun rmail-speedbar-move-message-to-folder-on-line () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4080 "If the current line is a folder, move current message to it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4081 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4082 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4083 (beginning-of-line) |
101667
ecf38b9f654d
(rmail-speedbar-buttons, rmail-speedbar-move-message-to-folder-on-line):
Glenn Morris <rgm@gnu.org>
parents:
101661
diff
changeset
|
4084 (if (re-search-forward "<M> " (line-end-position) t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4085 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4086 (forward-char -2) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4087 (speedbar-do-function-pointer))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4088 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4089 (defun rmail-speedbar-move-message (text token indent) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4090 "From button TEXT, copy current message to the rmail file specified by TOKEN. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4091 TEXT and INDENT are not used." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4092 (speedbar-with-attached-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4093 (message "Moving message to %s" token) |
102308
23fb4f756c63
(rmail-speedbar-move-message): Preserve the directory part against
Glenn Morris <rgm@gnu.org>
parents:
102229
diff
changeset
|
4094 ;; expand-file-name is needed due to the unhelpful way in which |
23fb4f756c63
(rmail-speedbar-move-message): Preserve the directory part against
Glenn Morris <rgm@gnu.org>
parents:
102229
diff
changeset
|
4095 ;; rmail-output expands non-absolute filenames against rmail-default-file. |
23fb4f756c63
(rmail-speedbar-move-message): Preserve the directory part against
Glenn Morris <rgm@gnu.org>
parents:
102229
diff
changeset
|
4096 ;; What is the point of that, anyway? |
23fb4f756c63
(rmail-speedbar-move-message): Preserve the directory part against
Glenn Morris <rgm@gnu.org>
parents:
102229
diff
changeset
|
4097 (rmail-output (expand-file-name token)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4098 |
102139
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4099 ;; Functions for setting, getting and encoding the POP password. |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4100 ;; The password is encoded to prevent it from being easily accessible |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4101 ;; to "prying eyes." Obviously, this encoding isn't "real security," |
171f872c74c8
(rmail-speedbar-buttons): Only add regular files.
Glenn Morris <rgm@gnu.org>
parents:
102111
diff
changeset
|
4102 ;; nor is it meant to be. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4103 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4104 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4105 (defun rmail-set-remote-password (password) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4106 "Set PASSWORD to be used for retrieving mail from a POP or IMAP server." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4107 (interactive "sPassword: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4108 (if password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4109 (setq rmail-encoded-remote-password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4110 (rmail-encode-string password (emacs-pid))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4111 (setq rmail-remote-password nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4112 (setq rmail-encoded-remote-password nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4113 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4114 (defun rmail-get-remote-password (imap) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4115 "Get the password for retrieving mail from a POP or IMAP server. If none |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4116 has been set, then prompt the user for one." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4117 (when (not rmail-encoded-remote-password) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4118 (if (not rmail-remote-password) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4119 (setq rmail-remote-password |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4120 (read-passwd (if imap |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4121 "IMAP password: " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4122 "POP password: ")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4123 (rmail-set-remote-password rmail-remote-password) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4124 (setq rmail-remote-password nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4125 (rmail-encode-string rmail-encoded-remote-password (emacs-pid))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4126 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4127 (defun rmail-have-password () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4128 (or rmail-remote-password rmail-encoded-remote-password)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4129 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4130 (defun rmail-encode-string (string mask) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4131 "Encode STRING with integer MASK, by taking the exclusive OR of the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4132 lowest byte in the mask with the first character of string, the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4133 second-lowest-byte with the second character of the string, etc., |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4134 restarting at the lowest byte of the mask whenever it runs out. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4135 Returns the encoded string. Calling the function again with an |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4136 encoded string (and the same mask) will decode the string." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4137 (setq mask (abs mask)) ; doesn't work if negative |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4138 (let* ((string-vector (string-to-vector string)) (i 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4139 (len (length string-vector)) (curmask mask) charmask) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4140 (while (< i len) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4141 (if (= curmask 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4142 (setq curmask mask)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4143 (setq charmask (% curmask 256)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4144 (setq curmask (lsh curmask -8)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4145 (aset string-vector i (logxor charmask (aref string-vector i))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4146 (setq i (1+ i))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4147 (concat string-vector))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4148 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4149 ;;;; Desktop support |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4150 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4151 (defun rmail-restore-desktop-buffer (desktop-buffer-file-name |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
4152 desktop-buffer-name |
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
4153 desktop-buffer-misc) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4154 "Restore an rmail buffer specified in a desktop file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4155 (condition-case error |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4156 (progn |
102088
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
4157 (rmail-input desktop-buffer-file-name) |
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
4158 (if (eq major-mode 'rmail-mode) |
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
4159 (current-buffer) |
7697cceb3a2b
(rmail-get-new-mail-1): Fix the spam beep test.
Glenn Morris <rgm@gnu.org>
parents:
102073
diff
changeset
|
4160 rmail-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4161 (file-locked |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4162 (kill-buffer (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4163 nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4164 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4165 (add-to-list 'desktop-buffer-mode-handlers |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4166 '(rmail-mode . rmail-restore-desktop-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4167 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4168 ;; Used in `write-region-annotate-functions' to write rmail files. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4169 (defun rmail-write-region-annotate (start end) |
101396
6505850d379f
(rmail-write-region-annotate): Only switch buffer if
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101373
diff
changeset
|
4170 (when (and (null start) (rmail-buffers-swapped-p)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4171 (set-buffer rmail-view-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4172 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4173 nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4174 |
104909
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4175 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4176 ;;; Start of automatically extracted autoloads. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4177 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4178 ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el" |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4179 ;;;;;; "c70c6c35b8c5bbdb73787a48b83e5adc") |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4180 ;;; Generated autoloads from rmailedit.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4181 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4182 (autoload 'rmail-edit-current-message "rmailedit" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4183 Edit the contents of this message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4184 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4185 \(fn)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4186 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4187 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4188 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4189 ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4190 ;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" |
104952 | 4191 ;;;;;; "rmailkwd.el" "2e986921026eea971b49e91f53967f77") |
104909
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4192 ;;; Generated autoloads from rmailkwd.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4193 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4194 (autoload 'rmail-add-label "rmailkwd" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4195 Add LABEL to labels associated with current RMAIL message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4196 Completes (see `rmail-read-label') over known labels when reading. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4197 LABEL may be a symbol or string. Only one label is allowed. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4198 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4199 \(fn LABEL)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4200 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4201 (autoload 'rmail-kill-label "rmailkwd" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4202 Remove LABEL from labels associated with current RMAIL message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4203 Completes (see `rmail-read-label') over known labels when reading. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4204 LABEL may be a symbol or string. Only one label is allowed. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4205 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4206 \(fn LABEL)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4207 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4208 (autoload 'rmail-read-label "rmailkwd" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4209 Read a label with completion, prompting with PROMPT. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4210 Completions are chosen from `rmail-label-obarray'. The default |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4211 is `rmail-last-label', if that is non-nil. Updates `rmail-last-label' |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4212 according to the choice made, and returns a symbol. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4213 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4214 \(fn PROMPT)" nil nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4215 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4216 (autoload 'rmail-previous-labeled-message "rmailkwd" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4217 Show previous message with one of the labels LABELS. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4218 LABELS should be a comma-separated list of label names. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4219 If LABELS is empty, the last set of labels specified is used. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4220 With prefix argument N moves backward N messages with these labels. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4221 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4222 \(fn N LABELS)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4223 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4224 (autoload 'rmail-next-labeled-message "rmailkwd" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4225 Show next message with one of the labels LABELS. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4226 LABELS should be a comma-separated list of label names. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4227 If LABELS is empty, the last set of labels specified is used. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4228 With prefix argument N moves forward N messages with these labels. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4229 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4230 \(fn N LABELS)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4231 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4232 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4233 |
105199 | 4234 ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "37452cfc1d0792a46468e47b569073c0") |
104909
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4235 ;;; Generated autoloads from rmailmm.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4236 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4237 (autoload 'rmail-mime "rmailmm" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4238 Process the current Rmail message as a MIME message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4239 This creates a temporary \"*RMAIL*\" buffer holding a decoded |
105188 | 4240 copy of the message. Inline content-types are handled according to |
104909
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4241 `rmail-mime-media-type-handlers-alist'. By default, this |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4242 displays text and multipart messages, and offers to download |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4243 attachments as specfied by `rmail-mime-attachment-dirs-alist'. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4244 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4245 \(fn)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4246 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4247 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4248 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4249 ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "rmailmsc.el" |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4250 ;;;;;; "de01c37c81339201034a01732b97f44e") |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4251 ;;; Generated autoloads from rmailmsc.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4252 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4253 (autoload 'set-rmail-inbox-list "rmailmsc" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4254 Set the inbox list of the current RMAIL file to FILE-NAME. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4255 You can specify one file name, or several names separated by commas. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4256 If FILE-NAME is empty, remove any existing inbox list. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4257 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4258 This applies only to the current session. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4259 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4260 \(fn FILE-NAME)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4261 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4262 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4263 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4264 ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4265 ;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4266 ;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "3f2b10b0272ea56cb604f29330d95fc4") |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4267 ;;; Generated autoloads from rmailsort.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4268 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4269 (autoload 'rmail-sort-by-date "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4270 Sort messages of current Rmail buffer by \"Date\" header. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4271 If prefix argument REVERSE is non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4272 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4273 \(fn REVERSE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4274 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4275 (autoload 'rmail-sort-by-subject "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4276 Sort messages of current Rmail buffer by \"Subject\" header. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4277 Ignores any \"Re: \" prefix. If prefix argument REVERSE is |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4278 non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4279 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4280 \(fn REVERSE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4281 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4282 (autoload 'rmail-sort-by-author "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4283 Sort messages of current Rmail buffer by author. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4284 This uses either the \"From\" or \"Sender\" header, downcased. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4285 If prefix argument REVERSE is non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4286 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4287 \(fn REVERSE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4288 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4289 (autoload 'rmail-sort-by-recipient "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4290 Sort messages of current Rmail buffer by recipient. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4291 This uses either the \"To\" or \"Apparently-To\" header, downcased. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4292 If prefix argument REVERSE is non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4293 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4294 \(fn REVERSE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4295 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4296 (autoload 'rmail-sort-by-correspondent "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4297 Sort messages of current Rmail buffer by other correspondent. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4298 This uses either the \"From\", \"Sender\", \"To\", or |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4299 \"Apparently-To\" header, downcased. Uses the first header not |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4300 excluded by `rmail-dont-reply-to-names'. If prefix argument |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4301 REVERSE is non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4302 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4303 \(fn REVERSE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4304 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4305 (autoload 'rmail-sort-by-lines "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4306 Sort messages of current Rmail buffer by the number of lines. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4307 If prefix argument REVERSE is non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4308 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4309 \(fn REVERSE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4310 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4311 (autoload 'rmail-sort-by-labels "rmailsort" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4312 Sort messages of current Rmail buffer by labels. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4313 LABELS is a comma-separated list of labels. The order of these |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4314 labels specifies the order of messages: messages with the first |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4315 label come first, messages with the second label come second, and |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4316 so on. Messages that have none of these labels come last. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4317 If prefix argument REVERSE is non-nil, sorts in reverse order. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4318 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4319 \(fn REVERSE LABELS)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4320 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4321 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4322 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4323 ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4324 ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4325 ;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "60bec0ae88b7ed18dd6845ddb9ccd904") |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4326 ;;; Generated autoloads from rmailsum.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4327 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4328 (autoload 'rmail-summary "rmailsum" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4329 Display a summary of all messages, one line per message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4330 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4331 \(fn)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4332 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4333 (autoload 'rmail-summary-by-labels "rmailsum" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4334 Display a summary of all messages with one or more LABELS. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4335 LABELS should be a string containing the desired labels, separated by commas. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4336 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4337 \(fn LABELS)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4338 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4339 (autoload 'rmail-summary-by-recipients "rmailsum" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4340 Display a summary of all messages with the given RECIPIENTS. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4341 Normally checks the To, From and Cc fields of headers; |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4342 but if PRIMARY-ONLY is non-nil (prefix arg given), |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4343 only look in the To and From fields. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4344 RECIPIENTS is a string of regexps separated by commas. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4345 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4346 \(fn RECIPIENTS &optional PRIMARY-ONLY)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4347 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4348 (autoload 'rmail-summary-by-regexp "rmailsum" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4349 Display a summary of all messages according to regexp REGEXP. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4350 If the regular expression is found in the header of the message |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4351 \(including in the date and other lines, as well as the subject line), |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4352 Emacs will list the message in the summary. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4353 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4354 \(fn REGEXP)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4355 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4356 (autoload 'rmail-summary-by-topic "rmailsum" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4357 Display a summary of all messages with the given SUBJECT. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4358 Normally checks just the Subject field of headers; but with prefix |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4359 argument WHOLE-MESSAGE is non-nil, looks in the whole message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4360 SUBJECT is a string of regexps separated by commas. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4361 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4362 \(fn SUBJECT &optional WHOLE-MESSAGE)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4363 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4364 (autoload 'rmail-summary-by-senders "rmailsum" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4365 Display a summary of all messages whose \"From\" field matches SENDERS. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4366 SENDERS is a string of regexps separated by commas. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4367 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4368 \(fn SENDERS)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4369 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4370 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4371 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4372 ;;;### (autoloads (unforward-rmail-message undigestify-rmail-message) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4373 ;;;;;; "undigest" "undigest.el" "b691540ddff5c394e9ebc3517051445f") |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4374 ;;; Generated autoloads from undigest.el |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4375 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4376 (autoload 'undigestify-rmail-message "undigest" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4377 Break up a digest message into its constituent messages. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4378 Leaves original message, deleted, before the undigestified messages. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4379 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4380 \(fn)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4381 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4382 (autoload 'unforward-rmail-message "undigest" "\ |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4383 Extract a forwarded message from the containing message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4384 This puts the forwarded message into a separate rmail message |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4385 following the containing message. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4386 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4387 \(fn)" t nil) |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4388 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4389 ;;;*** |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4390 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4391 ;;; End of automatically extracted autoloads. |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4392 |
1b22e1063ccc
(rmail-user-mail-address-regexp): Move here from rmailsum.el.
Glenn Morris <rgm@gnu.org>
parents:
104823
diff
changeset
|
4393 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4394 (provide 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4395 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4396 ;; arch-tag: 65d257d3-c281-4a65-9c38-e61af95af2f0 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
4397 ;;; rmail.el ends here |