Mercurial > emacs
annotate lisp/mail/rmailmsc.el @ 37678:ebec0594dece
(compile-files): Redirect output of chmod to
/dev/null.
| author | Gerd Moellmann <gerd@gnu.org> |
|---|---|
| date | Fri, 11 May 2001 10:53:56 +0000 |
| parents | e3aa855e560c |
| children | 253f761ad37b |
| 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 |
| 845 | 3 ;; Copyright (C) 1985 Free Software Foundation, Inc. |
| 4 | |
|
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
5 ;; Maintainer: FSF |
|
814
38b2499cb3e9
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
807
diff
changeset
|
6 ;; Keywords: mail |
|
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
7 |
| 35 | 8 ;; This file is part of GNU Emacs. |
| 9 | |
| 10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
| 11 ;; 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
|
12 ;; the Free Software Foundation; either version 2, or (at your option) |
| 35 | 13 ;; any later version. |
| 14 | |
| 15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
| 16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 ;; GNU General Public License for more details. | |
| 19 | |
| 20 ;; You should have received a copy of the GNU General Public License | |
| 14169 | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
| 22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 23 ;; Boston, MA 02111-1307, USA. | |
| 35 | 24 |
|
2233
fb0ed5a1d0f3
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
845
diff
changeset
|
25 ;;; Code: |
| 35 | 26 |
|
16346
09fccbb1dcf1
(set-rmail-inbox-list): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
27 ;;;###autoload |
| 35 | 28 (defun set-rmail-inbox-list (file-name) |
| 29 "Set the inbox list of the current RMAIL file to FILE-NAME. | |
|
8715
b4cfdc266626
(set-rmail-inbox-list): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
7954
diff
changeset
|
30 You can specify one file name, or several names separated by commas. |
|
b4cfdc266626
(set-rmail-inbox-list): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
7954
diff
changeset
|
31 If FILE-NAME is empty, remove any existing inbox list." |
| 35 | 32 (interactive "sSet mailbox list to (comma-separated list of filenames): ") |
|
22955
e3aa855e560c
(set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents:
16346
diff
changeset
|
33 |
|
e3aa855e560c
(set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents:
16346
diff
changeset
|
34 (unless (eq major-mode 'rmail-mode) |
|
e3aa855e560c
(set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents:
16346
diff
changeset
|
35 (error "set-rmail-inbox-list works only for an Rmail file")) |
|
e3aa855e560c
(set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents:
16346
diff
changeset
|
36 |
| 35 | 37 (save-excursion |
| 38 (let ((names (rmail-parse-file-inboxes)) | |
| 39 (standard-output nil)) | |
| 40 (if (or (not names) | |
| 41 (y-or-n-p (concat "Replace " | |
| 42 (mapconcat 'identity names ", ") | |
| 43 "? "))) | |
| 44 (let ((buffer-read-only nil)) | |
| 45 (widen) | |
| 46 (goto-char (point-min)) | |
| 47 (search-forward "\n\^_") | |
| 48 (re-search-backward "^Mail" nil t) | |
| 49 (forward-line 0) | |
| 50 (if (looking-at "Mail:") | |
| 51 (delete-region (point) | |
| 52 (progn (forward-line 1) | |
| 53 (point)))) | |
| 54 (if (not (string= file-name "")) | |
|
7954
621c28be27a0
(set-rmail-inbox-list): Use insert-before-markers.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
55 (insert-before-markers "Mail: " file-name "\n")))))) |
| 35 | 56 (setq rmail-inbox-list (rmail-parse-file-inboxes)) |
| 57 (rmail-show-message rmail-current-message)) | |
|
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
58 |
|
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
59 ;;; rmailmsc.el ends here |
