(mail-unsent-separator): Handle "Message text follows".
[bpt/emacs.git] / lisp / mail / rmailmsc.el
CommitLineData
c88ab9ce
ER
1;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
2
9750e079
ER
3;; Copyright (C) 1985 Free Software Foundation, Inc.
4
e5167999 5;; Maintainer: FSF
d7b4d18f 6;; Keywords: mail
e5167999 7
0d20f9a0
JB
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
e5167999 12;; the Free Software Foundation; either version 2, or (at your option)
0d20f9a0
JB
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to
22;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23
24
25(defun set-rmail-inbox-list (file-name)
26 "Set the inbox list of the current RMAIL file to FILE-NAME.
27This may be a list of file names separated by commas.
28If FILE-NAME is empty, remove any inbox list."
29 (interactive "sSet mailbox list to (comma-separated list of filenames): ")
30 (save-excursion
31 (let ((names (rmail-parse-file-inboxes))
32 (standard-output nil))
33 (if (or (not names)
34 (y-or-n-p (concat "Replace "
35 (mapconcat 'identity names ", ")
36 "? ")))
37 (let ((buffer-read-only nil))
38 (widen)
39 (goto-char (point-min))
40 (search-forward "\n\^_")
41 (re-search-backward "^Mail" nil t)
42 (forward-line 0)
43 (if (looking-at "Mail:")
44 (delete-region (point)
45 (progn (forward-line 1)
46 (point))))
47 (if (not (string= file-name ""))
48 (insert "Mail: " file-name "\n"))))))
49 (setq rmail-inbox-list (rmail-parse-file-inboxes))
50 (rmail-show-message rmail-current-message))
c88ab9ce
ER
51
52;;; rmailmsc.el ends here