comparison lisp/mail/pmailmsc.el @ 97528:184bb2071e3f

mail/: Add new (temporary) libaries for which to test Rmail/mbox such that Rmail/babyl is not affected. This creates a facility/feature called "pmail" (analagous to "rmail") that can be used independently from Rmail for testing purposes. The plan is to replace the "rmail" files eventually and remove "pmail" entirely at that point. In the interim, interested developers can use either Rmail or Pmail or both (which is not recommended for the casual User or the faint of heart).
author Paul Reilly <pmr@pajato.com>
date Mon, 18 Aug 2008 04:51:28 +0000
parents
children e54462e6c673
comparison
equal deleted inserted replaced
97527:059ec03cfe4e 97528:184bb2071e3f
1 ;;; pmailmsc.el --- miscellaneous support functions for the PMAIL mail reader
2
3 ;; Copyright (C) 1985, 2002, 2003, 2004, 2005,
4 ;; 2006, 2007, 2008 Free Software Foundation, Inc.
5
6 ;; Maintainer: FSF
7 ;; Keywords: mail
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
24 ;;; Commentary:
25
26 ;;; Code:
27
28 (eval-when-compile
29 (require 'pmail))
30
31 (defvar pmail-current-message)
32 (defvar pmail-inbox-list)
33
34 (declare-function pmail-parse-file-inboxes "pmail" ())
35 (declare-function pmail-show-message "pmail" (&optional n no-summary))
36
37 ;;;###autoload
38 (defun set-pmail-inbox-list (file-name)
39 "Set the inbox list of the current PMAIL file to FILE-NAME.
40 You can specify one file name, or several names separated by commas.
41 If FILE-NAME is empty, remove any existing inbox list."
42 (interactive "sSet mailbox list to (comma-separated list of filenames): ")
43 (unless (eq major-mode 'pmail-mode)
44 (error "set-pmail-inbox-list works only for an Pmail file"))
45 (let ((inbox-list
46 (with-temp-buffer
47 (insert file-name)
48 (goto-char (point-min))
49 (nreverse (mail-parse-comma-list)))))
50 (when (or (not pmail-inbox-list)
51 (y-or-n-p (concat "Replace "
52 (mapconcat 'identity
53 pmail-inbox-list
54 ", ")
55 "? ")))
56 (message "Setting the inbox list for %s for this session"
57 (file-name-nondirectory (buffer-file-name)))
58 (setq pmail-inbox-list inbox-list)))
59 (pmail-show-message pmail-current-message))
60
61 ;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4
62 ;;; pmailmsc.el ends here