Mercurial > emacs
annotate lisp/mail/rmailmsc.el @ 71503:fa67beba36e1
(USE_MAC_TSM) [TARGET_API_MAC_CARBON]: Set default to 1.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Wed, 28 Jun 2006 08:30:32 +0000 |
parents | 067115a6e738 |
children | f7702c5f335d c5406394f567 |
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 |
68648
067115a6e738
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65207
diff
changeset
|
3 ;; Copyright (C) 1985, 2002, 2003, 2004, 2005, |
067115a6e738
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65207
diff
changeset
|
4 ;; 2006 Free Software Foundation, Inc. |
845 | 5 |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
6 ;; Maintainer: FSF |
814
38b2499cb3e9
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
807
diff
changeset
|
7 ;; Keywords: mail |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
8 |
35 | 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 | |
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 | 14 ;; 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 | |
14169 | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
35 | 25 |
38412
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
22955
diff
changeset
|
26 ;;; Commentary: |
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
22955
diff
changeset
|
27 |
2233
fb0ed5a1d0f3
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
845
diff
changeset
|
28 ;;; Code: |
35 | 29 |
65207
0275d55d477d
(rmail-current-message, rmail-inbox-list): Add defvars.
Juanma Barranquero <lekktu@gmail.com>
parents:
64754
diff
changeset
|
30 (defvar rmail-current-message) |
0275d55d477d
(rmail-current-message, rmail-inbox-list): Add defvars.
Juanma Barranquero <lekktu@gmail.com>
parents:
64754
diff
changeset
|
31 (defvar rmail-inbox-list) |
0275d55d477d
(rmail-current-message, rmail-inbox-list): Add defvars.
Juanma Barranquero <lekktu@gmail.com>
parents:
64754
diff
changeset
|
32 |
16346
09fccbb1dcf1
(set-rmail-inbox-list): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
33 ;;;###autoload |
35 | 34 (defun set-rmail-inbox-list (file-name) |
35 "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
|
36 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
|
37 If FILE-NAME is empty, remove any existing inbox list." |
35 | 38 (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
|
39 |
e3aa855e560c
(set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents:
16346
diff
changeset
|
40 (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
|
41 (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
|
42 |
35 | 43 (save-excursion |
44 (let ((names (rmail-parse-file-inboxes)) | |
45 (standard-output nil)) | |
46 (if (or (not names) | |
47 (y-or-n-p (concat "Replace " | |
48 (mapconcat 'identity names ", ") | |
49 "? "))) | |
50 (let ((buffer-read-only nil)) | |
51 (widen) | |
52 (goto-char (point-min)) | |
53 (search-forward "\n\^_") | |
54 (re-search-backward "^Mail" nil t) | |
55 (forward-line 0) | |
56 (if (looking-at "Mail:") | |
57 (delete-region (point) | |
58 (progn (forward-line 1) | |
59 (point)))) | |
60 (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
|
61 (insert-before-markers "Mail: " file-name "\n")))))) |
35 | 62 (setq rmail-inbox-list (rmail-parse-file-inboxes)) |
63 (rmail-show-message rmail-current-message)) | |
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
64 |
52401 | 65 ;;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4 |
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
66 ;;; rmailmsc.el ends here |