Mercurial > emacs
annotate lisp/mail/rmailedit.el @ 106611:09979dbce827
Refer to the static bug page (rather than the dynamic one) for a list
of all bugs.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 17 Dec 2009 04:22:45 +0000 |
parents | 6e207d2a8bc6 |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1 ;;; rmailedit.el --- "RMAIL edit mode" Edit the current message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2 |
101917 | 3 ;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
4 ;; 2008, 2009 Free Software Foundation, Inc. | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
5 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
6 ;; Maintainer: FSF |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
7 ;; Keywords: mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
8 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
10 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
11 ;; 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
|
12 ;; 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
|
13 ;; 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
|
14 ;; (at your option) any later version. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
15 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
16 ;; 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
|
17 ;; 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
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
20 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
21 ;; 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
|
22 ;; 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
|
23 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
24 ;;; Commentary: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
25 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
26 ;;; Code: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
27 |
101917 | 28 (require 'rmail) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
29 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
30 (defcustom rmail-edit-mode-hook nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
31 "List of functions to call when editing an RMAIL message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
32 :type 'hook |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
33 :version "21.1" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
34 :group 'rmail-edit) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
35 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
36 |
101724
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
37 (defvar rmail-edit-map |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
38 (let ((map (make-sparse-keymap))) |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
39 ;; Make a keymap that inherits text-mode-map. |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
40 (set-keymap-parent map text-mode-map) |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
41 (define-key map "\C-c\C-c" 'rmail-cease-edit) |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
42 (define-key map "\C-c\C-]" 'rmail-abort-edit) |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
43 map)) |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
44 |
101633
c92166611a26
(rmail-summary-disable): Fix declaration.
Glenn Morris <rgm@gnu.org>
parents:
101629
diff
changeset
|
45 (declare-function rmail-summary-disable "rmailsum" ()) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
46 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
47 (defun rmail-edit-mode () |
102388 | 48 "Major mode for editing the contents of an Rmail message. |
49 The editing commands are the same as in Text mode, together with | |
50 two commands to return to regular Rmail: | |
51 * \\[rmail-abort-edit] cancels any changes and returns to Rmail | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
52 * \\[rmail-cease-edit] makes them permanent. |
102388 | 53 This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
54 \\{rmail-edit-map}" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
55 (if (rmail-summary-exists) |
101724
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
56 (with-current-buffer rmail-summary-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
57 (rmail-summary-disable))) |
102388 | 58 ;; Prevent change-major-mode-hook from unswapping the buffers. |
59 (let ((rmail-buffer-swapped nil)) | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
60 (delay-mode-hooks (text-mode)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
61 (use-local-map rmail-edit-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
62 (setq major-mode 'rmail-edit-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
63 (setq mode-name "RMAIL Edit") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
64 (if (boundp 'mode-line-modified) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
65 (setq mode-line-modified (default-value 'mode-line-modified)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
66 (setq mode-line-format (default-value 'mode-line-format))) |
104016
e59e70025fe8
* mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions.
Chong Yidong <cyd@stupidchicken.com>
parents:
103239
diff
changeset
|
67 ;; Don't turn off auto-saving based on the size of the buffer |
e59e70025fe8
* mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions.
Chong Yidong <cyd@stupidchicken.com>
parents:
103239
diff
changeset
|
68 ;; because that code does not understand buffer-swapping. |
e59e70025fe8
* mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions.
Chong Yidong <cyd@stupidchicken.com>
parents:
103239
diff
changeset
|
69 (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:
103239
diff
changeset
|
70 (setq auto-save-include-big-deletions t) |
102478
f4571df6b6cc
(rmail-edit-mode): Set write-region-annotate-functions. (Bug#2625)
Glenn Morris <rgm@gnu.org>
parents:
102407
diff
changeset
|
71 ;; If someone uses C-x C-s, don't clobber the rmail file (bug#2625). |
f4571df6b6cc
(rmail-edit-mode): Set write-region-annotate-functions. (Bug#2625)
Glenn Morris <rgm@gnu.org>
parents:
102407
diff
changeset
|
72 (add-hook 'write-region-annotate-functions |
f4571df6b6cc
(rmail-edit-mode): Set write-region-annotate-functions. (Bug#2625)
Glenn Morris <rgm@gnu.org>
parents:
102407
diff
changeset
|
73 'rmail-write-region-annotate nil t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
74 (run-mode-hooks 'rmail-edit-mode-hook))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
75 |
101917 | 76 ;; Rmail Edit mode is suitable only for specially formatted data. |
77 (put 'rmail-edit-mode 'mode-class 'special) | |
102388 | 78 |
101917 | 79 |
80 (defvar rmail-old-text) | |
81 (defvar rmail-old-pruned nil | |
82 "Non-nil means the message being edited originally had pruned headers.") | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
83 (put 'rmail-old-pruned 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
84 |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
85 (defvar rmail-old-headers nil |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
86 "Holds the headers of this message before editing started.") |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
87 (put 'rmail-old-headers 'permanent-local t) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
88 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
89 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
90 (defun rmail-edit-current-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
91 "Edit the contents of this message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
92 (interactive) |
101917 | 93 (if (zerop rmail-total-messages) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
94 (error "No messages in this buffer")) |
103239
03dd2dfb499f
* mail/rmailedit.el (rmail-edit-current-message):
Richard M. Stallman <rms@gnu.org>
parents:
102930
diff
changeset
|
95 (rmail-modify-format) |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
96 (make-local-variable 'rmail-old-pruned) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
97 (setq rmail-old-pruned (rmail-msg-is-pruned)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
98 (rmail-edit-mode) |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
99 (make-local-variable 'rmail-old-text) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
100 (setq rmail-old-text |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
101 (save-restriction |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
102 (widen) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
103 (buffer-substring (point-min) (point-max)))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
104 (make-local-variable 'rmail-old-headers) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
105 (setq rmail-old-headers (rmail-edit-headers-alist t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
106 (setq buffer-read-only nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
107 (setq buffer-undo-list nil) |
102479 | 108 ;; Whether the buffer is initially marked as modified or not |
101917 | 109 ;; depends on whether or not the underlying rmail buffer was so marked. |
102479 | 110 ;; Given the way this works, it has to. |
111 ;; If you kill the edit buffer, you've killed your rmail buffer. | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
112 (force-mode-line-update) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
113 (if (and (eq (key-binding "\C-c\C-c") 'rmail-cease-edit) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
114 (eq (key-binding "\C-c\C-]") 'rmail-abort-edit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
115 (message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
116 (message "%s" (substitute-command-keys |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
117 "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
118 |
101917 | 119 |
120 (declare-function rmail-summary-enable "rmailsum" ()) | |
121 | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
122 (defun rmail-cease-edit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
123 "Finish editing message; switch back to Rmail proper." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
124 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
125 (if (rmail-summary-exists) |
101724
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
126 (with-current-buffer rmail-summary-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
127 (rmail-summary-enable))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
128 (widen) |
105602
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
129 (goto-char (point-min)) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
130 ;; This is far from ideal. The edit may have inadvertently |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
131 ;; removed the blank line at the end of the headers, but there |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
132 ;; are almost certainly other blank lines. |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
133 (or (search-forward "\n\n" nil t) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
134 (error "There must be a blank line at the end of the headers")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
135 ;; Disguise any "From " lines so they don't start a new message. |
105602
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
136 (goto-char (point-min)) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
137 (or rmail-old-pruned (forward-line 1)) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
138 (while (re-search-forward "^>*From " nil t) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
139 (beginning-of-line) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
140 (insert ">") |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
141 (forward-line)) |
102407
4c603ec78d71
(rmail-cease-edit): Use rmail-ensure-blank-line.
Glenn Morris <rgm@gnu.org>
parents:
102388
diff
changeset
|
142 ;; Make sure buffer ends with a blank line so as not to run this |
4c603ec78d71
(rmail-cease-edit): Use rmail-ensure-blank-line.
Glenn Morris <rgm@gnu.org>
parents:
102388
diff
changeset
|
143 ;; message together with the following one. |
105602
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
144 (goto-char (point-max)) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
145 (rmail-ensure-blank-line) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
146 (let ((old rmail-old-text) |
101917 | 147 (pruned rmail-old-pruned) |
102165
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
148 ;; People who know what they are doing might have modified the |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
149 ;; buffer's encoding if editing the message included inserting |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
150 ;; characters that were unencodable by the original message's |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
151 ;; encoding. Make note of the new encoding and use it for |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
152 ;; encoding the edited message. |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
153 (edited-coding buffer-file-coding-system) |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
154 new-headers |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
155 character-coding is-text-message coding-system |
101871
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
156 headers-end limit) |
102165
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
157 ;; Make sure `edited-coding' can safely encode the edited message. |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
158 (setq edited-coding |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
159 (select-safe-coding-system (point-min) (point-max) edited-coding)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
160 ;; Go back to Rmail mode, but carefully. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
161 (force-mode-line-update) |
101724
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
162 (let ((rmail-buffer-swapped nil)) ; Prevent change-major-mode-hook |
b87c9a6e8490
(rmail-edit-map): Move init into declaration.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
101633
diff
changeset
|
163 ; from unswapping the buffers. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
164 (kill-all-local-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
165 (rmail-mode-1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
166 (if (boundp 'tool-bar-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
167 (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
|
168 (setq buffer-undo-list t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
169 (rmail-variables)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
170 ;; If text has really changed, mark message as edited. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
171 (unless (and (= (length old) (- (point-max) (point-min))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
172 (string= old (buffer-substring (point-min) (point-max)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
173 (setq old nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
174 (goto-char (point-min)) |
105477
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
175 (search-forward "\n\n") |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
176 (setq headers-end (point-marker)) |
102165
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
177 (goto-char (point-min)) |
105477
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
178 (save-restriction |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
179 (narrow-to-region (point) headers-end) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
180 ;; If they changed the message's encoding, rewrite the charset= |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
181 ;; header for them, so that subsequent rmail-show-message |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
182 ;; decodes it correctly. |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
183 (let* ((buffer-read-only nil) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
184 (new-coding (coding-system-base edited-coding)) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
185 (mime-charset (symbol-name |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
186 (or (coding-system-get new-coding :mime-charset) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
187 (if (coding-system-equal new-coding |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
188 'undecided) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
189 'us-ascii |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
190 new-coding)))) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
191 old-coding mime-beg mime-end content-type) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
192 (if (re-search-forward rmail-mime-charset-pattern nil 'move) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
193 (setq mime-beg (match-beginning 1) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
194 mime-end (match-end 1) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
195 old-coding (coding-system-from-name (match-string 1))) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
196 (setq content-type (mail-fetch-field "Content-Type"))) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
197 (cond |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
198 ;; No match for rmail-mime-charset-pattern, but there was some |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
199 ;; other Content-Type. We should not insert another. (Bug#4624) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
200 (content-type) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
201 ((null old-coding) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
202 ;; If there was no charset= spec, insert one. |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
203 (backward-char 1) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
204 (insert "Content-type: text/plain; charset=" mime-charset "\n")) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
205 ((not (coding-system-equal (coding-system-base old-coding) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
206 new-coding)) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
207 (goto-char mime-end) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
208 (delete-region mime-beg mime-end) |
b9bdbb16b3fa
(rmail-cease-edit): If there is a Content-Type header we don't
Glenn Morris <rgm@gnu.org>
parents:
104907
diff
changeset
|
209 (insert mime-charset))))) |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
210 (setq new-headers (rmail-edit-headers-alist t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
211 (rmail-swap-buffers-maybe) |
101867
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
212 (narrow-to-region (rmail-msgbeg rmail-current-message) |
101871
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
213 (rmail-msgend rmail-current-message)) |
105602
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
214 (goto-char (point-min)) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
215 (setq limit (search-forward "\n\n")) |
101871
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
216 (save-restriction |
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
217 ;; All 3 of the functions we call below assume the buffer was |
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
218 ;; narrowed to just the headers of the message. |
105602
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
219 (narrow-to-region (point-min) limit) |
101871
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
220 (setq character-coding |
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
221 (mail-fetch-field "content-transfer-encoding") |
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
222 is-text-message (rmail-is-text-p) |
102165
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
223 coding-system (if (and edited-coding |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
224 (not (coding-system-equal |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
225 (coding-system-base edited-coding) |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
226 'undecided))) |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
227 edited-coding |
f93f5035af02
(rmail-cease-edit): Notice changes in buffer's encoding during editing.
Eli Zaretskii <eliz@gnu.org>
parents:
102046
diff
changeset
|
228 (rmail-get-coding-system)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
229 (if character-coding |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
230 (setq character-coding (downcase character-coding))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
231 |
101871
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
232 (goto-char limit) |
101867
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
233 (let ((inhibit-read-only t)) |
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
234 (let ((data-buffer (current-buffer)) |
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
235 (end (copy-marker (point) t))) |
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
236 (with-current-buffer rmail-view-buffer |
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
237 (encode-coding-region headers-end (point-max) coding-system |
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
238 data-buffer)) |
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
239 (delete-region end (point-max))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
240 |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
241 ;; Apply to the mbox buffer any changes in header fields |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
242 ;; that the user made while editing in the view buffer. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
243 (rmail-edit-update-headers (rmail-edit-diff-headers |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
244 rmail-old-headers new-headers)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
245 |
101917 | 246 ;; Re-apply content-transfer-encoding, if any, on the message body. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
247 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
248 ((string= character-coding "quoted-printable") |
101867
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
249 (mail-quote-printable-region (point) (point-max))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
250 ((and (string= character-coding "base64") is-text-message) |
101867
07f6502ced98
(rmail-cease-edit): narrow-to-region before extracting mail message headers.
Eli Zaretskii <eliz@gnu.org>
parents:
101724
diff
changeset
|
251 (base64-encode-region (point) (point-max))) |
101871
cf870c811594
(rmail-cease-edit): Look for the message's encoding, and its
Eli Zaretskii <eliz@gnu.org>
parents:
101867
diff
changeset
|
252 ((and (eq character-coding 'uuencode) is-text-message) |
101917 | 253 (error "uuencoded messages are not supported")))) |
254 (rmail-set-attribute rmail-edited-attr-index t)) | |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
255 ;;??? BROKEN perhaps. |
101917 | 256 ;;; (if (boundp 'rmail-summary-vector) |
257 ;;; (aset rmail-summary-vector (1- rmail-current-message) nil)) | |
105602
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
258 (rmail-show-message) |
6e207d2a8bc6
(rmail-cease-edit): Give an error if the end of the headers cannot be
Glenn Morris <rgm@gnu.org>
parents:
105477
diff
changeset
|
259 (rmail-toggle-header (if pruned 1 0))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
260 (run-hooks 'rmail-mode-hook)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
261 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
262 (defun rmail-abort-edit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
263 "Abort edit of current message; restore original contents." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
264 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
265 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
266 (delete-region (point-min) (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
267 (insert rmail-old-text) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
268 (rmail-cease-edit) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
269 (rmail-highlight-headers)) |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
270 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
271 (defun rmail-edit-headers-alist (&optional widen markers) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
272 "Return an alist of the headers of the message in the current buffer. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
273 Each element has the form (HEADER-NAME . ENTIRE-STRING). |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
274 ENTIRE-STRING includes the name of the header field (which is HEADER-NAME) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
275 and has a final newline. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
276 If part of the text is not valid as a header field, HEADER-NAME |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
277 is an integer and we use consecutive integers. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
278 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
279 If WIDEN is non-nil, operate on the entire buffer. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
280 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
281 If MARKERS is non-nil, the value looks like |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
282 \(HEADER-NAME ENTIRE-STRING BEG-MARKER END-MARKER)." |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
283 (let (header-alist (no-good-header-count 1)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
284 (save-excursion |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
285 (save-restriction |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
286 (if widen (widen)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
287 (goto-char (point-min)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
288 (search-forward "\n\n") |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
289 (narrow-to-region (point-min) (1- (point))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
290 (goto-char (point-min)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
291 (while (not (eobp)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
292 (let ((start (point)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
293 name header) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
294 ;; Match the name. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
295 (if (looking-at "[ \t]*\\([^:\n \t]\\(\\|[^:\n]*[^:\n \t]\\)\\)[ \t]*:") |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
296 (setq name (match-string-no-properties 1)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
297 (setq name no-good-header-count |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
298 no-good-header-count (1+ no-good-header-count))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
299 (forward-line 1) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
300 (while (looking-at "[ \t]") |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
301 (forward-line 1)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
302 (setq header (buffer-substring-no-properties start (point))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
303 (if markers |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
304 (push (list header (copy-marker start) (point-marker)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
305 header-alist) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
306 (push (cons name header) header-alist)))))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
307 (nreverse header-alist))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
308 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
309 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
310 (defun rmail-edit-diff-headers (old-headers new-headers) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
311 "Compare OLD-HEADERS and NEW-HEADERS and return field differences. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
312 The value is a list of three lists, (INSERTED DELETED CHANGED). |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
313 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
314 INSERTED's elements describe inserted header fields |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
315 and each looks like (AFTER-WHAT INSERT-WHAT) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
316 INSERT-WHAT is the header field to insert (a member of NEW-HEADERS). |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
317 AFTER-WHAT is the field to insert it after (a member of NEW-HEADERS) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
318 or else nil to insert it at the beginning. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
319 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
320 DELETED's elements are elements of OLD-HEADERS. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
321 CHANGED's elements have the form (OLD . NEW) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
322 where OLD is a element of OLD-HEADERS and NEW is an element of NEW-HEADERS." |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
323 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
324 (let ((reverse-new (reverse new-headers)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
325 inserted deleted changed) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
326 (dolist (old old-headers) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
327 (let ((new (assoc (car old) new-headers))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
328 ;; If it's in OLD-HEADERS and has no new counterpart, |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
329 ;; it is a deletion. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
330 (if (null new) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
331 (push old deleted) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
332 ;; If it has a new counterpart, maybe it was changed. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
333 (unless (equal (cdr old) (cdr new)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
334 (push (cons old new) changed)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
335 ;; Remove the new counterpart, since it has been spoken for. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
336 (setq new-headers (remq new new-headers))))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
337 ;; Look at the new headers with no old counterpart. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
338 (dolist (new new-headers) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
339 (let ((prev (cadr (member new reverse-new)))) |
102046
9b33e73e70e3
(rmail-edit-diff-headers): Delete spurious reference to OLD.
Richard M. Stallman <rms@gnu.org>
parents:
102023
diff
changeset
|
340 ;; Mark each one as an insertion. |
9b33e73e70e3
(rmail-edit-diff-headers): Delete spurious reference to OLD.
Richard M. Stallman <rms@gnu.org>
parents:
102023
diff
changeset
|
341 ;; Record the previous new header, to insert it after that. |
9b33e73e70e3
(rmail-edit-diff-headers): Delete spurious reference to OLD.
Richard M. Stallman <rms@gnu.org>
parents:
102023
diff
changeset
|
342 (push (list prev new) inserted))) |
102023
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
343 ;; It is crucial to return the insertions in buffer order |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
344 ;; so that `rmail-edit-update-headers' can insert a field |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
345 ;; after a new field. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
346 (list (nreverse inserted) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
347 (nreverse deleted) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
348 (nreverse changed)))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
349 |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
350 (defun rmail-edit-update-headers (header-diff) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
351 "Edit the mail headers in the buffer based on HEADER-DIFF. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
352 HEADER-DIFF should be a return value from `rmail-edit-diff-headers'." |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
353 (let ((buf-headers (rmail-edit-headers-alist nil t))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
354 ;; Change all the fields scheduled for being changed. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
355 (dolist (chg (nth 2 header-diff)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
356 (let* ((match (assoc (cdar chg) buf-headers)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
357 (end (marker-position (nth 2 match)))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
358 (goto-char end) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
359 ;; Insert the new, then delete the old. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
360 ;; That avoids collapsing markers. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
361 (insert-before-markers (cddr chg)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
362 (delete-region (nth 1 match) end) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
363 ;; Remove the old field from BUF-HEADERS. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
364 (setq buf-headers (delq match buf-headers)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
365 ;; Update BUF-HEADERS to show the changed field. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
366 (push (list (cddr chg) (point-marker) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
367 (copy-marker (- (point) (length (cddr chg)))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
368 (point-marker)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
369 buf-headers))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
370 ;; Delete all the fields scheduled for deletion. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
371 ;; We do deletion after changes |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
372 ;; because when two fields look alike and get replaced by one, |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
373 ;; the first of them is considered changed |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
374 ;; and the second is considered deleted. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
375 (dolist (del (nth 1 header-diff)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
376 (let ((match (assoc (cdr del) buf-headers))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
377 (delete-region (nth 1 match) (nth 2 match)))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
378 ;; Insert all the fields scheduled for insertion. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
379 (dolist (ins (nth 0 header-diff)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
380 (let* ((new (cadr ins)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
381 (after (car ins)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
382 (match (assoc (cdr after) buf-headers))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
383 (goto-char (if match (nth 2 match) (point-min))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
384 (insert (cdr new)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
385 ;; Update BUF-HEADERS to show the inserted field. |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
386 (push (list (cdr new) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
387 (copy-marker (- (point) (length (cdr new)))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
388 (point-marker)) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
389 buf-headers))) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
390 ;; Disconnect the markers |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
391 (dolist (hdr buf-headers) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
392 (set-marker (nth 1 hdr) nil) |
a92cde59fabc
Handle editing of header fields.
Richard M. Stallman <rms@gnu.org>
parents:
101917
diff
changeset
|
393 (set-marker (nth 2 hdr) nil)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
394 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
395 (provide 'rmailedit) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
396 |
104907
6a35503cf20b
Put autoloads in rmail.el rather than loaddefs.el.
Glenn Morris <rgm@gnu.org>
parents:
104016
diff
changeset
|
397 ;; Local Variables: |
6a35503cf20b
Put autoloads in rmail.el rather than loaddefs.el.
Glenn Morris <rgm@gnu.org>
parents:
104016
diff
changeset
|
398 ;; generated-autoload-file: "rmail.el" |
6a35503cf20b
Put autoloads in rmail.el rather than loaddefs.el.
Glenn Morris <rgm@gnu.org>
parents:
104016
diff
changeset
|
399 ;; End: |
6a35503cf20b
Put autoloads in rmail.el rather than loaddefs.el.
Glenn Morris <rgm@gnu.org>
parents:
104016
diff
changeset
|
400 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
401 ;; arch-tag: 9524f335-12cc-4e95-9e9b-3208dc30550b |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
402 ;;; rmailedit.el ends here |