annotate lisp/mail/rmailmsc.el @ 826:e9b9a1cff2c9

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