annotate lisp/mail/mh-e.el @ 48494:f07e2528571d

(morse-code): Add non-ASCII characters, according to table at http://www.soton.ac.uk/~scp93ch/morse/.
author Simon Josefsson <jas@extundo.com>
date Thu, 21 Nov 2002 18:08:33 +0000
parents 2568d5a27317
children 8aaba207e44b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; mh-e.el --- GNU Emacs interface to the MH mail system
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
3 ;; Copyright (C) 1985,86,87,88,90,92,93,94,95,97,2000,2001,2002 Free Software Foundation, Inc.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
5 ;; Author: Bill Wohler <wohler@newt.com>
33145
e2d1dc22d119 Change maintainer.
Gerd Moellmann <gerd@gnu.org>
parents: 30882
diff changeset
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
7 ;; Version: 6.1.1
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;; Keywords: mail
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 33145
diff changeset
10 ;; This file is part of GNU Emacs.
11333
53174cfc29fa Comment fixes.
Karl Heuer <kwzh@gnu.org>
parents: 11332
diff changeset
11
53174cfc29fa Comment fixes.
Karl Heuer <kwzh@gnu.org>
parents: 11332
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 ;; any later version.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16
11333
53174cfc29fa Comment fixes.
Karl Heuer <kwzh@gnu.org>
parents: 11332
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
25 ;; Boston, MA 02111-1307, USA.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
29 ;; How to Use:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
30 ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
31 ;; C-u M-x mh-rmail to visit any folder.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
32 ;; M-x mh-smail to send mail. From within the mail reader, "m" works, too.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
34 ;; Your .emacs might benefit from these bindings:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
35 ;; (global-set-key "\C-cr" 'mh-rmail)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
36 ;; (global-set-key "\C-xm" 'mh-smail)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
37 ;; (global-set-key "\C-x4m" 'mh-smail-other-window)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
38
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
39 ;; MH (Message Handler) is a powerful mail reader.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
40
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
41 ;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
42 ;; (send to mh-users-request to be added). See the monthly Frequently Asked
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
43 ;; Questions posting there for information on getting MH and mh-e:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
44 ;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
46 ;; N.B. MH must have been compiled with the MHE compiler flag or several
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
47 ;; features necessary for mh-e will be missing from MH commands, specifically
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
48 ;; the -build switch to repl and forw.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
50 ;; mh-e is an Emacs interface to the MH mail system.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
51
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
52 ;; mh-e is supported in GNU Emacs 20 and 21, with MH 6.8.4 and nmh 1.0.4.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
53
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
54 ;; Mailing Lists:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
55 ;; mh-e-users@lists.sourceforge.net
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
56 ;; mh-e-announce@lists.sourceforge.net
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
57 ;; mh-e-devel@lists.sourceforge.net
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
58 ;;
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
59 ;; Subscribe by sending a "subscribe" message to
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
60 ;; <list>-request@lists.sourceforge.net, or by using the web interface at
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
61 ;; https://sourceforge.net/mail/?group_id=13357
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
62
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
63 ;; Bug Reports:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
64 ;; https://sourceforge.net/tracker/?group_id=13357&atid=113357
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
65 ;; Include the output of M-x mh-version in any bug report.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
66
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
67 ;; Feature Requests:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
68 ;; https://sourceforge.net/tracker/?atid=363357&group_id=13357&func=browse
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
69
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
70 ;; Support:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
71 ;; https://sourceforge.net/tracker/?group_id=13357&atid=213357
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
72
14231
069791dced1e Fix Change Log comment line.
Erik Naggum <erik@naggum.no>
parents: 14169
diff changeset
73 ;;; Change Log:
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
75 ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982.
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
76 ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985.
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13996
diff changeset
77 ;; Rewritten for GNU Emacs, James Larus 1985. larus@ginger.berkeley.edu
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
78 ;; Modified by Stephen Gildea 1988. gildea@lcs.mit.edu
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
79 ;; Maintenance picked up by Bill Wohler <wohler@newt.com> and the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
80 ;; SourceForge Crew <http://mh-e.sourceforge.net/>. 2001.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
81
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
82 ;; $Id: mh-e.el,v 1.99.1.1 2002/10/01 19:41:43 wohler Exp $
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 ;;; Code:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 (provide 'mh-e)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 (require 'mh-utils)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
88 (require 'gnus-util)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
89 (require 'easymenu)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
90 (if (save-match-data (string-match "XEmacs\\|Lucid" emacs-version))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
91 (require 'mh-xemacs-compat))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
92 (eval-when-compile (require 'cl))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
93
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
94 (defconst mh-version "6.1.1" "Version number of mh-e.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
95
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
96 ;;; Initial Autoloads
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
97
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
98 (autoload 'Info-goto-node "info")
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 ;;; Hooks:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
103 (defgroup mh nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
104 "Emacs interface to the MH mail system."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
105 :group 'mail)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
107 (defgroup mh-hook nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
108 "Hooks to mh-e mode."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
109 :prefix "mh-"
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
110 :group 'mh)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
111
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
112 (defcustom mh-folder-mode-hook nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
113 "Invoked in MH-Folder mode on a new folder."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
114 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
115 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
117 (defcustom mh-inc-folder-hook nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
118 "Invoked by \\<mh-folder-mode-map>`\\[mh-inc-folder]' after incorporating mail into a folder."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
119 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
120 :group 'mh-hook)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
121
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
122 (defcustom mh-folder-updated-hook nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
123 "Invoked when the folder actions (such as moves and deletes) are performed.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
124 Variables that are useful in this hook include `mh-delete-list' and
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
125 `mh-refile-list' which can be used to see which changes are being made to
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
126 current folder, `mh-current-folder'."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
127 :type 'hook
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
128 :group 'mh-hook)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
129
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
130 (defcustom mh-show-hook nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
131 "Invoked after \\<mh-folder-mode-map>`\\[mh-show]' shows a message."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
132 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
133 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
135 (defcustom mh-show-mode-hook nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
136 "Invoked in MH-Show mode on each message."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
137 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
138 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
140 (defcustom mh-delete-msg-hook nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
141 "Invoked after marking each message for deletion."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
142 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
143 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
145 (defcustom mh-refile-msg-hook nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
146 "Invoked after marking each message for refiling."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
147 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
148 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
150 (defcustom mh-before-quit-hook nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
151 "Invoked by \\<mh-folder-mode-map>`\\[mh-quit]' before quitting mh-e.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
152 See also `mh-quit-hook'."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
153 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
154 :group 'mh-hook)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
155
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
156 (defcustom mh-quit-hook nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
157 "Invoked after \\<mh-folder-mode-map>`\\[mh-quit]' quits mh-e.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
158 See also `mh-before-quit-hook'."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
159 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
160 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
162 (defcustom mh-unseen-updated-hook nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
163 "Invoked after the unseen sequence has been updated.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
164 The variable `mh-seen-list' can be used to obtain the list of messages which
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
165 will be removed from the unseen sequence."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
166 :type 'hook
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
167 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 ;;; Personal preferences:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
171 (defcustom mh-lpr-command-format "lpr -J '%s'"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 "*Format for Unix command that prints a message.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 The string should be a Unix command line, with the string '%s' where
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 the job's name (folder and message number) should appear. The formatted
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
175 message text is piped to this command when you type \\<mh-folder-mode-map>`\\[mh-print-msg]'."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
176 :type 'string
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
177 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
179 (defcustom mh-scan-prog "scan"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 "*Program to run to generate one-line-per-message listing of a folder.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 Normally \"scan\" or a file name linked to scan. This file is searched
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
182 for relative to the mh-progs directory unless it is an absolute pathname."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
183 :type 'string
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
184 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 (make-variable-buffer-local 'mh-scan-prog)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
187 (defcustom mh-inc-prog "inc"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188 "*Program to run to incorporate new mail into a folder.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 Normally \"inc\". This file is searched for relative to
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
190 the mh-progs directory unless it is an absolute pathname."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
191 :type 'string
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
192 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
194 (defcustom mh-print-background nil
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 "*Print messages in the background if non-nil.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 WARNING: do not delete the messages until printing is finished;
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
197 otherwise, your output may be truncated."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
198 :type 'boolean
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
199 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
201 (defcustom mh-recenter-summary-p nil
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
202 "*Recenter summary window when the show window is toggled off if non-nil."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
203 :type 'boolean
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
204 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
206 (defcustom mh-do-not-confirm nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
207 "*Non-nil means do not prompt for confirmation.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
208 Commands such as `mh-pack-folder' prompt to confirm whether to process
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
209 outstanding moves and deletes or not before continuing. A non-nil setting will
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
210 perform the action--which is usually desired but cannot be retracted--without
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
211 question."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
212 :type 'boolean
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
213 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
215 (defcustom mh-store-default-directory nil
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 "*Last directory used by \\[mh-store-msg]; default for next store.
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
217 A directory name string, or nil to use current directory."
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
218 :type '(choice (const :tag "Current" nil)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
219 directory)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
220 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
222 (defvar mh-note-deleted "D"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
223 "String whose first character is used to notate deleted messages.")
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
224
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
225 (defvar mh-note-refiled "^"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
226 "String whose first character is used to notate refiled messages.")
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
227
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
228 (defvar mh-note-cur "+"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
229 "String whose first character is used to notate the current message.")
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 (defvar mh-partial-folder-mode-line-annotation "select"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 "Annotation when displaying part of a folder.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
233 The string is displayed after the folder's name. NIL for no annotation.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
234
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
235 ;;; Parameterize mh-e to work with different scan formats. The defaults work
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
236 ;;; with the standard MH scan listings, in which the first 4 characters on
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
237 ;;; the line are the message number, followed by two places for notations.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
238
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
239 (defcustom mh-scan-format-file t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
240 "Specifies the format file to pass to the scan program.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
241 If t, the format string will be taken from the either `mh-scan-format-mh'
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
242 or `mh-scan-format-nmh' depending on whether MH or nmh is in use.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
243 If nil, the default scan output will be used.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
244
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
245 If you customize the scan format, you may need to modify a few variables
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
246 containing regexps that mh-e uses to identify specific portions of the output.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
247 Use `M-x apropos RET mh-scan.*regexp' to obtain a list of these variables."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
248 :type '(choice (const :tag "Use mh-e scan format" t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
249 (const :tag "Use default scan format" nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
250 (file :tag "Specify a scan format file"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
251 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
252
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
253 ;; The following scan formats are passed to the scan program if the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
254 ;; setting of `mh-scan-format-file' above is nil. They are identical
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
255 ;; except the later one makes use of the nmh `decode' function to
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
256 ;; decode RFC 2047 encodings.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
257
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
258 (defvar mh-scan-format-mh
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
259 (concat
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
260 "%4(msg)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
261 "%<(cur)+%| %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
262 "%<{replied}-"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
263 "%?(nonnull(comp{to}))%<(mymbox{to})t%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
264 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
265 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
266 "%?(nonnull(comp{newsgroups}))n%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
267 "%<(zero) %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
268 "%02(mon{date})/%02(mday{date})%<{date} %|*%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
269 "%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
270 "%<(zero)%17(friendly{from})%> "
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
271 "%{subject}%<{body}<<%{body}%>")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
272 "*Scan format string for MH, provided to the scan program via the -format arg.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
273 This format is identical to the default except that additional hints for
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
274 fontification have been added to the sixth column.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
275
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
276 The values of the sixth column, in priority order, are: `-' if the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
277 message has been replied to, t if an address on the To: line matches
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
278 one of the mailboxes of the current user, `c' if the Cc: line matches,
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
279 `b' if the Bcc: line matches, and `n' if a non-empty Newsgroups: header
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
280 is present.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
281
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
282 (defvar mh-scan-format-nmh
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
283 (concat
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
284 "%4(msg)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
285 "%<(cur)+%| %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
286 "%<{replied}-"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
287 "%?(nonnull(comp{to}))%<(mymbox{to})t%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
288 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
289 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
290 "%?(nonnull(comp{newsgroups}))n%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
291 "%<(zero) %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
292 "%02(mon{date})/%02(mday{date})%<{date} %|*%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
293 "%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
294 "%<(zero)%17(decode(friendly{from}))%> "
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
295 "%(decode{subject})%<{body}<<%{body}%>")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
296 "*Scan format string for nmh, provided to the scan program via the -format arg.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
297 This format is identical to the default except that additional hints for
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
298 fontification have been added to the sixth column.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
299
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
300 The values of the sixth column, in priority order, are: `-' if the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
301 message has been replied to, t if an address on the To: line matches
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
302 one of the mailboxes of the current user, `c' if the Cc: line matches,
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
303 `b' if the Bcc: line matches, and `n' if a non-empty Newsgroups: header
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
304 is present.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
305
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
306 (defvar mh-scan-good-msg-regexp "^\\(....\\)[^D^]"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
307 "Regexp specifying the scan lines that are 'good' messages.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
308 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
309 at least one parenthesized expression which matches the message number.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
310
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
311 (defvar mh-scan-deleted-msg-regexp "^\\(....\\)D"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
312 "Regexp matching scan lines of deleted messages.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
313 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
314 at least one parenthesized expression which matches the message number.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
315
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
316 (defvar mh-scan-refiled-msg-regexp "^\\(....\\)\\^"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
317 "Regexp matching scan lines of refiled messages.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
318 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
319 at least one parenthesized expression which matches the message number.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
320
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
321 (defvar mh-scan-valid-regexp "^ *[0-9]"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
322 "Regexp matching scan lines for messages (not error messages).")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
323
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
324 (defvar mh-scan-cur-msg-number-regexp "^\\(....\\+\\).*"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
325 "Regexp matching scan line for the current message.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
326 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
327 at least one parenthesized expression which matches the message number.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
328 Don't disable this regexp as it's needed by non fontifying functions.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
329
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
330 (defvar mh-scan-cur-msg-regexp "^\\(....\\+DISABLED.*\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
331 "Regexp matching scan line for the current message.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
332 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
333 at least one parenthesized expression which matches the whole line.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
334 To enable this feature, remove the string DISABLED from the regexp.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
335
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
336 (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
337 "Regexp matching a valid date in scan lines.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
338 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
339 only one parenthesized expression which matches the date field
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
340 \(see `mh-scan-format-regexp').")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
341
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
342 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
343 "Regexp specifying the recipient in scan lines for messages we sent.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
344 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
345 two parenthesized expressions. The first is expected to match the To:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
346 that the default scan format file generates. The second is expected to match
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
347 the recipient's name.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
348
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
349 (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
350 "Regexp matching the message body beginning displayed in scan lines.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
351 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
352 at least one parenthesized expression which matches the body text.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
353
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
354 (defvar mh-scan-subject-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
355 "^...............................\\([Rr][Ee]:\\s-*\\)*\\([^<\n]*\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
356 "*Regexp matching the subject string in MH folder mode.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
357 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
358 at least two parenthesized expressions. The first is expected to match the Re:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
359 string, if any. The second is expected to match the subject line itself.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
360
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
361 (defvar mh-scan-format-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
362 (concat "\\([bct]\\)" mh-scan-date-regexp " \\(..................\\)")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
363 "Regexp matching the output of scan using `mh-scan-format-mh' or `mh-scan-format-nmh'.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
364 The default `mh-folder-font-lock-keywords' expects this expression to contain
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
365 at least three parenthesized expressions. The first should match the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
366 fontification hint, the second is found in `mh-scan-date-regexp', and the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
367 third should match the user name.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
368
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
369 (defvar mh-folder-followup-face 'mh-folder-followup-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
370 "Face for highlighting Re: (followup) subject text in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
371 (defface mh-folder-followup-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
372 '((((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
373 (:foreground "blue3"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
374 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
375 (:foreground "LightGoldenRod"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
376 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
377 (:bold t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
378 "Face for highlighting Re: (followup) subject text in MH-Folder buffers."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
379 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
380 (defvar mh-folder-address-face 'mh-folder-address-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
381 "Face for highlighting the address in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
382 (copy-face 'mh-folder-subject-face 'mh-folder-address-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
383 (defvar mh-folder-scan-format-face 'mh-folder-scan-format-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
384 "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
385 (copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
386
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
387 (defvar mh-folder-date-face 'mh-folder-date-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
388 "Face for highlighting the date in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
389 (defface mh-folder-date-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
390 '((((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
391 (:foreground "snow4"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
392 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
393 (:foreground "snow3"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
394 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
395 (:bold t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
396 "Face for highlighting the date in MH-Folder buffers."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
397 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
398
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
399 (defvar mh-folder-msg-number-face 'mh-folder-msg-number-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
400 "Face for highlighting the message number in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
401 (defface mh-folder-msg-number-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
402 '((((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
403 (:foreground "snow4"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
404 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
405 (:foreground "snow3"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
406 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
407 (:bold t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
408 "Face for highlighting the message number in MH-Folder buffers."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
409 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
410
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
411 (defvar mh-folder-deleted-face 'mh-folder-deleted-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
412 "Face for highlighting deleted messages in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
413 (copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
414
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
415 (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
416 "Face for the current message line in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
417 (defface mh-folder-cur-msg-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
418 '((((type tty pc) (class color))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
419 (:background "LightGreen"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
420 (((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
421 (:background "LightGreen") ;Use this for solid background colour
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
422 ;;; (:underline t) ;Use this for underlining
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
423 )
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
424 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
425 (:background "DarkOliveGreen4"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
426 (t (:underline t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
427 "Face for the current message line in MH-Folder buffers."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
428 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
429
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
430 ;;mh-folder-subject-face is defined in mh-utils since it's needed there
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
431 ;;for mh-show-subject-face.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
432
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
433 (eval-after-load "font-lock"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
434 '(progn
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
435 (defvar mh-folder-refiled-face 'mh-folder-refiled-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
436 "Face for highlighting refiled messages in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
437 (copy-face 'font-lock-variable-name-face 'mh-folder-refiled-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
438 (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
439 "Face for highlighting the current message in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
440 (copy-face 'font-lock-keyword-face 'mh-folder-cur-msg-number-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
441 (defvar mh-folder-to-face 'mh-folder-to-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
442 "Face for highlighting the To: string in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
443 (copy-face 'font-lock-string-face 'mh-folder-to-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
444 (defvar mh-folder-body-face 'mh-folder-body-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
445 "Face for highlighting body text in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
446 (copy-face 'font-lock-string-face 'mh-folder-body-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
447
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
448 (defvar mh-folder-font-lock-keywords
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
449 (list
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
450 ;; Marked for deletion
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
451 (list (concat mh-scan-deleted-msg-regexp ".*")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
452 '(0 mh-folder-deleted-face))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
453 ;; Marked for refile
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
454 (list (concat mh-scan-refiled-msg-regexp ".*")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
455 '(0 mh-folder-refiled-face))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
456 ;;after subj
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
457 (list mh-scan-body-regexp '(1 mh-folder-body-face nil t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
458 '(mh-folder-font-lock-subject
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
459 (1 mh-folder-followup-face append t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
460 (2 mh-folder-subject-face append t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
461 ;;current msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
462 (list mh-scan-cur-msg-number-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
463 '(1 mh-folder-cur-msg-number-face))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
464 (list mh-scan-good-msg-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
465 '(1 mh-folder-msg-number-face)) ;; Msg number
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
466 (list mh-scan-date-regexp '(1 mh-folder-date-face)) ;; Date
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
467 (list mh-scan-rcpt-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
468 '(1 mh-folder-to-face) ;; To:
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
469 '(2 mh-folder-address-face)) ;; address
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
470 ;; scan font-lock name
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
471 (list mh-scan-format-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
472 '(1 mh-folder-date-face)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
473 '(3 mh-folder-scan-format-face))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
474 ;; Current message line
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
475 (list mh-scan-cur-msg-regexp
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
476 '(1 mh-folder-cur-msg-face prepend t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
477 ;; Unseen messages in bold
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
478 '(mh-folder-font-lock-unseen (1 'bold append t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
479 )
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
480 "Regexp keywords used to fontify the MH-Folder buffer.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
481 ))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
482
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
483 (defun mh-folder-font-lock-subject (limit)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
484 "Return mh-e scan subject strings to font-lock between point and LIMIT."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
485 (if (not (re-search-forward mh-scan-subject-regexp limit t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
486 nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
487 (if (match-beginning 1)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
488 (set-match-data (list (match-beginning 1) (match-end 2)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
489 (match-beginning 1) (match-end 2) nil nil))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
490 (set-match-data (list (match-beginning 2) (match-end 2)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
491 nil nil (match-beginning 2) (match-end 2))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
492 t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
493
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
494 ;; Fontifify unseen mesages in bold. - Peter S Galbraith <psg@debian.org>
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
495 (defvar mh-folder-unseen-seq-name nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
496 "Name of unseen sequence.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
497 The default for this is provided by the function `mh-folder-unseen-seq-name'
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
498 On nmh systems.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
499
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
500 (defun mh-folder-unseen-seq-name ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
501 "Provide name of unseen sequence from mhparam."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
502 (or mh-progs (mh-find-path))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
503 (save-excursion
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
504 (let ((tmp-buffer (get-buffer-create mh-temp-buffer))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
505 (unseen-seq-name "unseen"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
506 (set-buffer tmp-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
507 (unwind-protect
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
508 (progn
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
509 (call-process (expand-file-name "mhparam" mh-progs)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
510 nil '(t t) nil "-component" "Unseen-Sequence")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
511 (goto-char (point-min))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
512 (if (re-search-forward "Unseen-Sequence: \\(.*\\)$" nil t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
513 (setq unseen-seq-name (match-string 1))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
514 (kill-buffer tmp-buffer))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
515 unseen-seq-name)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
516
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
517 (defun mh-folder-unseen-seq-list ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
518 "Return a list of unseen message numbers for current folder."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
519 (if (not mh-folder-unseen-seq-name)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
520 (setq mh-folder-unseen-seq-name (mh-folder-unseen-seq-name)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
521 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
522 ((not mh-folder-unseen-seq-name)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
523 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
524 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
525 (let ((folder mh-current-folder))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
526 (save-excursion
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
527 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
528 (set-buffer tmp-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
529 (unwind-protect
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
530 (progn
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
531 (call-process (expand-file-name "mark" mh-progs)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
532 nil '(t t) nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
533 folder "-seq" mh-folder-unseen-seq-name
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
534 "-list")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
535 (goto-char (point-min))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
536 (sort (mh-read-msg-list) '<))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
537 (kill-buffer tmp-buffer))))))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
538
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
539 (defvar mh-folder-unseen-seq-cache nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
540 "Internal cache variable used for font-lock in mh-e.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
541 Should only be non-nil through font-lock stepping, and nil once font-lock
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
542 is done highlighting.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
543 (make-variable-buffer-local 'mh-folder-unseen-seq-cache)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
544
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
545 (defun mh-folder-font-lock-unseen (limit)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
546 "Return unseen message lines to font-lock between point and LIMIT."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
547 (if (not mh-folder-unseen-seq-cache)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
548 (setq mh-folder-unseen-seq-cache (mh-folder-unseen-seq-list)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
549 (let ((cur-msg (mh-get-msg-num nil)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
550 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
551 ((not mh-folder-unseen-seq-cache)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
552 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
553 ((not cur-msg) ;Presumably at end of buffer
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
554 (setq mh-folder-unseen-seq-cache nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
555 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
556 ((member cur-msg mh-folder-unseen-seq-cache)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
557 (let ((bpoint (progn (beginning-of-line)(point)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
558 (epoint (progn (forward-line 1)(point))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
559 (if (<= limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
560 (setq mh-folder-unseen-seq-cache nil))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
561 (set-match-data (list bpoint epoint bpoint epoint))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
562 t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
563 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
564 ;; move forward one line at a time, checking each message number.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
565 (while (and
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
566 (= 0 (forward-line 1))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
567 (> limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
568 (not (member (mh-get-msg-num nil) mh-folder-unseen-seq-cache))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
569 ;; Examine how we must have exited the loop...
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
570 (let ((cur-msg (mh-get-msg-num nil)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
571 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
572 ((or (not cur-msg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
573 (<= limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
574 (not (member cur-msg mh-folder-unseen-seq-cache)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
575 (setq mh-folder-unseen-seq-cache nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
576 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
577 ((member cur-msg mh-folder-unseen-seq-cache)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
578 (let ((bpoint (progn (beginning-of-line)(point)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
579 (epoint (progn (forward-line 1)(point))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
580 (if (<= limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
581 (setq mh-folder-unseen-seq-cache nil))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
582 (set-match-data (list bpoint epoint bpoint epoint))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
583 t))))))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
584 ;; fontifify unseen mesages in bold. - end
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
585
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
586 ;;; Internal variables:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
587
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
588 (defvar mh-last-destination nil) ;Destination of last refile or write command.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
589
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
590 (defvar mh-folder-mode-map (make-keymap)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591 "Keymap for MH folders.")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
592
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
593 (defvar mh-delete-list nil) ;List of msg numbers to delete.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
595 (defvar mh-refile-list nil) ;List of folder names in mh-seq-list.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
596
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
597 (defvar mh-next-direction 'forward) ;Direction to move to next message.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
598
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
599 (defvar mh-narrowed-to-seq nil) ;Sequence display is narrowed to or nil if not narrowed.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
600
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
601 (defvar mh-first-msg-num nil) ;Number of first msg in buffer.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
602
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
603 (defvar mh-last-msg-num nil) ;Number of last msg in buffer.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
604
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
605 (defvar mh-mode-line-annotation nil) ;Message range displayed in buffer.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
606
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
607 ;;; Macros and generic functions:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
608
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
609 (defun mh-mapc (func list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
610 (while list
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
611 (funcall func (car list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
612 (setq list (cdr list))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
613
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
614 (defun mh-scan-format ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
615 "Generate arguments to the scan program to specify which format string should be used."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
616 (if (equal mh-scan-format-file t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
617 (list "-format" (if mh-nmh-p
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
618 (list mh-scan-format-nmh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
619 (list mh-scan-format-mh)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
620 (if (not (equal mh-scan-format-file nil))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
621 (list "-form" mh-scan-format-file))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
622
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
624
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
625 ;;; Entry points:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
626
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
627 ;;;###autoload
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
628 (defun mh-rmail (&optional arg)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
629 "Inc(orporate) new mail with MH.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
630 Scan an MH folder if ARG is non-nil. This function is an entry point to mh-e,
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
631 the Emacs front end to the MH mail system."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
632 (interactive "P")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
633 (mh-find-path)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
634 (if arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635 (call-interactively 'mh-visit-folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
636 (mh-inc-folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
638 ;;;###autoload
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
639 (defun mh-nmail (&optional arg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
640 "Check for new mail in inbox folder.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
641 Scan an MH folder if ARG is non-nil. This function is an entry point to mh-e,
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
642 the Emacs front end to the MH mail system."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
643 (interactive "P")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
644 (mh-find-path) ; init mh-inbox
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
645 (if arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
646 (call-interactively 'mh-visit-folder)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
647 (mh-visit-folder mh-inbox)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
648
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
649
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
650
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
651 ;;; User executable mh-e commands:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
652
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
653
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
654 (defun mh-delete-msg (msg-or-seq)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
655 "Mark the specified MSG-OR-SEQ for subsequent deletion and move to the next.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
656
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
657 Default is the displayed message. If optional prefix argument is given then
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
658 prompt for the message sequence. If variable `transient-mark-mode' is non-nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
659 and the mark is active, then the selected region is marked for deletion."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
660 (interactive (list (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
661 ((and (boundp 'transient-mark-mode)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
662 transient-mark-mode mark-active)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
663 (mh-region-to-sequence (region-beginning)(region-end))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
664 'region)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
665 (current-prefix-arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
666 (mh-read-seq-default "Delete" t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
667 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
668 (mh-get-msg-num t)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
669 (mh-delete-msg-no-motion msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
670 (mh-next-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
671
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
672
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
673 (defun mh-delete-msg-no-motion (msg-or-seq)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
674 "Mark the specified MSG-OR-SEQ for subsequent deletion.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
675 Default is the displayed message. If optional prefix argument is
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
676 provided, then prompt for the message sequence."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
677 (interactive (list (if current-prefix-arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
678 (mh-read-seq-default "Delete" t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
679 (mh-get-msg-num t))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
680 (if (numberp msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
681 (mh-delete-a-msg msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
682 (mh-map-to-seq-msgs 'mh-delete-a-msg msg-or-seq)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
683
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
684
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
685 (defun mh-execute-commands ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
686 "Process outstanding delete and refile requests."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
687 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
688 (if mh-narrowed-to-seq (mh-widen))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
689 (mh-process-commands mh-current-folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
690 (mh-set-scan-mode)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
691 (mh-goto-cur-msg) ; after mh-set-scan-mode for efficiency
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
692 (mh-make-folder-mode-line)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
693 t) ; return t for [local-]write-file-hooks
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
694
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
695
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
696 (defun mh-first-msg ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
697 "Move to the first message."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
698 (interactive)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
699 (goto-char (point-min))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
700 (while (and (not (eobp)) (not (looking-at mh-scan-valid-regexp)))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
701 (forward-line 1)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
702
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
703
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
704 (defun mh-header-display ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
705 "Show the current message with all its headers.
6855
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
706 Displays headers that might have been suppressed by setting the
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
707 variables `mh-clean-message-header' or `mhl-formfile', or by the fallback
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
708 behavior of scrolling uninteresting headers off the top of the window.
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
709 Type \"\\[mh-show]\" to show the message normally again."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
710 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
711 (and (not mh-showing-with-headers)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
712 (or mhl-formfile mh-clean-message-header)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
713 (mh-invalidate-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714 (let ((mhl-formfile nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715 (mh-clean-message-header nil))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
716 (mh-show-msg nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717 (mh-in-show-buffer (mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
718 (goto-char (point-min))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
719 (mh-recenter 0))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
720 (setq mh-showing-with-headers t)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
721
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
723 (defun mh-inc-folder (&optional maildrop-name)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
724 "Inc(orporate)s new mail into the Inbox folder.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
725 Optional argument MAILDROP-NAME specifies an alternate maildrop from the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
726 default. If the prefix argument is given, incorporates mail into the current
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
727 folder, otherwise uses the folder named by `mh-inbox'.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
728 Runs `mh-inc-folder-hook' after incorporating new mail.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
729 Do not call this function from outside mh-e; use \\[mh-rmail] instead."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
730 (interactive (list (if current-prefix-arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
731 (expand-file-name
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
732 (read-file-name "inc mail from file: "
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
733 mh-user-path)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
734 (let ((config (current-window-configuration)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
735 (if (not maildrop-name)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
736 (cond ((not (get-buffer mh-inbox))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
737 (mh-make-folder mh-inbox)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
738 (setq mh-previous-window-config config))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
739 ((not (eq (current-buffer) (get-buffer mh-inbox)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
740 (switch-to-buffer mh-inbox)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
741 (setq mh-previous-window-config config)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
742 (mh-get-new-mail maildrop-name)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
743 (if mh-showing-mode (mh-show))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
744 (run-hooks 'mh-inc-folder-hook))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
745
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
746
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
747 (defun mh-last-msg ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748 "Move to the last message."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750 (goto-char (point-max))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
751 (while (and (not (bobp)) (looking-at "^$"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
752 (forward-line -1)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
753
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
755 (defun mh-next-undeleted-msg (&optional arg)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
756 "Move to the next undeleted message ARG in window."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
757 (interactive "p")
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
758 (setq mh-next-direction 'forward)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
759 (forward-line 1)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
760 (cond ((re-search-forward mh-scan-good-msg-regexp nil 0 arg)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
761 (beginning-of-line)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
762 (mh-maybe-show))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
763 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
764 (forward-line -1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765 (if (get-buffer mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
766 (delete-windows-on mh-show-buffer)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
767
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
768
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
769 (defun mh-refile-msg (msg-or-seq folder)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
770 "Refile MSG-OR-SEQ (default: displayed message) into FOLDER.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
771 If optional prefix argument provided, then prompt for message sequence.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
772 If variable `transient-mark-mode' is non-nil and the mark is active, then the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
773 selected region is marked for refiling."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
774 (interactive
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
775 (list (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
776 ((and (boundp 'transient-mark-mode) transient-mark-mode mark-active)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
777 (mh-region-to-sequence (region-beginning)(region-end))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
778 'region)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
779 (current-prefix-arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
780 (mh-read-seq-default "Refile" t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
781 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
782 (mh-get-msg-num t)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
783 (intern
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
784 (mh-prompt-for-folder
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
785 "Destination"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
786 (or (and mh-default-folder-for-message-function
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
787 (let ((refile-file (mh-msg-filename (mh-get-msg-num t))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
788 (save-excursion
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
789 (set-buffer (get-buffer-create mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
790 (erase-buffer)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
791 (insert-file-contents refile-file)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
792 (let ((buffer-file-name refile-file))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
793 (funcall mh-default-folder-for-message-function)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
794 (and (eq 'refile (car mh-last-destination))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
795 (symbol-name (cdr mh-last-destination)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
796 "")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
797 t))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
798 (setq mh-last-destination (cons 'refile folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
799 (if (numberp msg-or-seq)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
800 (mh-refile-a-msg msg-or-seq folder)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
801 (mh-map-to-seq-msgs 'mh-refile-a-msg msg-or-seq folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
802 (mh-next-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
803
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
804
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
805 (defun mh-refile-or-write-again (message)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
806 "Re-execute the last refile or write command on the given MESSAGE.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
807 Default is the displayed message. Use the same folder or file as the
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
808 previous refile or write command."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
809 (interactive (list (mh-get-msg-num t)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
810 (if (null mh-last-destination)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
811 (error "No previous refile or write"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
812 (cond ((eq (car mh-last-destination) 'refile)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
813 (mh-refile-a-msg message (cdr mh-last-destination))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
814 (message "Destination folder: %s" (cdr mh-last-destination)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
815 (t
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
816 (apply 'mh-write-msg-to-file message (cdr mh-last-destination))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
817 (message "Destination: %s" (cdr mh-last-destination))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
818 (mh-next-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
819
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
820 (defun mh-quit ()
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
821 "Quit the current mh-e folder.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
822 Start by running `mh-before-quit-hook'. Restore the previous window
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
823 configuration, if one exists. Finish by running `mh-quit-hook'."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
824 (interactive)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
825 (run-hooks 'mh-before-quit-hook)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
826 (mh-update-sequences)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
827 (mh-invalidate-show-buffer)
21922
714591991067 (mh-quit): Undo 3/3 change (and the subsequent fix).
Richard M. Stallman <rms@gnu.org>
parents: 21546
diff changeset
828 (bury-buffer (current-buffer))
714591991067 (mh-quit): Undo 3/3 change (and the subsequent fix).
Richard M. Stallman <rms@gnu.org>
parents: 21546
diff changeset
829 (if (get-buffer mh-show-buffer)
714591991067 (mh-quit): Undo 3/3 change (and the subsequent fix).
Richard M. Stallman <rms@gnu.org>
parents: 21546
diff changeset
830 (bury-buffer mh-show-buffer))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
831 (if (get-buffer mh-temp-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
832 (kill-buffer mh-temp-buffer))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
833 (if (get-buffer mh-temp-folders-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
834 (kill-buffer mh-temp-folders-buffer))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
835 (if (get-buffer mh-temp-sequences-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
836 (kill-buffer mh-temp-sequences-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
837 (if mh-previous-window-config
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
838 (set-window-configuration mh-previous-window-config))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
839 (run-hooks 'mh-quit-hook))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
840
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
841 (defun mh-page-msg (&optional arg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
842 "Page the displayed message forwards.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
843 Scrolls ARG lines or a full screen if no argument is supplied. Show buffer
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
844 first if not displayed. Show the next undeleted message if looking at the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
845 bottom of the current message."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 (interactive "P")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
847 (if mh-showing-mode
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
848 (if mh-page-to-next-msg-p
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
849 (if (equal mh-next-direction 'backward)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
850 (mh-previous-undeleted-msg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
851 (mh-next-undeleted-msg))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
852 (if (mh-in-show-buffer (mh-show-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
853 (pos-visible-in-window-p (point-max)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
854 (progn
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
855 (message (format
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
856 "End of message (Type %s to read %s undeleted message)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
857 (single-key-description last-input-event)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
858 (if (equal mh-next-direction 'backward)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
859 "previous"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
860 "next")))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
861 (setq mh-page-to-next-msg-p t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
862 (scroll-other-window arg)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
863 (mh-show)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866 (defun mh-previous-page (&optional arg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
867 "Page the displayed message backwards.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
868 Scrolls ARG lines or a full screen if no argument is supplied."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
869 (interactive "P")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
870 (mh-in-show-buffer (mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
871 (scroll-down arg)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
872
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
873
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
874 (defun mh-previous-undeleted-msg (&optional arg)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
875 "Move to the previous undeleted message ARG in window."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
876 (interactive "p")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
877 (setq mh-next-direction 'backward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
878 (beginning-of-line)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
879 (cond ((re-search-backward mh-scan-good-msg-regexp nil 0 arg)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
880 (mh-maybe-show))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
881 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
882 (if (get-buffer mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 (delete-windows-on mh-show-buffer)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
885
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
886 (defun mh-rescan-folder (&optional range)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887 "Rescan a folder after optionally processing the outstanding commands.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
888 If optional prefix argument RANGE is provided, prompt for the range of
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
889 messages to display. Otherwise show the entire folder."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
890 (interactive (list (if current-prefix-arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 (mh-read-msg-range "Range to scan [all]? ")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892 nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
893 (setq mh-next-direction 'forward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
894 (mh-scan-folder mh-current-folder (or range "all")))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
895
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
896
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
897 (defun mh-write-msg-to-file (msg file no-headers)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
898 "Append MSG to the end of a FILE.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
899 If prefix argument NO-HEADERS is provided, write only the message body.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
900 Otherwise send the entire message including the headers."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
901 (interactive
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
902 (list (mh-get-msg-num t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
903 (let ((default-dir (if (eq 'write (car mh-last-destination))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
904 (file-name-directory (car (cdr mh-last-destination)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
905 default-directory)))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
906 (read-file-name (format "Save message%s in file: "
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
907 (if current-prefix-arg " body" ""))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
908 default-dir
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
909 (if (eq 'write (car mh-last-destination))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
910 (car (cdr mh-last-destination))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
911 (expand-file-name "mail.out" default-dir))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
912 current-prefix-arg))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
913 (let ((msg-file-to-output (mh-msg-filename msg))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
914 (output-file (mh-expand-file-name file)))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
915 (setq mh-last-destination (list 'write file (if no-headers 'no-headers)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
916 (save-excursion
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
917 (set-buffer (get-buffer-create mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
918 (erase-buffer)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
919 (insert-file-contents msg-file-to-output)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
920 (goto-char (point-min))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
921 (if no-headers (search-forward "\n\n"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
922 (append-to-file (point) (point-max) output-file))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
923
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
924
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
925 (defun mh-toggle-showing ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
926 "Toggle the scanning mode/showing mode of displaying messages."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
927 (interactive)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
928 (if mh-showing-mode
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
929 (mh-set-scan-mode)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
930 (mh-show)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
931
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
932
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
933 (defun mh-undo (msg-or-seq)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
934 "Undo the pending deletion or refile of the specified MSG-OR-SEQ.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
935 Default is the displayed message. If optional prefix argument is
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
936 provided, then prompt for the message sequence.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
937 If variable `transient-mark-mode' is non-nil and the mark is active, then the
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
938 selected region is unmarked."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
939 (interactive (list (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
940 ((and (boundp 'transient-mark-mode)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
941 transient-mark-mode mark-active)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
942 (mh-region-to-sequence (region-beginning)(region-end))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
943 'region)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
944 (current-prefix-arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
945 (mh-read-seq-default "Undo" t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
946 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
947 (mh-get-msg-num t)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
948 (cond ((numberp msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
949 (let ((original-position (point)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 (beginning-of-line)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
951 (while (not (or (looking-at mh-scan-deleted-msg-regexp)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
952 (looking-at mh-scan-refiled-msg-regexp)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
953 (and (eq mh-next-direction 'forward) (bobp))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
954 (and (eq mh-next-direction 'backward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
955 (save-excursion (forward-line) (eobp)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
956 (forward-line (if (eq mh-next-direction 'forward) -1 1)))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
957 (if (or (looking-at mh-scan-deleted-msg-regexp)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
958 (looking-at mh-scan-refiled-msg-regexp))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
959 (progn
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
960 (mh-undo-msg (mh-get-msg-num t))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
961 (mh-maybe-show))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
962 (goto-char original-position)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
963 (error "Nothing to undo"))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
964 (t
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
965 (mh-map-to-seq-msgs 'mh-undo-msg msg-or-seq)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
966 ;; update the mh-refile-list so mh-outstanding-commands-p will work
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
967 (mh-mapc (function
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
968 (lambda (elt)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
969 (if (not (mh-seq-to-msgs elt))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
970 (setq mh-refile-list (delq elt mh-refile-list)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
971 mh-refile-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
972 (if (not (mh-outstanding-commands-p))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
973 (mh-set-folder-modified-p nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
974
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
975
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
976 ;;;###autoload
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
977 (defun mh-version ()
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
978 "Display version information about mh-e and the MH mail handling system."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
979 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
980 (mh-find-progs)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
981 (set-buffer (get-buffer-create mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
982 (erase-buffer)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
983 ;; mh-e and Emacs versions.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
984 (insert "mh-e " mh-version "\n\n" (emacs-version) "\n\n")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
985 ;; MH version.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
986 (let ((help-start (point)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
987 (condition-case err-data
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
988 (mh-exec-cmd-output "inc" nil (if mh-nmh-p "-version" "-help"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
989 (file-error (insert (mapconcat 'concat (cdr err-data) ": ") "\n")))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
990 (goto-char help-start)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
991 (if mh-nmh-p
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
992 (search-forward "inc -- " nil t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
993 (search-forward "version: " nil t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
994 (delete-region help-start (point)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
995 (goto-char (point-max))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
996 (insert "mh-progs:\t" mh-progs "\n"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
997 "mh-lib:\t\t" mh-lib "\n"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
998 "mh-lib-progs:\t" mh-lib-progs "\n\n")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
999 ;; Linux version.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1000 (condition-case ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1001 (call-process "uname" nil t nil "-a")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1002 (file-error))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1003 (goto-char (point-min))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1004 (display-buffer mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1005
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1006
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1007 (defun mh-visit-folder (folder &optional range)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1008 "Visit FOLDER and display RANGE of messages.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1009 Do not call this function from outside mh-e; see \\[mh-rmail] instead."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1010 (interactive (list (mh-prompt-for-folder "Visit" mh-inbox t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1011 (mh-read-msg-range "Range [all]? ")))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1012 (let ((config (current-window-configuration)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1013 (mh-scan-folder folder (or range "all"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1014 (setq mh-previous-window-config config))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1015 nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1016
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1017
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1018 (defun mh-update-sequences ()
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1019 "Update MH's Unseen sequence and current folder and message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1020 Flush mh-e's state out to MH. The message at the cursor becomes current."
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1021 (interactive)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1022 ;; mh-update-sequences is the opposite of mh-read-folder-sequences,
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1023 ;; which updates mh-e's state from MH.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1024 (let ((folder-set (mh-update-unseen))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1025 (new-cur (mh-get-msg-num nil)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1026 (if new-cur
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1027 (let ((seq-entry (mh-find-seq 'cur)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1028 (mh-remove-cur-notation)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1029 (setcdr seq-entry (list new-cur)) ;delete-seq-locally, add-msgs-to-seq
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1030 (mh-define-sequence 'cur (list new-cur))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1031 (beginning-of-line)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1032 (if (looking-at mh-scan-good-msg-regexp)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1033 (mh-notate nil mh-note-cur mh-cmd-note)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1034 (or folder-set
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1035 (save-excursion
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1036 ;; psg - mh-current-folder is nil if mh-summary-height < 4 !
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1037 ;; So I added this sanity check.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1038 (if (stringp mh-current-folder)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1039 (mh-exec-cmd-quiet t "folder" mh-current-folder "-fast")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1040 (mh-exec-cmd-quiet t "folder" "-fast")))))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1041
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1042
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1043
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1044
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1045 ;;; Support routines.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1046
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1047 (defun mh-delete-a-msg (msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1048 ;; Delete the MESSAGE.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1049 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1050 (mh-goto-msg msg nil t)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1051 (if (looking-at mh-scan-refiled-msg-regexp)
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 33145
diff changeset
1052 (error "Message %d is refiled. Undo refile before deleting" msg))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1053 (if (looking-at mh-scan-deleted-msg-regexp)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1054 nil
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1055 (mh-set-folder-modified-p t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1056 (setq mh-delete-list (cons msg mh-delete-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1057 (mh-add-msgs-to-seq msg 'deleted t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1058 (mh-notate msg mh-note-deleted mh-cmd-note)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1059 (run-hooks 'mh-delete-msg-hook))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1060
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1061 (defun mh-refile-a-msg (msg destination)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1062 ;; Refile MESSAGE in FOLDER. FOLDER is a symbol, not a string.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1063 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1064 (mh-goto-msg msg nil t)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1065 (cond ((looking-at mh-scan-deleted-msg-regexp)
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 33145
diff changeset
1066 (error "Message %d is deleted. Undo delete before moving" msg))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1067 ((looking-at mh-scan-refiled-msg-regexp)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1068 (if (y-or-n-p
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1069 (format "Message %d already refiled. Copy to %s as well? "
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1070 msg destination))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1071 (mh-exec-cmd "refile" (mh-get-msg-num t) "-link"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1072 "-src" mh-current-folder
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1073 (symbol-name destination))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1074 (message "Message not copied.")))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1075 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1076 (mh-set-folder-modified-p t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1077 (if (not (memq destination mh-refile-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1078 (setq mh-refile-list (cons destination mh-refile-list)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1079 (if (not (memq msg (mh-seq-to-msgs destination)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1080 (mh-add-msgs-to-seq msg destination t))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1081 (mh-notate msg mh-note-refiled mh-cmd-note)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1082 (run-hooks 'mh-refile-msg-hook)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1083
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1084
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1085 (defun mh-next-msg ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1086 ;; Move backward or forward to the next undeleted message in the buffer.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1087 (if (eq mh-next-direction 'forward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1088 (mh-next-undeleted-msg 1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1089 (mh-previous-undeleted-msg 1)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1090
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1091
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1092 (defun mh-set-scan-mode ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1093 ;; Display the scan listing buffer, but do not show a message.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1094 (if (get-buffer mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1095 (delete-windows-on mh-show-buffer))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1096 (mh-showing-mode 0)
11577
5a94d8168bdb (mh-set-scan-mode): Use force-mode-line-update.
Karl Heuer <kwzh@gnu.org>
parents: 11505
diff changeset
1097 (force-mode-line-update)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1098 (if mh-recenter-summary-p
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1099 (mh-recenter nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1100
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1101
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1102 (defun mh-undo-msg (msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1103 ;; Undo the deletion or refile of one MESSAGE.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1104 (cond ((memq msg mh-delete-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1105 (setq mh-delete-list (delq msg mh-delete-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1106 (mh-delete-msg-from-seq msg 'deleted t))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1107 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1108 (mh-mapc (function (lambda (dest)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1109 (mh-delete-msg-from-seq msg dest t)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1110 mh-refile-list)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1111 (mh-notate msg ? mh-cmd-note))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1112
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1113
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1114
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1115
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1116 ;;; The folder data abstraction.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1117
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1118 (defun mh-make-folder (name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1119 ;; Create and initialize a new mail folder called NAME and make it the
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1120 ;; current folder.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1121 (switch-to-buffer name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1122 (setq buffer-read-only nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1123 (erase-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1124 (setq buffer-read-only t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1125 (mh-folder-mode)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1126 (mh-set-folder-modified-p nil)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1127 (setq buffer-file-name mh-folder-filename)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1128 (mh-make-folder-mode-line))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1129
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1130
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1131 ;;; Ensure new buffers won't get this mode if default-major-mode is nil.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1132 (put 'mh-folder-mode 'mode-class 'special)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1133
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1134 (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1135 "Major mh-e mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map>
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1136
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1137 You can show the message the cursor is pointing to, and step through the
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1138 messages. Messages can be marked for deletion or refiling into another
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1139 folder; these commands are executed all at once with a separate command.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1140
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1141 A prefix argument (\\[universal-argument]) to delete, refile, list, or undo
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1142 applies the action to a message sequence. If `transient-mark-mode',
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1143 is non-nil, the action is applied to the region.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1144
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1145 Options that control this mode can be changed with \\[customize-group];
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1146 specify the \"mh\" group. In particular, please see the `mh-scan-format-file'
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1147 option if you wish to modify scan's format.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1148
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1149 When a folder is visited, the hook `mh-folder-mode-hook' is run.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1150
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1151 \\{mh-folder-mode-map}"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1152
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1153 (make-local-variable 'font-lock-defaults)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1154 (setq font-lock-defaults '(mh-folder-font-lock-keywords t))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1155 (mh-make-local-vars
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1156 'mh-current-folder (buffer-name) ; Name of folder, a string
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1157 'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1158 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1159 (file-name-as-directory (mh-expand-file-name (buffer-name)))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1160 'mh-showing-mode nil ; Show message also?
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1161 'mh-delete-list nil ; List of msgs nums to delete
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1162 'mh-refile-list nil ; List of folder names in mh-seq-list
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1163 'mh-seq-list nil ; Alist of (seq . msgs) nums
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1164 'mh-seen-list nil ; List of displayed messages
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1165 'mh-next-direction 'forward ; Direction to move to next message
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1166 'mh-narrowed-to-seq nil ; Sequence display is narrowed to
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1167 'mh-first-msg-num nil ; Number of first msg in buffer
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1168 'mh-last-msg-num nil ; Number of last msg in buffer
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1169 'mh-msg-count nil ; Number of msgs in buffer
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1170 'mh-mode-line-annotation nil ; Indiction this is not the full folder
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1171 'mh-previous-window-config nil) ; Previous window configuration
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1172 (setq truncate-lines t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1173 (auto-save-mode -1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1174 (setq buffer-offer-save t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1175 (if (boundp 'local-write-file-hooks)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1176 (setq local-write-file-hooks '(mh-execute-commands)) ;Emacs 19
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1177 (make-local-variable 'write-file-hooks)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1178 (setq write-file-hooks '(mh-execute-commands))) ;Emacs 18
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1179 (make-local-variable 'revert-buffer-function)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1180 (make-local-variable 'hl-line-mode) ; avoid pollution
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1181 (if (fboundp 'hl-line-mode)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1182 (hl-line-mode 1))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1183 (setq revert-buffer-function 'mh-undo-folder)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1184 (or (assq 'mh-showing-mode minor-mode-alist)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1185 (setq minor-mode-alist
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1186 (cons '(mh-showing-mode " Show") minor-mode-alist)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1187 (easy-menu-add mh-folder-sequence-menu)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1188 (easy-menu-add mh-folder-message-menu)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1189 (easy-menu-add mh-folder-folder-menu)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1190 (if (and (boundp 'tool-bar-mode) tool-bar-mode)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1191 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1192
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1193
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1194 (defun mh-make-local-vars (&rest pairs)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1195 ;; Take VARIABLE-VALUE pairs and make local variables initialized to the
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1196 ;; value.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1197 (while pairs
30882
e5b3af28990a (mh-make-local-vars):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 29120
diff changeset
1198 (set (make-local-variable (car pairs)) (car (cdr pairs)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1199 (setq pairs (cdr (cdr pairs)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1200
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1201
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1202 (defun mh-scan-folder (folder range)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1203 ;; Scan the FOLDER over the RANGE. Return in the folder's buffer.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1204 (cond ((null (get-buffer folder))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1205 (mh-make-folder folder))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1206 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1207 (mh-process-or-undo-commands folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1208 (switch-to-buffer folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1209 (mh-regenerate-headers range)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1210 (if (zerop (buffer-size))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1211 (if (equal range "all")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1212 (message "Folder %s is empty" folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1213 (message "No messages in %s, range %s" folder range))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1214 (mh-goto-cur-msg)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1215
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1216
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1217 (defun mh-regenerate-headers (range &optional update)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1218 ;; scan folder over range RANGE.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1219 ;; If UPDATE, append the scan lines, otherwise replace.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1220 (let ((folder mh-current-folder)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1221 scan-start)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1222 (message "Scanning %s..." folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1223 (with-mh-folder-updating (nil)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1224 (if update
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1225 (goto-char (point-max))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1226 (erase-buffer))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1227 (setq scan-start (point))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1228 (mh-exec-cmd-output mh-scan-prog nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1229 (mh-scan-format)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1230 "-noclear" "-noheader"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1231 "-width" (window-width)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1232 folder range)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1233 (goto-char scan-start)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1234 (cond ((looking-at "scan: no messages in")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1235 (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1236 ((looking-at "scan: bad message list ")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1237 (keep-lines mh-scan-valid-regexp))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1238 ((looking-at "scan: ")) ; Keep error messages
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1239 (t
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1240 (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1241 (setq mh-seq-list (mh-read-folder-sequences folder nil))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1242 (mh-notate-user-sequences)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1243 (or update
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1244 (setq mh-mode-line-annotation
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1245 (if (equal range "all")
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1246 nil
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1247 mh-partial-folder-mode-line-annotation)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1248 (mh-make-folder-mode-line))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1249 (message "Scanning %s...done" folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1250
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1251
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1252 (defun mh-get-new-mail (maildrop-name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1253 ;; Read new mail from a maildrop into the current buffer.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1254 ;; Return in the current buffer.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1255 (let ((point-before-inc (point))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1256 (folder mh-current-folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1257 (new-mail-p nil))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1258 (with-mh-folder-updating (t)
14341
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1259 (if maildrop-name
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1260 (message "inc %s -file %s..." folder maildrop-name)
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1261 (message "inc %s..." folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1262 (setq mh-next-direction 'forward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1263 (goto-char (point-max))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1264 (let ((start-of-inc (point)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1265 (if maildrop-name
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1266 ;; I think MH 5 used "-ms-file" instead of "-file",
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1267 ;; which would make inc'ing from maildrops fail.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1268 (mh-exec-cmd-output mh-inc-prog nil folder
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1269 (mh-scan-format)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1270 "-file" (expand-file-name maildrop-name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1271 "-width" (window-width)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1272 "-truncate")
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1273 (mh-exec-cmd-output mh-inc-prog nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1274 (mh-scan-format)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1275 "-width" (window-width)))
14341
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1276 (if maildrop-name
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1277 (message "inc %s -file %s...done" folder maildrop-name)
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1278 (message "inc %s...done" folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1279 (goto-char start-of-inc)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1280 (cond ((save-excursion
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1281 (re-search-forward "^inc: no mail" nil t))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1282 (message "No new mail%s%s" (if maildrop-name " in " "")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1283 (if maildrop-name maildrop-name "")))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1284 ((re-search-forward "^inc:" nil t) ; Error messages
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1285 (error "Error incorporating mail"))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1286 (t
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1287 (mh-remove-cur-notation)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1288 (setq new-mail-p t)))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1289 (keep-lines mh-scan-valid-regexp) ; Flush random scan lines
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1290 (setq mh-seq-list (mh-read-folder-sequences folder t))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1291 (mh-notate-user-sequences)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1292 (if new-mail-p
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1293 (progn
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1294 (mh-make-folder-mode-line)
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1295 (mh-goto-cur-msg))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1296 (goto-char point-before-inc))))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1297
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1298
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1299 (defun mh-make-folder-mode-line (&optional ignored)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1300 ;; Set the fields of the mode line for a folder buffer.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1301 ;; The optional argument is now obsolete. It used to be used to pass
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1302 ;; in what is now stored in the buffer-local variable
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1303 ;; mh-mode-line-annotation.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1304 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1305 (mh-first-msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1306 (setq mh-first-msg-num (mh-get-msg-num nil))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1307 (mh-last-msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1308 (setq mh-last-msg-num (mh-get-msg-num nil))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1309 (setq mh-msg-count (if mh-first-msg-num
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1310 (count-lines (point-min) (point-max))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1311 0))
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1312 (setq mode-line-buffer-identification
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1313 (list (format "{%%b%s} %s msg%s"
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1314 (if mh-mode-line-annotation
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1315 (format "/%s" mh-mode-line-annotation)
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1316 "")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1317 (if (zerop mh-msg-count)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1318 "no"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1319 (format "%d" mh-msg-count))
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1320 (if (zerop mh-msg-count)
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1321 "s"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1322 (cond ((> mh-msg-count 1)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1323 (format "s (%d-%d)" mh-first-msg-num
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1324 mh-last-msg-num))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1325 (mh-first-msg-num
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1326 (format " (%d)" mh-first-msg-num))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1327 (""))))))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1328
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1329 (defun mh-unmark-all-headers (remove-all-flags)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1330 ;; Remove all '+' flags from the headers, and if called with a non-nil
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1331 ;; argument, remove all 'D', '^' and '%' flags too.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1332 ;; Optimized for speed (i.e., no regular expressions).
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1333 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1334 (let ((case-fold-search nil)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1335 (last-line (1- (point-max)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1336 char)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1337 (mh-first-msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1338 (while (<= (point) last-line)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1339 (forward-char mh-cmd-note)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1340 (setq char (following-char))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1341 (if (or (and remove-all-flags
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1342 (or (= char (aref mh-note-deleted 0))
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1343 (= char (aref mh-note-refiled 0))))
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1344 (= char (aref mh-note-cur 0)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1345 (progn
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1346 (delete-char 1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1347 (insert " ")))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1348 (if remove-all-flags
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1349 (progn
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1350 (forward-char 1)
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1351 (if (= (following-char) (aref mh-note-seq 0))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1352 (progn
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1353 (delete-char 1)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1354 (insert " ")))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1355 (forward-line)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1356
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1357
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1358 (defun mh-remove-cur-notation ()
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1359 ;; Remove old cur notation (cf mh-goto-cur-msg code).
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1360 (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1361 (save-excursion
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1362 (and cur-msg
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1363 (mh-goto-msg cur-msg t t)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1364 (looking-at mh-scan-cur-msg-number-regexp)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1365 (mh-notate nil ? mh-cmd-note)))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1366
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1367 (defun mh-goto-cur-msg ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1368 ;; Position the cursor at the current message.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1369 (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1370 (cond ((and cur-msg
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1371 (mh-goto-msg cur-msg t t))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1372 (mh-notate nil mh-note-cur mh-cmd-note)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1373 (mh-recenter 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1374 (mh-maybe-show cur-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1375 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1376 (mh-last-msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1377 (message "No current message")))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1378
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1379
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1380 (defun mh-process-or-undo-commands (folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1381 ;; If FOLDER has outstanding commands, then either process or discard them.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1382 ;; Called by functions like mh-sort-folder, so also invalidate show buffer.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1383 (set-buffer folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1384 (if (mh-outstanding-commands-p)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1385 (if (or mh-do-not-confirm
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1386 (y-or-n-p
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1387 "Process outstanding deletes and refiles (or lose them)? "))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1388 (mh-process-commands folder)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1389 (mh-undo-folder)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1390 (mh-update-unseen)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1391 (mh-invalidate-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1392
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1393
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1394 (defun mh-process-commands (folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1395 ;; Process outstanding commands for the folder FOLDER.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1396 (message "Processing deletes and refiles for %s..." folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1397 (set-buffer folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1398 (with-mh-folder-updating (nil)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1399 ;; Run the hook while the lists are still valid
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1400 (run-hooks 'mh-folder-updated-hook)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1401
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1402 ;; Update the unseen sequence if it exists
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1403 (mh-update-unseen)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1404
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1405 ;; Then refile messages
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1406 (mh-mapc
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1407 (function
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1408 (lambda (dest)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1409 (let ((msgs (mh-seq-to-msgs dest)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1410 (cond (msgs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1411 (apply 'mh-exec-cmd "refile"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1412 "-src" folder (symbol-name dest)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1413 (mh-coalesce-msg-list msgs))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1414 (mh-delete-scan-msgs msgs))))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1415 mh-refile-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1416 (setq mh-refile-list nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1417
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1418 ;; Now delete messages
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1419 (cond (mh-delete-list
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1420 (apply 'mh-exec-cmd "rmm" folder
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1421 (mh-coalesce-msg-list mh-delete-list))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1422 (mh-delete-scan-msgs mh-delete-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1423 (setq mh-delete-list nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1424
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1425 ;; Don't need to remove sequences since delete and refile do so.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1426
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1427 ;; Mark cur message
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1428 (if (> (buffer-size) 0)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1429 (mh-define-sequence 'cur (list (or (mh-get-msg-num nil) "last"))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1430
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1431 (and (buffer-file-name (get-buffer mh-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1432 (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1433 ;; If "inc" were to put a new msg in this file,
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1434 ;; we would not notice, so mark it invalid now.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1435 (mh-invalidate-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1436
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1437 (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1438 (mh-unmark-all-headers t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1439 (mh-notate-user-sequences)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1440 (message "Processing deletes and refiles for %s...done" folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1441
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1442
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1443 (defun mh-update-unseen ()
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1444 ;; Flush updates to the Unseen sequence out to MH.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1445 ;; Return non-NIL iff set the MH folder.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1446 (if mh-seen-list
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1447 (let* ((unseen-seq (mh-find-seq mh-unseen-seq))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1448 (unseen-msgs (mh-seq-msgs unseen-seq)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1449 (if unseen-msgs
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1450 (progn
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1451 (mh-undefine-sequence mh-unseen-seq mh-seen-list)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1452 (run-hooks 'mh-unseen-updated-hook)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1453 (while mh-seen-list
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1454 (setq unseen-msgs (delq (car mh-seen-list) unseen-msgs))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1455 (setq mh-seen-list (cdr mh-seen-list)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1456 (setcdr unseen-seq unseen-msgs)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1457 t) ;since we set the folder
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1458 (setq mh-seen-list nil)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1459
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1460
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1461 (defun mh-delete-scan-msgs (msgs)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1462 ;; Delete the scan listing lines for each of the msgs in the LIST.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1463 (save-excursion
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1464 (while msgs
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1465 (if (mh-goto-msg (car msgs) t t)
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1466 (mh-delete-line 1))
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1467 (setq msgs (cdr msgs)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1468
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1469
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1470 (defun mh-outstanding-commands-p ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1471 ;; Returns non-nil if there are outstanding deletes or refiles.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1472 (or mh-delete-list mh-refile-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1473
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1474
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1475 (defun mh-coalesce-msg-list (messages)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1476 ;; Give a list of MESSAGES, return a list of message number ranges.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1477 ;; Sort of the opposite of mh-read-msg-list, which expands ranges.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1478 ;; Message lists passed to MH programs go through this so
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1479 ;; command line arguments won't exceed system limits.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1480 (let ((msgs (sort (copy-sequence messages) 'mh-greaterp))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1481 (range-high nil)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1482 (prev -1)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1483 (ranges nil))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1484 (while prev
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1485 (if range-high
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1486 (if (or (not (numberp prev))
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1487 (not (equal (car msgs) (1- prev))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1488 (progn ;non-sequential, flush old range
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1489 (if (eq prev range-high)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1490 (setq ranges (cons range-high ranges))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1491 (setq ranges (cons (format "%s-%s" prev range-high) ranges)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1492 (setq range-high nil))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1493 (or range-high
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1494 (setq range-high (car msgs))) ;start new or first range
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1495 (setq prev (car msgs))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1496 (setq msgs (cdr msgs)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1497 ranges))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1498
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1499 (defun mh-greaterp (msg1 msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1500 ;; Sort two message indicators. Strings are "smaller" than numbers.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1501 ;; Legal values are things like "cur", "last", 1, and 1820.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1502 (if (numberp msg1)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1503 (if (numberp msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1504 (> msg1 msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1505 t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1506 (if (numberp msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1507 nil
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1508 (string-lessp msg2 msg1))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1509
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1510 (defun mh-lessp (msg1 msg2)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1511 (not (mh-greaterp msg1 msg2)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1512
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1513
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1514 ;;; Basic sequence handling
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1515
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1516 (defun mh-delete-seq-locally (seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1517 ;; Remove mh-e's record of SEQUENCE.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1518 (let ((entry (mh-find-seq seq)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1519 (setq mh-seq-list (delq entry mh-seq-list))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1520
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1521 (defun mh-read-folder-sequences (folder save-refiles)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1522 ;; Read and return the predefined sequences for a FOLDER.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1523 ;; If SAVE-REFILES is non-nil, then keep the sequences
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1524 ;; that note messages to be refiled.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1525 (let ((seqs ()))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1526 (cond (save-refiles
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1527 (mh-mapc (function (lambda (seq) ; Save the refiling sequences
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1528 (if (mh-folder-name-p (mh-seq-name seq))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1529 (setq seqs (cons seq seqs)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1530 mh-seq-list)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1531 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1532 (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1533 (progn
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1534 ;; look for name in line of form "cur: 4" or "myseq (private): 23"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1535 (while (re-search-forward "^[^: ]+" nil t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1536 (setq seqs (cons (mh-make-seq (intern (buffer-substring
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1537 (match-beginning 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1538 (match-end 0)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1539 (mh-read-msg-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1540 seqs)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1541 (delete-region (point-min) (point))))) ; avoid race with mh-process-daemon
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1542 seqs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1543
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1544 (defun mh-read-msg-list ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1545 ;; Return a list of message numbers from the current point to the end of
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1546 ;; the line. Expands ranges into set of individual numbers.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1547 (let ((msgs ())
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1548 (end-of-line (save-excursion (end-of-line) (point)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1549 num)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1550 (while (re-search-forward "[0-9]+" end-of-line t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1551 (setq num (string-to-int (buffer-substring (match-beginning 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1552 (match-end 0))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1553 (cond ((looking-at "-") ; Message range
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1554 (forward-char 1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1555 (re-search-forward "[0-9]+" end-of-line t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1556 (let ((num2 (string-to-int (buffer-substring (match-beginning 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1557 (match-end 0)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1558 (if (< num2 num)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1559 (error "Bad message range: %d-%d" num num2))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1560 (while (<= num num2)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1561 (setq msgs (cons num msgs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1562 (setq num (1+ num)))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1563 ((not (zerop num)) ;"pick" outputs "0" to mean no match
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1564 (setq msgs (cons num msgs)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1565 msgs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1566
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1567 (defun mh-notate-user-sequences ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1568 ;; Mark the scan listing of all messages in user-defined sequences.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1569 (let ((seqs mh-seq-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1570 name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1571 (while seqs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1572 (setq name (mh-seq-name (car seqs)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1573 (if (not (mh-internal-seq name))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1574 (mh-notate-seq name mh-note-seq (1+ mh-cmd-note)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1575 (setq seqs (cdr seqs)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1576
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1577
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1578 (defun mh-internal-seq (name)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1579 ;; Return non-NIL if NAME is the name of an internal mh-e sequence.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1580 (or (memq name '(answered cur deleted forwarded printed))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1581 (eq name mh-unseen-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1582 (eq name mh-previous-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1583 (mh-folder-name-p name)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1584
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1585
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1586 (defun mh-delete-msg-from-seq (message sequence &optional internal-flag)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1587 "Delete MESSAGE from SEQUENCE.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1588 MESSAGE defaults to displayed message. From Lisp, optional third arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1589 INTERNAL-FLAG non-nil means do not inform MH of the change."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1590 (interactive (list (mh-get-msg-num t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1591 (mh-read-seq-default "Delete from" t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1592 nil))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1593 (let ((entry (mh-find-seq sequence)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1594 (cond (entry
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1595 (mh-notate-if-in-one-seq message ? (1+ mh-cmd-note) sequence)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1596 (if (not internal-flag)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1597 (mh-undefine-sequence sequence (list message)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1598 (setcdr entry (delq message (mh-seq-msgs entry)))))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1599
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1600
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1601 (defun mh-undefine-sequence (seq msgs)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1602 ;; Remove from the SEQUENCE the list of MSGS.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1603 (mh-exec-cmd "mark" mh-current-folder "-delete"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1604 "-sequence" (symbol-name seq)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1605 (mh-coalesce-msg-list msgs)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1606
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1607
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1608 (defun mh-define-sequence (seq msgs)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1609 ;; Define the SEQUENCE to contain the list of MSGS.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1610 ;; Do not mark pseudo-sequences or empty sequences.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1611 ;; Signals an error if SEQUENCE is an illegal name.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1612 (if (and msgs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1613 (not (mh-folder-name-p seq)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1614 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1615 (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1616 "-sequence" (symbol-name seq)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1617 (mh-coalesce-msg-list msgs)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1618
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1619
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1620 (defun mh-map-over-seqs (func seq-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1621 ;; Apply the FUNCTION to each element in the list of SEQUENCES,
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1622 ;; passing the sequence name and the list of messages as arguments.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1623 (while seq-list
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1624 (funcall func (mh-seq-name (car seq-list)) (mh-seq-msgs (car seq-list)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1625 (setq seq-list (cdr seq-list))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1626
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1627
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1628 (defun mh-notate-if-in-one-seq (msg notation offset seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1629 ;; If the MESSAGE is in only the SEQUENCE, then mark the scan listing of the
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1630 ;; message with the CHARACTER at the given OFFSET from the beginning of the
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1631 ;; listing line.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1632 (let ((in-seqs (mh-seq-containing-msg msg nil)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1633 (if (and (eq seq (car in-seqs)) (null (cdr in-seqs)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1634 (mh-notate msg notation offset))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1635
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1636
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1637 (defun mh-seq-containing-msg (msg &optional include-internal-p)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1638 ;; Return a list of the sequences containing MESSAGE.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1639 ;; If INCLUDE-INTERNAL-P non-nil, include mh-e internal sequences in list.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1640 (let ((l mh-seq-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1641 (seqs ()))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1642 (while l
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1643 (and (memq msg (mh-seq-msgs (car l)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1644 (or include-internal-p
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1645 (not (mh-internal-seq (mh-seq-name (car l)))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1646 (setq seqs (cons (mh-seq-name (car l)) seqs)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1647 (setq l (cdr l)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1648 seqs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1649
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1650
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1651
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1652
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1653 ;;; User prompting commands.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1654
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1655
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1656 (defun mh-read-msg-range (prompt)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1657 ;; Read a list of blank-separated items.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1658 (let* ((buf (read-string prompt))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1659 (buf-size (length buf))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1660 (start 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1661 (input ()))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1662 (while (< start buf-size)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1663 (let ((next (read-from-string buf start buf-size)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1664 (setq input (cons (car next) input))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1665 (setq start (cdr next))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1666 (nreverse input)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1667
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1668
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1669
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1670 ;;; Build the folder-mode keymap:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1671
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1672 (suppress-keymap mh-folder-mode-map)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1673
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1674 ;; Save the `b' binding for a future `back'. Maybe?
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1675 (gnus-define-keys mh-folder-mode-map
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1676 " " mh-page-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1677 "!" mh-refile-or-write-again
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1678 "," mh-header-display
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1679 "." mh-show ;alias
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1680 ">" mh-write-msg-to-file
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1681 "E" mh-extract-rejected-mail
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1682 "\177" mh-previous-page
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1683 "\C-d" mh-delete-msg-no-motion
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1684 "\e<" mh-first-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1685 "\e>" mh-last-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1686 "\ed" mh-redistribute
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1687 "\r" mh-show
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1688 "^" mh-refile-msg ;alias
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1689 "c" mh-copy-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1690 "d" mh-delete-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1691 "e" mh-edit-again
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1692 "f" mh-forward
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1693 "g" mh-goto-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1694 "i" mh-inc-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1695 "k" mh-delete-subject-thread
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1696 "l" mh-print-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1697 "m" mh-send ;alias
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1698 "n" mh-next-undeleted-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1699 "o" mh-refile-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1700 "p" mh-previous-undeleted-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1701 "q" mh-quit
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1702 "r" mh-reply
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1703 "s" mh-send
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1704 "t" mh-toggle-showing
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1705 "u" mh-undo
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1706 "x" mh-execute-commands
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1707 "|" mh-pipe-msg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1708
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1709 (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1710 "S" mh-sort-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1711 "f" mh-visit-folder ;alias
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1712 "k" mh-kill-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1713 "l" mh-list-folders
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1714 "o" mh-visit-folder ;alias
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1715 "p" mh-pack-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1716 "r" mh-rescan-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1717 "s" mh-search-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1718 "u" mh-undo-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1719 "v" mh-visit-folder)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1720
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1721 (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1722 "d" mh-delete-msg-from-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1723 "k" mh-delete-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1724 "l" mh-list-sequences
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1725 "n" mh-narrow-to-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1726 "p" mh-put-msg-in-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1727 "s" mh-msg-is-in-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1728 "w" mh-widen)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1729
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1730 (gnus-define-keys (mh-thread-map "T" mh-folder-mode-map)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1731 "d" mh-delete-subject-thread
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1732 "k" mh-delete-subject-thread
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1733 "s" mh-narrow-to-subject-thread
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1734 "t" mh-toggle-subject-thread
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1735 "u" mh-next-unseen-subject-thread)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1736
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1737 (gnus-define-keys (mh-extract-map "X" mh-folder-mode-map)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1738 "s" mh-store-msg ;shar
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1739 "u" mh-store-msg) ;uuencode
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1740
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1741 (gnus-define-keys (mh-digest-map "D" mh-folder-mode-map)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1742 " " mh-page-digest
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1743 "\177" mh-page-digest-backwards
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1744 "b" mh-burst-digest)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1745
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1746 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1747 ((not (null (save-match-data (string-match "XEmacs\\|Lucid" emacs-version))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1748 (define-key mh-folder-mode-map [button2] 'mh-show-mouse))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1749 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1750 (define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1751
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1752 ;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1753
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1754 ;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1755 ;;; Menus for folder mode: folder, message, sequence (in that order)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1756 ;;; folder-mode "Sequence" menu
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1757 (easy-menu-define
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1758 mh-folder-sequence-menu mh-folder-mode-map "Menu for mh-e folder-sequence."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1759 '("Sequence"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1760 ["Add Msg to Seq..." mh-put-msg-in-seq (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1761 ["List Seq's for Msg" mh-msg-is-in-seq (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1762 ["Delete Msg from Seq..." mh-delete-msg-from-seq (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1763 ["List Seq's in Folder..." mh-list-sequences t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1764 ["Delete Seq..." mh-delete-seq t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1765 ["Show Only Msgs in Seq..." mh-narrow-to-seq t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1766 ["Show All Msgs in Folder" mh-widen mh-narrowed-to-seq]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1767 "--"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1768 ["Toggle Subject Thread" mh-toggle-subject-thread t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1769 ["Narrow to Subject Thread" mh-narrow-to-subject-thread t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1770 ["Delete Rest of Subject Thread" mh-delete-subject-thread t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1771 ["Next Unseen Subject Thread" mh-next-unseen-subject-thread t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1772 "--"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1773 ["Push State Out to MH" mh-update-sequences t]))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1774
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1775 ;;; folder-mode "Message" menu
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1776 (easy-menu-define
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1777 mh-folder-message-menu mh-folder-mode-map "Menu for mh-e folder-message."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1778 '("Message"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1779 ["Show Msg" mh-show (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1780 ["Next Msg" mh-next-undeleted-msg t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1781 ["Previous Msg" mh-previous-undeleted-msg t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1782 ["Go to First Msg" mh-first-msg t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1783 ["Go to Last Msg" mh-last-msg t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1784 ["Go to Msg by Number..." mh-goto-msg t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1785 ["Delete Msg" mh-delete-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1786 ["Refile Msg" mh-refile-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1787 ["Undo Delete/Refile" mh-undo t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1788 ["Process Delete/Refile" mh-execute-commands
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1789 (or mh-refile-list mh-delete-list)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1790 "--"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1791 ["Compose a New Msg" mh-send t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1792 ["Reply to Msg..." mh-reply (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1793 ["Forward Msg..." mh-forward (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1794 ["Redistribute Msg..." mh-redistribute (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1795 ["Edit Msg Again" mh-edit-again (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1796 ["Re-edit a Bounced Msg" mh-extract-rejected-mail t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1797 "--"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1798 ["Refile Msg in Folder..." mh-refile-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1799 ["Copy Msg to Folder..." mh-copy-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1800 ["Print Msg" mh-print-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1801 ["Write Msg to File..." mh-write-msg-to-file (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1802 ["Pipe Msg to Command..." mh-pipe-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1803 ["Unpack Uuencoded Msg..." mh-store-msg (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1804 ["Show Msg with Header" mh-header-display (mh-get-msg-num nil)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1805 ["Burst Digest Msg" mh-burst-digest (mh-get-msg-num nil)]))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1806
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1807 ;;; folder-mode "Folder" menu
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1808 (easy-menu-define
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1809 mh-folder-folder-menu mh-folder-mode-map "Menu for mh-e folder."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1810 '("Folder"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1811 ["Incorporate New Mail" mh-inc-folder t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1812 ["Toggle Show/Folder" mh-toggle-showing t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1813 ["Execute Delete/Refile" mh-execute-commands
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1814 (or mh-refile-list mh-delete-list)]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1815 ["Rescan Folder" mh-rescan-folder t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1816 ["Pack Folder" mh-pack-folder t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1817 ["Sort Folder" mh-sort-folder t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1818 "--"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1819 ["Search a Folder..." mh-search-folder t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1820 ["Visit a Folder..." mh-visit-folder t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1821 ["List Folders" mh-list-folders t]
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1822 ["Quit MH-E" mh-quit t]))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1823
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1824
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1825 ;;; Support for emacs21 toolbar using gnus/message.el icons (and code).
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1826 (eval-when-compile (defvar tool-bar-map))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1827 (when (and (fboundp 'tool-bar-add-item)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1828 tool-bar-mode)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1829 (defvar mh-folder-tool-bar-map
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1830 (let ((tool-bar-map (make-sparse-keymap)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1831 (tool-bar-add-item "mail" 'mh-inc-folder 'mh-folder-inc-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1832 :help "Incorporate new mail in Inbox")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1833
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1834 (tool-bar-add-item "left_arrow" 'mh-previous-undeleted-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1835 'mh-folder-prev :help "Previous message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1836 (tool-bar-add-item "page-down" 'mh-page-msg 'mh-folder-page
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1837 :help "Page this message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1838 (tool-bar-add-item "right_arrow" 'mh-next-undeleted-msg 'mh-folder-next
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1839 :help "Next message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1840
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1841 (tool-bar-add-item "close" 'mh-delete-msg 'mh-folder-delete
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1842 :help "Mark for deletion")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1843 (tool-bar-add-item "refile" 'mh-refile-msg 'mh-folder-refile
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1844 :help "Refile this message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1845 (tool-bar-add-item "undo" 'mh-undo 'mh-folder-undo
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1846 :help "Undo this mark")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1847 (tool-bar-add-item "execute" 'mh-execute-commands 'mh-folder-exec
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1848 :help "Perform moves and deletes")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1849
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1850 (tool-bar-add-item "show" 'mh-toggle-showing 'mh-folder-toggle-show
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1851 :help "Toggle showing message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1852
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1853 (tool-bar-add-item "mail/reply2" 'mh-reply 'mh-folder-reply
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1854 :help "Reply to this message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1855 (tool-bar-add-item "mail_compose" 'mh-send 'mh-folder-compose
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1856 :help "Compose new message")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1857
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1858 (tool-bar-add-item "rescan" 'mh-rescan-folder 'mh-folder-rescan
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1859 :help "Rescan this folder")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1860 (tool-bar-add-item "repack" 'mh-pack-folder 'mh-folder-pack
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1861 :help "Repack this folder")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1862
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1863 (tool-bar-add-item "search" 'mh-search-folder 'mh-folder-search
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1864 :help "Search this folder")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1865 (tool-bar-add-item "fld_open" 'mh-visit-folder 'mh-folder-visit
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1866 :help "Visit other folder")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1867
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1868 (tool-bar-add-item "preferences" (lambda ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1869 (interactive)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1870 (customize-group "mh"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1871 'mh-folder-customize
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1872 :help "mh-e preferences")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1873 (tool-bar-add-item "help" (lambda ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1874 (interactive)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1875 (Info-goto-node "(mh-e)Top"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1876 'mh-folder-help :help "Help")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1877 tool-bar-map))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1878
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1879 (defvar mh-folder-seq-tool-bar-map
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1880 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1881 (tool-bar-add-item "widen" 'mh-widen 'mh-folder-widen
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1882 :help "Widen from this sequence")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1883 tool-bar-map)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1884 "Tool-bar to use when narrowed to a sequence in MH-Folder buffers.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1885 )
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1886
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1887 ;;;autoload the other mh-e parts
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1888
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1889 ;;; mh-comp
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1890
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1891 (autoload 'mh-smail "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1892 "Compose and send mail with the MH mail system.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1893 This function is an entry point to mh-e, the Emacs front end
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1894 to the MH mail system.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1895 See documentation of `\\[mh-send]' for more details on composing mail." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1896
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1897 (autoload 'mh-smail-other-window "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1898 "Compose and send mail in other window with the MH mail system.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1899 This function is an entry point to mh-e, the Emacs front end
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1900 to the MH mail system.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1901 See documentation of `\\[mh-send]' for more details on composing mail." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1902
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1903 (autoload 'mh-edit-again "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1904 "Clean-up a draft or a message previously sent and make it resendable.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1905 Default is the current message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1906 The variable mh-new-draft-cleaned-headers specifies the headers to remove.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1907 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1908
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1909 (autoload 'mh-extract-rejected-mail "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1910 "Extract a letter returned by the mail system and make it resendable.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1911 Default is the current message. The variable mh-new-draft-cleaned-headers
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1912 gives the headers to clean out of the original message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1913 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1914
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1915 (autoload 'mh-forward "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1916 "Forward a message or message sequence. Defaults to displayed message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1917 If optional prefix argument provided, then prompt for the message sequence.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1918 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1919
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1920 (autoload 'mh-redistribute "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1921 "Redistribute a letter.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1922 Depending on how your copy of MH was compiled, you may need to change the
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1923 setting of the variable mh-redist-full-contents. See its documentation." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1924
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1925 (autoload 'mh-reply "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1926 "Reply to a MESSAGE (default: displayed message).
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1927 If optional prefix argument INCLUDEP provided, then include the message
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1928 in the reply using filter mhl.reply in your MH directory.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1929 Prompts for type of addresses to reply to:
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1930 from sender only,
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1931 to sender and primary recipients,
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1932 cc/all sender and all recipients.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1933 If the file named by `mh-repl-formfile' exists, it is used as a skeleton
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1934 for the reply. See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1935
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1936 (autoload 'mh-send "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1937 "Compose and send a letter.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1938 The file named by `mh-comp-formfile' will be used as the form.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1939 Do not call this function from outside mh-e; use \\[mh-smail] instead.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1940 The letter is composed in mh-letter-mode; see its documentation for more
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1941 details. If `mh-compose-letter-function' is defined, it is called on the
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1942 draft and passed three arguments: to, subject, and cc." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1943
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1944 (autoload 'mh-send-other-window "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1945 "Compose and send a letter in another window.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1946 Do not call this function from outside mh-e;
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1947 use \\[mh-smail-other-window] instead.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1948 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1949
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1950 (autoload 'mh-letter-mode "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1951 "Mode for composing letters in mh-e.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1952 For more details, type \\[describe-mode] while in MH-Letter mode." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1953
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1954
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1955 ;;; mh-funcs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1956
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1957 (autoload 'mh-burst-digest "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1958 "Burst apart the current message, which should be a digest.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1959 The message is replaced by its table of contents and the messages from the
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1960 digest are inserted into the folder after that message." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1961
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1962 (autoload 'mh-copy-msg "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1963 "Copy to another FOLDER the specified MESSAGE(s) without deleting them.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1964 Default is the displayed message. If optional prefix argument is
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1965 provided, then prompt for the message sequence." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1966
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1967 (autoload 'mh-kill-folder "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1968 "Remove the current folder." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1969
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1970 (autoload 'mh-list-folders "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1971 "List mail folders." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1972
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1973 (autoload 'mh-pack-folder "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1974 "Renumber the messages of a folder to be 1..n.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1975 First, offer to execute any outstanding commands for the current folder.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1976 If optional prefix argument provided, prompt for the range of messages
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1977 to display after packing. Otherwise, show the entire folder." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1978
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1979 (autoload 'mh-pipe-msg "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1980 "Pipe the current message through the given shell COMMAND.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1981 If INCLUDE-HEADERS (prefix argument) is provided, send the entire message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1982 Otherwise just send the message's body without the headers." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1983
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1984 (autoload 'mh-page-digest "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1985 "Advance displayed message to next digested message." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1986
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1987 (autoload 'mh-page-digest-backwards "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1988 "Back up displayed message to previous digested message." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1989
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1990 (autoload 'mh-print-msg "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1991 "Print MESSAGE(s) (default: displayed message) on printer.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1992 If optional prefix argument provided, then prompt for the message sequence.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1993 The variable mh-lpr-command-format is used to generate the print command.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1994 The messages are formatted by mhl. See the variable mhl-formfile." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1995
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1996 (autoload 'mh-sort-folder "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1997 "Sort the messages in the current folder by date.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1998 Calls the MH program sortm to do the work.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1999 The arguments in the list mh-sortm-args are passed to sortm
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2000 if this function is passed an argument." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2001
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2002 (autoload 'mh-undo-folder "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2003 "Undo all commands in current folder." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2004
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2005 (autoload 'mh-store-msg "mh-funcs"
6855
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
2006 "Store the file(s) contained in the current message into DIRECTORY.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2007 The message can contain a shar file or uuencoded file.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2008 Default directory is the last directory used, or initially the value of
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2009 mh-store-default-directory or the current directory." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2010
6855
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
2011 (autoload 'mh-store-buffer "mh-funcs"
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
2012 "Store the file(s) contained in the current buffer into DIRECTORY.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2013 The buffer can contain a shar file or uuencoded file.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2014 Default directory is the last directory used, or initially the value of
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2015 `mh-store-default-directory' or the current directory." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2016
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2017
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2018 ;;; mh-pick
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2019
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2020 (autoload 'mh-search-folder "mh-pick"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2021 "Search FOLDER for messages matching a pattern.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2022 Add the messages found to the sequence named `search'." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2023
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2024 ;;; mh-seq
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2025
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2026 (autoload 'mh-region-to-sequence "mh-seq"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2027 "Define sequence 'region as the messages in selected region." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2028 (autoload 'mh-delete-seq "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2029 "Delete the SEQUENCE." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2030 (autoload 'mh-list-sequences "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2031 "List the sequences defined in FOLDER." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2032 (autoload 'mh-msg-is-in-seq "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2033 "Display the sequences that contain MESSAGE (default: displayed message)." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2034 (autoload 'mh-narrow-to-seq "mh-seq"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2035 "Restrict display of this folder to just messages in SEQUENCE
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2036 Use \\[mh-widen] to undo this command." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2037 (autoload 'mh-put-msg-in-seq "mh-seq"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2038 "Add MESSAGE(s) (default: displayed message) to SEQUENCE.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2039 If optional prefix argument provided, then prompt for the message sequence." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2040 (autoload 'mh-widen "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2041 "Remove restrictions from current folder, thereby showing all messages." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2042 (autoload 'mh-rename-seq "mh-seq"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2043 "Rename SEQUENCE to have NEW-NAME." t)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2044 (autoload 'mh-narrow-to-subject-thread "mh-seq"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2045 "Narrow to a sequence containing all following messages with same subject."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2046 t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2047 (autoload 'mh-toggle-subject-thread "mh-seq"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2048 "Narrow to or widen from a sequence containing current subject sequence." t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2049 (autoload 'mh-delete-subject-thread "mh-seq"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2050 "Mark all following messages with same subject to be deleted." t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2051 (autoload 'mh-next-unseen-subject-thread "mh-seq"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2052 "Get the next unseen subject thread." t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2053
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2054
29078
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2055 (dolist (mess '("^Cursor not pointing to message$"
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2056 "^There is no other window$"))
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2057 (add-to-list 'debug-ignored-errors mess))
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2058
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2059 ;;; mh-e.el ends here