Mercurial > emacs
annotate lisp/mail/rmailmsc.el @ 88259:e7a1851e3fcc
(rmail-message-senders-p): Fix Typo.
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Sat, 21 Jan 2006 15:28:23 +0000 |
parents | a98285deef68 |
children |
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 |
88155 | 3 ;; Copyright (C) 1985, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
845 | 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 |
88155 | 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; Boston, MA 02110-1301, USA. | |
35 | 24 |
38412
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
22955
diff
changeset
|
25 ;;; Commentary: |
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
22955
diff
changeset
|
26 |
2233
fb0ed5a1d0f3
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
845
diff
changeset
|
27 ;;; Code: |
35 | 28 |
88129
89e63d46028b
Attempt to minimize byte compilation warnings.
Paul Reilly <pmr@pajato.com>
parents:
38412
diff
changeset
|
29 (eval-when-compile |
89e63d46028b
Attempt to minimize byte compilation warnings.
Paul Reilly <pmr@pajato.com>
parents:
38412
diff
changeset
|
30 (require 'rmail)) |
89e63d46028b
Attempt to minimize byte compilation warnings.
Paul Reilly <pmr@pajato.com>
parents:
38412
diff
changeset
|
31 |
88155 | 32 (defvar rmail-current-message) |
33 (defvar rmail-inbox-list) | |
34 | |
16346
09fccbb1dcf1
(set-rmail-inbox-list): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
35 ;;;###autoload |
35 | 36 (defun set-rmail-inbox-list (file-name) |
37 "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
|
38 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
|
39 If FILE-NAME is empty, remove any existing inbox list." |
35 | 40 (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
|
41 (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
|
42 (error "set-rmail-inbox-list works only for an Rmail file")) |
88237
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
43 (let ((inbox-list |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
44 (with-temp-buffer |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
45 (insert file-name) |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
46 (goto-char (point-min)) |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
47 (nreverse (mail-parse-comma-list))))) |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
48 (when (or (not rmail-inbox-list) |
35 | 49 (y-or-n-p (concat "Replace " |
88237
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
50 (mapconcat 'identity |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
51 rmail-inbox-list |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
52 ", ") |
35 | 53 "? "))) |
88237
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
54 (message "Setting the inbox list for %s for this session" |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
55 (file-name-nondirectory (buffer-file-name))) |
a98285deef68
(set-rmail-inbox-list): Rewrite to only set inbox
Henrik Enberg <henrik.enberg@telia.com>
parents:
88155
diff
changeset
|
56 (setq rmail-inbox-list inbox-list))) |
35 | 57 (rmail-show-message rmail-current-message)) |
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
58 |
88155 | 59 ;;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4 |
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
60 ;;; rmailmsc.el ends here |