Add "Package:" file headers to denote built-in packages.
[emacs.git] / lisp / mail / rmailmsc.el
blobbbb8233d89c8113b39fb7157bab6e2d5b59427be
1 ;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
3 ;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 ;; 2009, 2010 Free Software Foundation, Inc.
6 ;; Maintainer: FSF
7 ;; Keywords: mail
8 ;; Package: rmail
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;;; Commentary:
27 ;;; Code:
29 (require 'rmail)
31 ;;;###autoload
32 (defun set-rmail-inbox-list (file-name)
33 "Set the inbox list of the current RMAIL file to FILE-NAME.
34 You can specify one file name, or several names separated by commas.
35 If FILE-NAME is empty, remove any existing inbox list.
37 This applies only to the current session."
38 (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"))
41 (let ((inbox-list
42 (with-temp-buffer
43 (insert file-name)
44 (goto-char (point-min))
45 ;; split-string does not remove leading/trailing whitespace.
46 (nreverse (mail-parse-comma-list)))))
47 (when (or (not rmail-inbox-list)
48 (y-or-n-p (concat "Replace "
49 (mapconcat 'identity
50 rmail-inbox-list
51 ", ")
52 "? ")))
53 (message "Setting the inbox list for %s for this session"
54 (file-name-nondirectory (buffer-file-name)))
55 (setq rmail-inbox-list inbox-list)))
56 (rmail-show-message-1 rmail-current-message))
58 ;; Local Variables:
59 ;; generated-autoload-file: "rmail.el"
60 ;; End:
62 ;; arch-tag: 94614a62-2a0a-4e25-bac9-06f461ed4c60
63 ;;; rmailmsc.el ends here