annotate lisp/rmail/rmailmsc.el @ 7:c153ca296910

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