Mercurial > hg > xemacs-beta
comparison lisp/rmail/rmailmsc.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
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 | |
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
23 | |
24 ;;; Code: | |
25 | |
26 (defun set-rmail-inbox-list (file-name) | |
27 "Set the inbox list of the current RMAIL file to FILE-NAME. | |
28 This may be a list of file names separated by commas. | |
29 If FILE-NAME is empty, remove any inbox list." | |
30 (interactive "sSet mailbox list to (comma-separated list of filenames): ") | |
31 (save-excursion | |
32 (let ((names (rmail-parse-file-inboxes)) | |
33 (standard-output nil)) | |
34 (if (or (not names) | |
35 (y-or-n-p (concat "Replace " | |
36 (mapconcat 'identity names ", ") | |
37 "? "))) | |
38 (let ((buffer-read-only nil)) | |
39 (widen) | |
40 (goto-char (point-min)) | |
41 (search-forward "\n\^_") | |
42 (re-search-backward "^Mail" nil t) | |
43 (forward-line 0) | |
44 (if (looking-at "Mail:") | |
45 (delete-region (point) | |
46 (progn (forward-line 1) | |
47 (point)))) | |
48 (if (not (string= file-name "")) | |
49 (insert "Mail: " file-name "\n")))))) | |
50 (setq rmail-inbox-list (rmail-parse-file-inboxes)) | |
51 (rmail-show-message rmail-current-message)) | |
52 | |
53 ;;; rmailmsc.el ends here |