1 ;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
3 ;; Copyright (C) 1985, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
8 ;; This file is part of GNU Emacs.
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
12 ;; the Free Software Foundation; either version 2, or (at your option)
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.
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 the
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA.
29 (defvar rmail-current-message
)
30 (defvar rmail-inbox-list
)
33 (defun set-rmail-inbox-list (file-name)
34 "Set the inbox list of the current RMAIL file to FILE-NAME.
35 You can specify one file name, or several names separated by commas.
36 If FILE-NAME is empty, remove any existing inbox list."
37 (interactive "sSet mailbox list to (comma-separated list of filenames): ")
39 (unless (eq major-mode
'rmail-mode
)
40 (error "set-rmail-inbox-list works only for an Rmail file"))
43 (let ((names (rmail-parse-file-inboxes))
44 (standard-output nil
))
46 (y-or-n-p (concat "Replace "
47 (mapconcat 'identity names
", ")
49 (let ((buffer-read-only nil
))
51 (goto-char (point-min))
52 (search-forward "\n\^_")
53 (re-search-backward "^Mail" nil t
)
55 (if (looking-at "Mail:")
56 (delete-region (point)
57 (progn (forward-line 1)
59 (if (not (string= file-name
""))
60 (insert-before-markers "Mail: " file-name
"\n"))))))
61 (setq rmail-inbox-list
(rmail-parse-file-inboxes))
62 (rmail-show-message rmail-current-message
))
64 ;;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4
65 ;;; rmailmsc.el ends here