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