annotate lisp/mail/mh-e.el @ 48949:f216c93c4189

(customize-save-variable): Take themes into account. (custom-variable-save): Take themes into account. (custom-variable-reset-saved): Add comment-widget. (custom-variable-reset-standard): Add comment-widget. (custom-variable-reset-standard): Take themes into account. (custom-face-save): Take themes into account. (custom-face-reset-standard): Take themes into account. (custom-save-variables): Take themes into account. (custom-save-faces): Take themes into account. (custom-save-faces): Take themes into account. (custom-save-resets): New function. (custom-save-loaded-themes): New function. (customize-save-customized): Take themes into account.
author Richard M. Stallman <rms@gnu.org>
date Mon, 23 Dec 2002 18:40:24 +0000
parents 8aaba207e44b
children 30c4902b654d
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>
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
7 ;; Version: 7.0
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
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
43 ;; Questions posting there for information on getting MH and MH-E:
47730
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
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
47 ;; features necessary for MH-E will be missing from MH commands, specifically
14169
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
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
50 ;; MH-E is an Emacs interface to the MH mail system.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
51
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
52 ;; MH-E is supported in GNU Emacs 20 and 21, with MH 6.8.4 and nmh 1.0.4.
47730
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
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
82 ;; $Id: mh-e.el,v 1.198 2002/11/29 15:33:37 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
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
86 (require 'cl)
6365
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)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
90 (if mh-xemacs-flag
47730
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
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
93 ;; Shush the byte-compiler
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
94 (defvar font-lock-auto-fontify)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
95 (defvar font-lock-defaults)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
96 (defvar tool-bar-mode)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
97
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
98 (defconst mh-version "7.0" "Version number of MH-E.")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
99
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
100 ;;; Initial Autoloads
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
101 ;;; The autoloads for mh-undo-folder, mh-widen and mh-reply are needed before
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
102 ;;; they are used to avoid compiler warnings.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
103 (autoload 'mh-undo-folder "mh-funcs"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
104 "Undo all commands in current folder." t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
105 (autoload 'mh-widen "mh-seq"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
106 "Remove restrictions from current folder, thereby showing all messages." t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
107 (autoload 'mh-reply "mh-comp"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
108 "Reply to a MESSAGE (default: displayed message).
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
109 If optional prefix argument INCLUDEP provided, then include the message
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
110 in the reply using filter mhl.reply in your MH directory.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
111 Prompts for type of addresses to reply to:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
112 from sender only,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
113 to sender and primary recipients,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
114 cc/all sender and all recipients.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
115 If the file named by `mh-repl-formfile' exists, it is used as a skeleton
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
116 for the reply. See also documentation for `\\[mh-send]' function." t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
117 (autoload 'mh-map-to-seq-msgs "mh-seq")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
118 (autoload 'mh-notate-seq "mh-seq")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
119 (autoload 'mh-destroy-postponed-handles "mh-mime")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
120 (autoload 'mh-press-button "mh-mime")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
121 (autoload 'mh-mime-save-part "mh-mime")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
122 (autoload 'mh-mime-inline-part "mh-mime")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
123 (autoload 'mh-mime-save-parts "mh-mime")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
124 (autoload 'mh-thread-inc "mh-seq")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
125 (autoload 'mh-thread-forget-message "mh-seq")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
126 (autoload 'mh-thread-add-spaces "mh-seq")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
127
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
128 (autoload 'Info-goto-node "info")
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
131
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 ;;; Hooks:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
134 (defgroup mh nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
135 "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
136 :group 'mail)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
138 (defgroup mh-hook nil
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
139 "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
140 :prefix "mh-"
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
141 :group 'mh)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
142
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
143 (defcustom mh-folder-mode-hook nil
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
144 "Invoked in `mh-folder-mode' on a new folder."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
145 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
146 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
148 (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
149 "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
150 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
151 :group 'mh-hook)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
152
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
153 (defcustom mh-folder-updated-hook nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
154 "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
155 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
156 `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
157 current folder, `mh-current-folder'."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
158 :type 'hook
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
159 :group 'mh-hook)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
160
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
161 (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
162 "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
163 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
164 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
166 (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
167 "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
168 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
169 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
171 (defcustom mh-folder-list-change-hook nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
172 "Invoked whenever the cached folder list `mh-folder-list' is changed."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
173 :type 'hook
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
174 :group 'mh-hook)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
175
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
176 (defcustom mh-before-quit-hook nil
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
177 "Invoked by \\<mh-folder-mode-map>`\\[mh-quit]' before quitting MH-E.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
178 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
179 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
180 :group 'mh-hook)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
181
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
182 (defcustom mh-quit-hook nil
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
183 "Invoked after \\<mh-folder-mode-map>`\\[mh-quit]' quits MH-E.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
184 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
185 :type 'hook
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
186 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
188 (defcustom mh-unseen-updated-hook nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
189 "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
190 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
191 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
192 :type 'hook
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
193 :group 'mh-hook)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 ;;; Personal preferences:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
197 (defcustom mh-lpr-command-format "lpr -J '%s'"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 "*Format for Unix command that prints a message.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 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
200 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
201 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
202 :type 'string
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
203 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
205 (defcustom mh-scan-prog "scan"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206 "*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
207 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
208 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
209 :type 'string
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
210 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211 (make-variable-buffer-local 'mh-scan-prog)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
213 (defcustom mh-inc-prog "inc"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 "*Program to run to incorporate new mail into a folder.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215 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
216 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
217 :type 'string
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
218 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
220 (defcustom mh-print-background-flag nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
221 "*Non-nil means messages should be printed in the background.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 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
223 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
224 :type 'boolean
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
225 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
227 (defcustom mh-recenter-summary-flag nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
228 "*Non-nil means to recenter the summary window.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
229
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
230 Recenter the summary window when the show window is toggled off if non-nil."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
231 :type 'boolean
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
232 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
234 (defcustom mh-do-not-confirm-flag nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
235 "*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
236 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
237 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
238 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
239 question."
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
240 :type 'boolean
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
241 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242
17422
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
243 (defcustom mh-store-default-directory nil
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 "*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
245 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
246 :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
247 directory)
4042e903985b Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 15271
diff changeset
248 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
250 (defvar mh-note-deleted "D"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
251 "String whose first character is used to notate deleted messages.")
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
252
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
253 (defvar mh-note-refiled "^"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
254 "String whose first character is used to notate refiled messages.")
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
255
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
256 (defvar mh-note-cur "+"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
257 "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
258
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 (defvar mh-partial-folder-mode-line-annotation "select"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 "Annotation when displaying part of a folder.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
261 The string is displayed after the folder's name. nil for no annotation.")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
262
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
263 ;;; Parameterize MH-E to work with different scan formats. The defaults work
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
264 ;;; 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
265 ;;; 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
266
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
267 (defcustom mh-scan-format-file t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
268 "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
269 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
270 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
271 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
272
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
273 If you customize the scan format, you may need to modify a few variables
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
274 containing regexps that MH-E uses to identify specific portions of the output.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
275 Use `M-x apropos RET mh-scan.*regexp' to obtain a list of these variables. You
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
276 may also have to call `mh-set-cmd-note' with the width of your message
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
277 numbers. See also `mh-adaptive-cmd-note-flag'."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
278 :type '(choice (const :tag "Use MH-E scan format" t)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
279 (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
280 (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
281 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
282
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
283 ;; 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
284 ;; 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
285 ;; except the later one makes use of the nmh `decode' function to
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
286 ;; decode RFC 2047 encodings. If you just want to change the width of
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
287 ;; the msg number, use the `mh-set-cmd-note' function.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
288
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
289 (defvar mh-scan-format-mh
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
290 (concat
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
291 "%4(msg)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
292 "%<(cur)+%| %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
293 "%<{replied}-"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
294 "%?(nonnull(comp{to}))%<(mymbox{to})t%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
295 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
296 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
297 "%?(nonnull(comp{newsgroups}))n%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
298 "%<(zero) %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
299 "%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
300 "%<(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
301 "%<(zero)%17(friendly{from})%> "
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
302 "%{subject}%<{body}<<%{body}%>")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
303 "*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
304 This format is identical to the default except that additional hints for
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
305 fontification have been added to the fifth column (remember that in Emacs, the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
306 first column is 0).
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
307
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
308 The values of the fifth column, in priority order, are: `-' if the
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
309 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
310 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
311 `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
312 is present.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
313
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
314 (defvar mh-scan-format-nmh
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
315 (concat
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
316 "%4(msg)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
317 "%<(cur)+%| %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
318 "%<{replied}-"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
319 "%?(nonnull(comp{to}))%<(mymbox{to})t%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
320 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
321 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
322 "%?(nonnull(comp{newsgroups}))n%>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
323 "%<(zero) %>"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
324 "%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
325 "%<(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
326 "%<(zero)%17(decode(friendly{from}))%> "
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
327 "%(decode{subject})%<{body}<<%{body}%>")
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
328 "*Scan format string for nmh.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
329 This string is passed to the scan program via the -format arg.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
330 This format is identical to the default except that additional hints for
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
331 fontification have been added to the fifth column (remember that in Emacs, the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
332 first column is 0).
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
333
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
334 The values of the fifth column, in priority order, are: `-' if the
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
335 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
336 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
337 `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
338 is present.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
339
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
340 (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
341 "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
342 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
343 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
344
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
345 (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
346 "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
347 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
348 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
349
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
350 (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
351 "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
352 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
353 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
354
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
355 (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
356 "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
357
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
358 (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
359 "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
360 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
361 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
362 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
363
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
364 (defvar mh-scan-cur-msg-regexp "^\\( *[0-9]+\\+DISABLED.*\\)"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
365 "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
366 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
367 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
368 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
369
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
370 (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
371 "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
372 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
373 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
374 \(see `mh-scan-format-regexp').")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
375
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
376 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
377 "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
378 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
379 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
380 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
381 the recipient's name.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
382
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
383 (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
384 "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
385 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
386 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
387
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
388 (defvar mh-scan-subject-regexp
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
389 ;;"^ *[0-9]+........[ ]*...................\\([Rr][Ee]:\\s-*\\)*\\([^<\n]*\\)"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
390 "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
391 "*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
392 The default `mh-folder-font-lock-keywords' expects this expression to contain
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
393 at least tree parenthesized expressions. The first is expected to match the Re:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
394 string, if any. The second matches an optional bracketed number after Re,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
395 such as in Re[2]: and the third is expected to match the subject line itself.")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
396
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
397 (defvar mh-scan-format-regexp
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
398 (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
399 "Regexp matching the output of scan.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
400 The default value is based upon the default values of either
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
401 `mh-scan-format-mh' or `mh-scan-format-nmh'.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
402 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
403 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
404 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
405 third should match the user name.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
406
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
407 (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
408 "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
409 (defface mh-folder-followup-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
410 '((((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
411 (:foreground "blue3"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
412 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
413 (:foreground "LightGoldenRod"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
414 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
415 (:bold t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
416 "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
417 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
418 (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
419 "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
420 (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
421 (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
422 "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
423 (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
424
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
425 (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
426 "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
427 (defface mh-folder-date-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
428 '((((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
429 (:foreground "snow4"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
430 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
431 (:foreground "snow3"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
432 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
433 (:bold t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
434 "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
435 :group 'mh)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
436
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
437 (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
438 "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
439 (defface mh-folder-msg-number-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
440 '((((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
441 (:foreground "snow4"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
442 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
443 (:foreground "snow3"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
444 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
445 (:bold t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
446 "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
447 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
448
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
449 (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
450 "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
451 (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
452
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
453 (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
454 "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
455 (defface mh-folder-cur-msg-face
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
456 '((((type tty pc) (class color))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
457 (:background "LightGreen"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
458 (((class color) (background light))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
459 (: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
460 ;;; (:underline t) ;Use this for underlining
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
461 )
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
462 (((class color) (background dark))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
463 (:background "DarkOliveGreen4"))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
464 (t (:underline t)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
465 "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
466 :group 'mh)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
467
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
468 ;;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
469 ;;for mh-show-subject-face.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
470
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
471 (defvar mh-folder-refiled-face 'mh-folder-refiled-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
472 "Face for highlighting refiled messages in MH-Folder buffers.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
473 (defface mh-folder-refiled-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
474 '((((type tty) (class color)) (:foreground "yellow" :weight light))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
475 (((class grayscale) (background light))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
476 (:foreground "Gray90" :bold t :italic t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
477 (((class grayscale) (background dark))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
478 (:foreground "DimGray" :bold t :italic t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
479 (((class color) (background light)) (:foreground "DarkGoldenrod"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
480 (((class color) (background dark)) (:foreground "LightGoldenrod"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
481 (t (:bold t :italic t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
482 "Face for highlighting refiled messages in MH-Folder buffers."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
483 :group 'mh)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
484
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
485 (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
486 "Face for highlighting the current message in MH-Folder buffers.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
487 (defface mh-folder-cur-msg-number-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
488 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
489 (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
490 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
491 (((class color) (background light)) (:foreground "Purple"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
492 (((class color) (background dark)) (:foreground "Cyan"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
493 (t (:bold t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
494 "Face for highlighting the current message in MH-Folder buffers."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
495 :group 'mh)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
496
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
497 (defvar mh-folder-to-face 'mh-folder-to-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
498 "Face for highlighting the To: string in MH-Folder buffers.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
499 (defface mh-folder-to-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
500 '((((type tty) (class color)) (:foreground "green"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
501 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
502 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
503 (((class color) (background light)) (:foreground "RosyBrown"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
504 (((class color) (background dark)) (:foreground "LightSalmon"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
505 (t (:italic t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
506 "Face for highlighting the To: string in MH-Folder buffers."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
507 :group 'mh)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
508
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
509 (defvar mh-folder-body-face 'mh-folder-body-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
510 "Face for highlighting body text in MH-Folder buffers.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
511 (defface mh-folder-body-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
512 '((((type tty) (class color)) (:foreground "green"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
513 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
514 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
515 (((class color) (background light)) (:foreground "RosyBrown"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
516 (((class color) (background dark)) (:foreground "LightSalmon"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
517 (t (:italic t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
518 "Face for highlighting body text in MH-Folder buffers."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
519 :group 'mh)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
520
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
521 (defvar mh-folder-font-lock-keywords
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
522 (list
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
523 ;; Marked for deletion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
524 (list (concat mh-scan-deleted-msg-regexp ".*")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
525 '(0 mh-folder-deleted-face))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
526 ;; Marked for refile
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
527 (list (concat mh-scan-refiled-msg-regexp ".*")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
528 '(0 mh-folder-refiled-face))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
529 ;;after subj
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
530 (list mh-scan-body-regexp '(1 mh-folder-body-face nil t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
531 '(mh-folder-font-lock-subject
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
532 (1 mh-folder-followup-face append t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
533 (2 mh-folder-subject-face append t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
534 ;;current msg
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
535 (list mh-scan-cur-msg-number-regexp
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
536 '(1 mh-folder-cur-msg-number-face))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
537 (list mh-scan-good-msg-regexp
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
538 '(1 mh-folder-msg-number-face)) ;; Msg number
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
539 (list mh-scan-date-regexp '(1 mh-folder-date-face)) ;; Date
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
540 (list mh-scan-rcpt-regexp
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
541 '(1 mh-folder-to-face) ;; To:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
542 '(2 mh-folder-address-face)) ;; address
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
543 ;; scan font-lock name
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
544 (list mh-scan-format-regexp
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
545 '(1 mh-folder-date-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
546 '(3 mh-folder-scan-format-face))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
547 ;; Current message line
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
548 (list mh-scan-cur-msg-regexp
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
549 '(1 mh-folder-cur-msg-face prepend t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
550 ;; Unseen messages in bold
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
551 '(mh-folder-font-lock-unseen (1 'bold append t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
552 )
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
553 "Regexp keywords used to fontify the MH-Folder buffer.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
554
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
555 (defvar mh-scan-cmd-note-width 1
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
556 "Number of columns consumed by the cmd-note field in `mh-scan-format'.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
557 This column will have one of the values: ` ', `D', `^', `+' and where
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
558 ` ' is the default value,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
559 `D' is the `mh-note-deleted' character,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
560 `^' is the `mh-note-refiled' character, and
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
561 `+' is the `mh-note-cur' character.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
562
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
563 (defvar mh-scan-destination-width 1
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
564 "Number of columns consumed by the destination field in `mh-scan-format'.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
565 This column will have one of ' ', '%', '-', 't', 'c', 'b', or `n' in it.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
566 A ' ' blank space is the default character.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
567 A '%' indicates that the message in in a named MH sequence.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
568 A '-' indicates that the message has been annotated with a replied field.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
569 A 't' indicates that the message contains mymbox in the To: field.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
570 A 'c' indicates that the message contains mymbox in the Cc: field.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
571 A 'b' indicates that the message contains mymbox in the Bcc: field.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
572 A 'n' indicates that the message contains a Newsgroups: field.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
573
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
574 (defvar mh-scan-date-width 5
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
575 "Number of columns consumed by the date field in `mh-scan-format'.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
576 This column will typically be of the form mm/dd.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
577
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
578 (defvar mh-scan-date-flag-width 1
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
579 "Number of columns consumed to flag (in)valid dates in `mh-scan-format'.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
580 This column will have ` ' for valid and `*' for invalid or missing dates.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
581
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
582 (defvar mh-scan-from-mbox-width 17
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
583 "Number of columns consumed with the \"From:\" line in `mh-scan-format'.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
584 This column will have a friendly name or e-mail address of the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
585 originator, or a \"To: address\" for outgoing e-mail messages.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
586
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
587 (defvar mh-scan-from-mbox-sep-width 2
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
588 "Number of columns consumed by whitespace after from-mbox in `mh-scan-format'.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
589 This column will only ever have spaces in it.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
590
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
591 (defvar mh-scan-field-from-start-offset
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
592 (+ mh-scan-cmd-note-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
593 mh-scan-destination-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
594 mh-scan-date-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
595 mh-scan-date-flag-width)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
596 "The offset from the `mh-cmd-note' to find the start of \"From:\" address.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
597
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
598 (defvar mh-scan-field-from-end-offset
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
599 (+ mh-scan-field-from-start-offset mh-scan-from-mbox-width)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
600 "The offset from the `mh-cmd-note' to find the end of \"From:\" address.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
601
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
602 (defvar mh-scan-field-subject-start-offset
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
603 (+ mh-scan-cmd-note-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
604 mh-scan-destination-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
605 mh-scan-date-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
606 mh-scan-date-flag-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
607 mh-scan-from-mbox-width
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
608 mh-scan-from-mbox-sep-width)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
609 "The offset from the `mh-cmd-note' to find the start of the subject.")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
610
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
611 (defun mh-folder-font-lock-subject (limit)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
612 "Return MH-E scan subject strings to font-lock between point and LIMIT."
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
613 (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
614 nil
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
615 (if (match-beginning 1)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
616 (set-match-data (list (match-beginning 1) (match-end 3)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
617 (match-beginning 1) (match-end 3) nil nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
618 (set-match-data (list (match-beginning 3) (match-end 3)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
619 nil nil (match-beginning 3) (match-end 3))))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
620 t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
621
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
622
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
623
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
624 ;; Fontifify unseen mesages in bold.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
625
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
626 (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
627 "Name of unseen sequence.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
628 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
629 On nmh systems.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
630
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
631 (defun mh-folder-unseen-seq-name ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
632 "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
633 (or mh-progs (mh-find-path))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
634 (save-excursion
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
635 (let ((unseen-seq-name "unseen"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
636 (with-temp-buffer
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
637 (unwind-protect
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
638 (progn
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
639 (call-process (expand-file-name "mhparam" mh-progs)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
640 nil '(t t) nil "-component" "Unseen-Sequence")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
641 (goto-char (point-min))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
642 (if (re-search-forward "Unseen-Sequence: \\(.*\\)$" nil t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
643 (setq unseen-seq-name (match-string 1))))))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
644 unseen-seq-name)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
645
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
646 (defun mh-folder-unseen-seq-list ()
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
647 "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
648 (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
649 (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
650 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
651 ((not mh-folder-unseen-seq-name)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
652 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
653 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
654 (let ((folder mh-current-folder))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
655 (save-excursion
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
656 (with-temp-buffer
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
657 (unwind-protect
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
658 (progn
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
659 (call-process (expand-file-name "mark" mh-progs)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
660 nil '(t t) nil
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
661 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
662 "-list")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
663 (goto-char (point-min))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
664 (sort (mh-read-msg-list) '<)))))))))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
665
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
666 (defvar mh-folder-unseen-seq-cache nil
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
667 "Internal cache variable used for font-lock in MH-E.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
668 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
669 is done highlighting.")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
670 (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
671
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
672 (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
673 "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
674 (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
675 (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
676 (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
677 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
678 ((not mh-folder-unseen-seq-cache)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
679 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
680 ((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
681 (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
682 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
683 ((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
684 (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
685 (epoint (progn (forward-line 1)(point))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
686 (if (<= limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
687 (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
688 (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
689 t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
690 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
691 ;; 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
692 (while (and
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
693 (= 0 (forward-line 1))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
694 (> limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
695 (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
696 ;; 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
697 (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
698 (cond
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
699 ((or (not cur-msg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
700 (<= limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
701 (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
702 (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
703 nil)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
704 ((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
705 (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
706 (epoint (progn (forward-line 1)(point))))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
707 (if (<= limit (point))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
708 (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
709 (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
710 t))))))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
711
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
712
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
713
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714 ;;; Internal variables:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
716 (defvar mh-last-destination nil) ;Destination of last refile or write
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
717 ;command.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
718 (defvar mh-last-destination-folder nil) ;Destination of last refile command.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
719 (defvar mh-last-destination-write nil) ;Destination of last write command.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
720
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
721 (defvar mh-folder-mode-map (make-keymap)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722 "Keymap for MH folders.")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
723
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
724 (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
725
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
726 (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
727
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
728 (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
729
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
730 (defvar mh-narrowed-to-seq nil) ;Sequence display is narrowed to or
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
731 ;nil if not narrowed.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
732
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
733 (defvar mh-view-ops ()) ;Stack of ops that change the folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
734 ;view (such as narrowing or threading).
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
735
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
736 (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
737
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
738 (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
739
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
740 (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
741
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
742 ;;; Macros and generic functions:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
743
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
744 (defun mh-mapc (function list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
745 "Apply FUNCTION to each element of LIST for side effects only."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
746 (while list
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
747 (funcall function (car list))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748 (setq list (cdr list))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
750 (defun mh-scan-format ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
751 "Return \"-format\" argument for the scan program."
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
752 (if (equal mh-scan-format-file t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
753 (list "-format" (if mh-nmh-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
754 (list (mh-update-scan-format
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
755 mh-scan-format-nmh mh-cmd-note))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
756 (list (mh-update-scan-format
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
757 mh-scan-format-mh mh-cmd-note))))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
758 (if (not (equal mh-scan-format-file nil))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
759 (list "-format" mh-scan-format-file))))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
760
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
761
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
762
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
763 ;;; Entry points:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
764
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765 ;;;###autoload
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
766 (defun mh-rmail (&optional arg)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
767 "Inc(orporate) new mail with MH.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
768 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E,
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
769 the Emacs front end to the MH mail system."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
770 (interactive "P")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
771 (mh-find-path)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
772 (if arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
773 (call-interactively 'mh-visit-folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
774 (mh-inc-folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
775
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
776 ;;;###autoload
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
777 (defun mh-nmail (&optional arg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
778 "Check for new mail in inbox folder.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
779 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E,
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
780 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
781 (interactive "P")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
782 (mh-find-path) ; init mh-inbox
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
783 (if arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
784 (call-interactively 'mh-visit-folder)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
785 (mh-visit-folder mh-inbox)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
786
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
787
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
788
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
789 ;;; User executable MH-E commands:
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
790
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
791
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
792 (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
793 "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
794
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
795 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
796 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
797 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
798 (interactive (list (cond
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
799 ((mh-mark-active-p t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
800 (mh-region-to-sequence (region-beginning) (region-end))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
801 'region)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
802 (current-prefix-arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
803 (mh-read-seq-default "Delete" t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
804 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
805 (mh-get-msg-num t)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
806 (mh-delete-msg-no-motion msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
807 (mh-next-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
808
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
809 (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
810 "Mark the specified MSG-OR-SEQ for subsequent deletion.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
811 Default is the displayed message. If optional prefix argument is provided,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
812 then prompt for the message sequence."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
813 (interactive (list (if current-prefix-arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
814 (mh-read-seq-default "Delete" t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
815 (mh-get-msg-num t))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
816 (if (numberp msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
817 (mh-delete-a-msg msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
818 (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
819
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
820 (defun mh-execute-commands ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
821 "Process outstanding delete and refile requests."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
822 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
823 (if mh-narrowed-to-seq (mh-widen))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
824 (mh-process-commands mh-current-folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
825 (mh-set-scan-mode)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
826 (mh-goto-cur-msg) ; after mh-set-scan-mode for efficiency
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
827 (mh-make-folder-mode-line)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
828 t) ; return t for write-file-functions
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
829
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
830 (defun mh-first-msg ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
831 "Move to the first message."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
832 (interactive)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
833 (goto-char (point-min))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
834 (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
835 (forward-line 1)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
836
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
837 (defun mh-header-display ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
838 "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
839 Displays headers that might have been suppressed by setting the
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
840 variables `mh-clean-message-header-flag' or `mhl-formfile', or by the fallback
6855
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
841 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
842 Type \"\\[mh-show]\" to show the message normally again."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
843 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
844 (and (not mh-showing-with-headers)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
845 (or mhl-formfile mh-clean-message-header-flag)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 (mh-invalidate-show-buffer))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
847 (let ((mh-decode-mime-flag nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
848 (mhl-formfile nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
849 (mh-clean-message-header-flag nil))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
850 (mh-show-msg nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
851 (mh-in-show-buffer (mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
852 (goto-char (point-min))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
853 (mh-recenter 0))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
854 (setq mh-showing-with-headers t)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
855
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
856 (defun mh-inc-folder (&optional maildrop-name)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
857 "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
858 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
859 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
860 folder, otherwise uses the folder named by `mh-inbox'.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
861 The value of `mh-inc-folder-hook' is a list of functions to be called, with no
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
862 arguments, after incorporating new mail.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
863 Do not call this function from outside MH-E; use \\[mh-rmail] instead."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 (interactive (list (if current-prefix-arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 (expand-file-name
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866 (read-file-name "inc mail from file: "
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
867 mh-user-path)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
868 (let ((config (current-window-configuration)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
869 (if (not maildrop-name)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
870 (cond ((not (get-buffer mh-inbox))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
871 (mh-make-folder mh-inbox)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
872 (setq mh-previous-window-config config))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
873 ((not (eq (current-buffer) (get-buffer mh-inbox)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
874 (switch-to-buffer mh-inbox)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
875 (setq mh-previous-window-config config)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
876 (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
877 (if mh-showing-mode (mh-show))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
878 (run-hooks 'mh-inc-folder-hook))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
879
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
880 (defun mh-last-msg ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
881 "Move to the last message."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
882 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 (goto-char (point-max))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884 (while (and (not (bobp)) (looking-at "^$"))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
885 (forward-line -1))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
886 (mh-recenter nil))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888 (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
889 "Move to the next undeleted message ARG in window."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
890 (interactive "p")
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 (setq mh-next-direction 'forward)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
892 (forward-line 1)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
893 (cond ((re-search-forward mh-scan-good-msg-regexp nil t arg)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
894 (beginning-of-line)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
895 (mh-maybe-show))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
896 (t (forward-line -1)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
897 (message "No more undeleted messages"))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
898
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
899 (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
900 "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
901 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
902 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
903 selected region is marked for refiling."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
904 (interactive
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
905 (list (cond
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
906 ((mh-mark-active-p t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
907 (mh-region-to-sequence (region-beginning) (region-end))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
908 'region)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
909 (current-prefix-arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
910 (mh-read-seq-default "Refile" t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
911 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
912 (mh-get-msg-num t)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
913 (intern
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
914 (mh-prompt-for-folder
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
915 "Destination"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
916 (or (and mh-default-folder-for-message-function
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
917 (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
918 (save-excursion
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
919 (set-buffer (get-buffer-create mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
920 (erase-buffer)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
921 (insert-file-contents refile-file)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
922 (let ((buffer-file-name refile-file))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
923 (funcall mh-default-folder-for-message-function)))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
924 (and (eq 'refile (car mh-last-destination-folder))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
925 (symbol-name (cdr mh-last-destination-folder)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
926 "")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
927 t))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
928 (setq mh-last-destination (cons 'refile folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
929 mh-last-destination-folder mh-last-destination)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
930 (if (numberp msg-or-seq)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
931 (mh-refile-a-msg msg-or-seq folder)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
932 (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
933 (mh-next-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
934
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
935 (defun mh-refile-or-write-again (message)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
936 "Re-execute the last refile or write command on the given MESSAGE.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
937 Default is the displayed message. Use the same folder or file as the previous
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
938 refile or write command."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
939 (interactive (list (mh-get-msg-num t)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
940 (if (null mh-last-destination)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
941 (error "No previous refile or write"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
942 (cond ((eq (car mh-last-destination) 'refile)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
943 (mh-refile-a-msg message (cdr mh-last-destination))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
944 (message "Destination folder: %s" (cdr mh-last-destination)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
945 (t
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
946 (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
947 (message "Destination: %s" (cdr mh-last-destination))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
948 (mh-next-msg))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
949
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 (defun mh-quit ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
951 "Quit the current MH-E folder.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
952 Restore the previous window configuration, if one exists.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
953 The value of `mh-before-quit-hook' is a list of functions to be called, with
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
954 no arguments, immediately upon entry to this function.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
955 The value of `mh-quit-hook' is a list of functions to be called, with no
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
956 arguments, upon exit of this function."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
957 (interactive)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
958 (run-hooks 'mh-before-quit-hook)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
959 (let ((show-buffer (get-buffer mh-show-buffer)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
960 (when show-buffer
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
961 (kill-buffer show-buffer)))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
962 (mh-update-sequences)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
963 (mh-destroy-postponed-handles)
21922
714591991067 (mh-quit): Undo 3/3 change (and the subsequent fix).
Richard M. Stallman <rms@gnu.org>
parents: 21546
diff changeset
964 (bury-buffer (current-buffer))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
965 (if (get-buffer mh-temp-buffer)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
966 (kill-buffer mh-temp-buffer))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
967 (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
968 (kill-buffer mh-temp-folders-buffer))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
969 (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
970 (kill-buffer mh-temp-sequences-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
971 (if mh-previous-window-config
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
972 (set-window-configuration mh-previous-window-config))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
973 (run-hooks 'mh-quit-hook))
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 (defun mh-page-msg (&optional arg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
976 "Page the displayed message forwards.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
977 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
978 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
979 bottom of the current message."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
980 (interactive "P")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
981 (if mh-showing-mode
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
982 (if mh-page-to-next-msg-flag
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
983 (if (equal mh-next-direction 'backward)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
984 (mh-previous-undeleted-msg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
985 (mh-next-undeleted-msg))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
986 (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
987 (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
988 (progn
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
989 (message (format
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
990 "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
991 (single-key-description last-input-event)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
992 (if (equal mh-next-direction 'backward)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
993 "previous"
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
994 "next")))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
995 (setq mh-page-to-next-msg-flag t))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
996 (scroll-other-window arg)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
997 (mh-show)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
998
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
999 (defun mh-previous-page (&optional arg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1000 "Page the displayed message backwards.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1001 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
1002 (interactive "P")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1003 (mh-in-show-buffer (mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1004 (scroll-down arg)))
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 (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
1007 "Move to the previous undeleted message ARG in window."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1008 (interactive "p")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1009 (setq mh-next-direction 'backward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1010 (beginning-of-line)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1011 (cond ((re-search-backward mh-scan-good-msg-regexp nil t arg)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1012 (mh-maybe-show))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1013 (t (message "No previous undeleted message"))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1014
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1015 (defun mh-goto-next-button (backward-flag &optional criterion)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1016 "Search for next button satisfying criterion.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1017 If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1018 CRITERION is a function or a symbol which has a function binding then that
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1019 function must return non-nil at the button we stop."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1020 (unless (or (and (symbolp criterion) (fboundp criterion))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1021 (functionp criterion))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1022 (setq criterion (lambda (x) t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1023 ;; Move to the next button in the buffer satisfying criterion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1024 (goto-char (or (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1025 (beginning-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1026 ;; Find point before current button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1027 (let ((point-before-current-button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1028 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1029 (while (get-text-property (point) 'mh-data)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1030 (unless (= (forward-line
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1031 (if backward-flag 1 -1))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1032 0)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1033 (if backward-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1034 (goto-char (point-min))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1035 (goto-char (point-max)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1036 (point))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1037 ;; Skip over current button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1038 (while (and (get-text-property (point) 'mh-data)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1039 (not (if backward-flag (bobp) (eobp))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1040 (forward-line (if backward-flag -1 1)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1041 ;; Stop at next MIME button if any exists.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1042 (block loop
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1043 (while (/= (progn
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1044 (unless (= (forward-line
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1045 (if backward-flag -1 1))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1046 0)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1047 (if backward-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1048 (goto-char (point-max))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1049 (goto-char (point-min)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1050 (beginning-of-line))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1051 (point))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1052 point-before-current-button)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1053 (when (and (get-text-property (point) 'mh-data)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1054 (funcall criterion (point)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1055 (return-from loop (point))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1056 nil)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1057 (point))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1058
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1059 (defun mh-next-button (&optional backward-flag)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1060 "Go to the next MIME button.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1061 Advance point to the next MIME button in the show buffer. If the end
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1062 of buffer is reached then the search wraps over to the start of the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1063 buffer. With prefix argument, BACKWARD-FLAG the point will move to the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1064 previous MIME button."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1065 (interactive (list current-prefix-arg))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1066 (unless mh-showing-mode
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1067 (mh-show))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1068 (mh-in-show-buffer (mh-show-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1069 (mh-goto-next-button backward-flag)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1070
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1071 (defun mh-prev-button ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1072 "Go to the prev MIME button.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1073 Move point to the previous MIME button in the show buffer. If the beginning
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1074 of the buffer is reached then the search wraps over to the end of the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1075 buffer."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1076 (interactive)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1077 (mh-next-button t))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1078
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1079 (defun mh-folder-mime-action (part-index action include-security-flag)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1080 "Go to PART-INDEX and carry out ACTION.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1081 If PART-INDEX is nil then go to the next part in the buffer. The search for
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1082 the next buffer wraps around if end of buffer is reached. If argument
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1083 INCLUDE-SECURITY-FLAG is non-nil then include security info buttons when
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1084 searching for a suitable parts."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1085 (unless mh-showing-mode
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1086 (mh-show))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1087 (mh-in-show-buffer (mh-show-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1088 (let ((criterion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1089 (cond (part-index
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1090 (lambda (p)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1091 (let ((part (get-text-property p 'mh-part)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1092 (and (integerp part) (= part part-index)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1093 (t (lambda (p)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1094 (if include-security-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1095 (get-text-property p 'mh-data)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1096 (integerp (get-text-property p 'mh-part)))))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1097 (point (point)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1098 (cond ((and (get-text-property point 'mh-part)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1099 (or (null part-index)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1100 (= (get-text-property point 'mh-part) part-index)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1101 (funcall action))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1102 ((and (get-text-property point 'mh-data)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1103 include-security-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1104 (null part-index))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1105 (funcall action))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1106 (t
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1107 (mh-goto-next-button nil criterion)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1108 (if (= (point) point)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1109 (message "No matching MIME part found")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1110 (funcall action)))))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1111
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1112 (defun mh-folder-toggle-mime-part (part-index)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1113 "Toggle display of button.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1114 If point in show buffer is at a button then that part is toggled.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1115 If not at a button and PART-INDEX is non-nil point is moved to that part.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1116 With nil PART-INDEX find the first button after point (search wraps around if
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1117 end of buffer is reached) and toggle it."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1118 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1119 (when (consp part-index) (setq part-index (car part-index)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1120 (mh-folder-mime-action part-index #'mh-press-button t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1121
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1122 (defun mh-folder-inline-mime-part (part-index)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1123 "Show the raw bytes of MIME part inline.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1124 If point in show buffer is at a mime part then that part is inlined.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1125 If not at a mime-part and PART-INDEX is non-nil point is moved to that part.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1126 With nil PART-INDEX find the first button after point (search wraps around if
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1127 end of buffer is reached) and inline it."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1128 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1129 (when (consp part-index) (setq part-index (car part-index)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1130 (mh-folder-mime-action part-index #'mh-mime-inline-part nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1131
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1132 (defun mh-folder-save-mime-part (part-index)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1133 "Save MIME part.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1134 If point in show buffer is at a mime part then that part is saved.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1135 If not at a mime-part and PART-INDEX is non-nil point is moved to that part.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1136 With nil PART-INDEX find the first button after point (search wraps around if
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1137 end of buffer is reached) and save it."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1138 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1139 (when (consp part-index) (setq part-index (car part-index)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1140 (mh-folder-mime-action part-index #'mh-mime-save-part nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1141
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1142 (defun mh-reset-threads-and-narrowing ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1143 "Reset all variables pertaining to threads and narrowing.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1144 Also removes all content from the folder buffer."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1145 (setq mh-view-ops ())
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1146 (setq mh-narrowed-to-seq nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1147 (let ((buffer-read-only nil)) (erase-buffer)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1148
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1149 (defun mh-rescan-folder (&optional range dont-exec-pending)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1150 "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
1151 If optional prefix argument RANGE is provided, prompt for the range of
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1152 messages to display. Otherwise show the entire folder.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1153 If optional argument DONT-EXEC-PENDING is non-nil then pending deletes and
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1154 refiles aren't carried out."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1155 (interactive (list (if current-prefix-arg
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1156 (mh-read-msg-range "Range to scan [all]? ")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1157 nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1158 (setq mh-next-direction 'forward)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1159 (mh-reset-threads-and-narrowing)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1160 (mh-scan-folder mh-current-folder (or range "all") dont-exec-pending))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1161
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1162 (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
1163 "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
1164 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
1165 Otherwise send the entire message including the headers."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1166 (interactive
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1167 (list (mh-get-msg-num t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1168 (let ((default-dir (if (eq 'write (car mh-last-destination-write))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1169 (file-name-directory
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1170 (car (cdr mh-last-destination-write)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1171 default-directory)))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1172 (read-file-name (format "Save message%s in file: "
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1173 (if current-prefix-arg " body" ""))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1174 default-dir
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1175 (if (eq 'write (car mh-last-destination-write))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1176 (car (cdr mh-last-destination-write))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1177 (expand-file-name "mail.out" default-dir))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1178 current-prefix-arg))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1179 (let ((msg-file-to-output (mh-msg-filename msg))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1180 (output-file (mh-expand-file-name file)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1181 (setq mh-last-destination (list 'write file (if no-headers 'no-headers))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1182 mh-last-destination-write mh-last-destination)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1183 (save-excursion
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1184 (set-buffer (get-buffer-create mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1185 (erase-buffer)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1186 (insert-file-contents msg-file-to-output)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1187 (goto-char (point-min))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1188 (if no-headers (search-forward "\n\n"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1189 (append-to-file (point) (point-max) output-file))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1190
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1191 (defun mh-toggle-showing ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1192 "Toggle the scanning mode/showing mode of displaying messages."
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1193 (interactive)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1194 (if mh-showing-mode
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1195 (mh-set-scan-mode)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1196 (mh-show)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1197
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1198 (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
1199 "Undo the pending deletion or refile of the specified MSG-OR-SEQ.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1200 Default is the displayed message.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1201 If optional prefix argument is provided, then prompt for the message sequence.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1202 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
1203 selected region is unmarked."
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1204 (interactive (list (cond
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1205 ((mh-mark-active-p t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1206 (mh-region-to-sequence (region-beginning) (region-end))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1207 'region)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1208 (current-prefix-arg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1209 (mh-read-seq-default "Undo" t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1210 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1211 (mh-get-msg-num t)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1212 (cond ((numberp msg-or-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1213 (let ((original-position (point)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1214 (beginning-of-line)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1215 (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
1216 (looking-at mh-scan-refiled-msg-regexp)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1217 (and (eq mh-next-direction 'forward) (bobp))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1218 (and (eq mh-next-direction 'backward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1219 (save-excursion (forward-line) (eobp)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1220 (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
1221 (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
1222 (looking-at mh-scan-refiled-msg-regexp))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1223 (progn
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1224 (mh-undo-msg (mh-get-msg-num t))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1225 (mh-maybe-show))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1226 (goto-char original-position)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1227 (error "Nothing to undo"))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1228 (t
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1229 (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
1230 (if (not (mh-outstanding-commands-p))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1231 (mh-set-folder-modified-p nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1232
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1233 ;;;###autoload
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1234 (defun mh-version ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1235 "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
1236 (interactive)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1237 (mh-find-progs)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1238 (set-buffer (get-buffer-create mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1239 (erase-buffer)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1240 ;; MH-E and Emacs versions.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1241 (insert "MH-E " mh-version "\n\n" (emacs-version) "\n\n")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1242 ;; MH version.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1243 (let ((help-start (point)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1244 (condition-case err-data
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1245 (mh-exec-cmd-output "inc" nil (if mh-nmh-flag "-version" "-help"))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1246 (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
1247 (goto-char help-start)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1248 (if mh-nmh-flag
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1249 (search-forward "inc -- " nil t)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1250 (search-forward "version: " nil t))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1251 (delete-region help-start (point)))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1252 (goto-char (point-max))
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1253 (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
1254 "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
1255 "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
1256 ;; Linux version.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1257 (condition-case ()
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1258 (call-process "uname" nil t nil "-a")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1259 (file-error))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1260 (goto-char (point-min))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1261 (display-buffer mh-temp-buffer))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1262
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1263 (defun mh-visit-folder (folder &optional range)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1264 "Visit FOLDER and display RANGE of messages.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1265 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
1266 (interactive (list (mh-prompt-for-folder "Visit" mh-inbox t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1267 (mh-read-msg-range "Range [all]? ")))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1268 (let ((config (current-window-configuration)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1269 (mh-scan-folder folder (or range "all"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1270 (setq mh-previous-window-config config))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1271 nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1272
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1273 (defun mh-update-sequences ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1274 "Update MH's Unseen-Sequence and current folder and message.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1275 Flush MH-E's state out to MH. The message at the cursor becomes current."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1276 (interactive)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1277 ;; mh-update-sequences is the opposite of mh-read-folder-sequences,
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1278 ;; which updates MH-E's state from MH.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1279 (let ((folder-set (mh-update-unseen))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1280 (new-cur (mh-get-msg-num nil)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1281 (if new-cur
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1282 (let ((seq-entry (mh-find-seq 'cur)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1283 (mh-remove-cur-notation)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1284 (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
1285 (mh-define-sequence 'cur (list new-cur))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1286 (beginning-of-line)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1287 (if (looking-at mh-scan-good-msg-regexp)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1288 (mh-notate nil mh-note-cur mh-cmd-note)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1289 (or folder-set
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1290 (save-excursion
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1291 ;; 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
1292 ;; So I added this sanity check.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1293 (if (stringp mh-current-folder)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1294 (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
1295 (mh-exec-cmd-quiet t "folder" "-fast")))))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1296
6365
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
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1299 ;;; Support routines.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1300
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1301 (defun mh-delete-a-msg (msg)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1302 "Delete the MSG.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1303 The value of `mh-delete-msg-hook' is a list of functions to be called, with no
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1304 arguments, after the message has been deleted."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1305 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1306 (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
1307 (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
1308 (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
1309 (if (looking-at mh-scan-deleted-msg-regexp)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1310 nil
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1311 (mh-set-folder-modified-p t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1312 (setq mh-delete-list (cons msg mh-delete-list))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1313 (mh-notate msg mh-note-deleted mh-cmd-note)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1314 (run-hooks 'mh-delete-msg-hook))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1315
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1316 (defun mh-refile-a-msg (msg folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1317 "Refile MSG in FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1318 Folder is a symbol, not a string.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1319 The value of `mh-refile-msg-hook' is a list of functions to be called, with no
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1320 arguments, after the message has been refiled."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1321 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1322 (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
1323 (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
1324 (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
1325 ((looking-at mh-scan-refiled-msg-regexp)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1326 (if (y-or-n-p
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1327 (format "Message %d already refiled. Copy to %s as well? "
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1328 msg folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1329 (mh-exec-cmd "refile" (mh-get-msg-num t) "-link"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1330 "-src" mh-current-folder
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1331 (symbol-name folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1332 (message "Message not copied.")))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1333 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1334 (mh-set-folder-modified-p t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1335 (if (null (assoc folder mh-refile-list))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1336 (push (list folder msg) mh-refile-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1337 (pushnew msg (cdr (assoc folder mh-refile-list))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1338 (mh-notate msg mh-note-refiled mh-cmd-note)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1339 (run-hooks 'mh-refile-msg-hook)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1340
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1341 (defun mh-next-msg ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1342 "Move backward or forward to the next undeleted message in the buffer."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1343 (if (eq mh-next-direction 'forward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1344 (mh-next-undeleted-msg 1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1345 (mh-previous-undeleted-msg 1)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1346
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1347 (defun mh-set-scan-mode ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1348 "Display the scan listing buffer, but do not show a message."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1349 (if (get-buffer mh-show-buffer)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1350 (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
1351 (mh-showing-mode 0)
11577
5a94d8168bdb (mh-set-scan-mode): Use force-mode-line-update.
Karl Heuer <kwzh@gnu.org>
parents: 11505
diff changeset
1352 (force-mode-line-update)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1353 (if mh-recenter-summary-flag
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1354 (mh-recenter nil)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1355
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1356 (defun mh-undo-msg (msg)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1357 "Undo the deletion or refile of one MSG."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1358 (cond ((memq msg mh-delete-list)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1359 (setq mh-delete-list (delq msg mh-delete-list)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1360 (t
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1361 (dolist (folder-msg-list mh-refile-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1362 (setf (cdr folder-msg-list) (remove msg (cdr folder-msg-list))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1363 (setq mh-refile-list (remove-if #'(lambda (x) (null (cdr x)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1364 mh-refile-list))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1365 (mh-notate msg ? mh-cmd-note))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1366
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1367
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1368
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1369 ;;; The folder data abstraction.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1370
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1371 (defun mh-make-folder (name)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1372 "Create a new mail folder called NAME.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1373 Make it the current folder."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1374 (switch-to-buffer name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1375 (setq buffer-read-only nil)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1376 (erase-buffer)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1377 (if mh-adaptive-cmd-note-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1378 (mh-set-cmd-note (mh-message-number-width name)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1379 (setq buffer-read-only t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1380 (mh-folder-mode)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1381 (mh-set-folder-modified-p nil)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1382 (setq buffer-file-name mh-folder-filename)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1383 (mh-make-folder-mode-line))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1384
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1385 ;;; 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
1386 (put 'mh-folder-mode 'mode-class 'special)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1387
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1388
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1389
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1390 ;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1391 ;;; Menus for folder mode: folder, message, sequence (in that order)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1392 ;;; folder-mode "Sequence" menu
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1393 (easy-menu-define
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1394 mh-folder-sequence-menu mh-folder-mode-map "Menu for MH-E folder-sequence."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1395 '("Sequence"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1396 ["Add Message to Sequence..." mh-put-msg-in-seq (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1397 ["List Sequences for Message" mh-msg-is-in-seq (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1398 ["Delete Message from Sequence..." mh-delete-msg-from-seq
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1399 (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1400 ["List Sequences in Folder..." mh-list-sequences t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1401 ["Delete Sequence..." mh-delete-seq t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1402 ["Narrow to Sequence..." mh-narrow-to-seq t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1403 ["Widen from Sequence" mh-widen mh-narrowed-to-seq]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1404 "--"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1405 ["Narrow to Subject Sequence" mh-narrow-to-subject t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1406 ["Delete Rest of Same Subject" mh-delete-subject t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1407 "--"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1408 ["Push State Out to MH" mh-update-sequences t]))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1409
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1410 ;;; folder-mode "Message" menu
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1411 (easy-menu-define
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1412 mh-folder-message-menu mh-folder-mode-map "Menu for MH-E folder-message."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1413 '("Message"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1414 ["Show Message" mh-show (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1415 ["Show Message with Header" mh-header-display (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1416 ["Next Message" mh-next-undeleted-msg t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1417 ["Previous Message" mh-previous-undeleted-msg t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1418 ["Go to First Message" mh-first-msg t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1419 ["Go to Last Message" mh-last-msg t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1420 ["Go to Message by Number..." mh-goto-msg t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1421 ["Modify Message" mh-modify]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1422 ["Delete Message" mh-delete-msg (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1423 ["Refile Message" mh-refile-msg (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1424 ["Undo Delete/Refile" mh-undo t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1425 ["Process Delete/Refile" mh-execute-commands
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1426 (or mh-refile-list mh-delete-list)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1427 "--"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1428 ["Compose a New Message" mh-send t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1429 ["Reply to Message..." mh-reply (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1430 ["Forward Message..." mh-forward (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1431 ["Redistribute Message..." mh-redistribute (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1432 ["Edit Message Again" mh-edit-again (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1433 ["Re-edit a Bounced Message" mh-extract-rejected-mail t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1434 "--"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1435 ["Copy Message to Folder..." mh-copy-msg (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1436 ["Print Message" mh-print-msg (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1437 ["Write Message to File..." mh-write-msg-to-file
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1438 (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1439 ["Pipe Message to Command..." mh-pipe-msg (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1440 ["Unpack Uuencoded Message..." mh-store-msg (mh-get-msg-num nil)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1441 ["Burst Digest Message" mh-burst-digest (mh-get-msg-num nil)]))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1442
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1443 ;;; folder-mode "Folder" menu
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1444 (easy-menu-define
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1445 mh-folder-folder-menu mh-folder-mode-map "Menu for MH-E folder."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1446 '("Folder"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1447 ["Incorporate New Mail" mh-inc-folder t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1448 ["Toggle Show/Folder" mh-toggle-showing t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1449 ["Execute Delete/Refile" mh-execute-commands
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1450 (or mh-refile-list mh-delete-list)]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1451 ["Rescan Folder" mh-rescan-folder t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1452 ["Thread Folder" mh-toggle-threads
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1453 (not (memq 'unthread mh-view-ops))]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1454 ["Pack Folder" mh-pack-folder t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1455 ["Sort Folder" mh-sort-folder t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1456 "--"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1457 ["List Folders" mh-list-folders t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1458 ["Visit a Folder..." mh-visit-folder t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1459 ["Search a Folder..." mh-search-folder t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1460 ["Indexed Search..." mh-index-search t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1461 "--"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1462 ["Quit MH-E" mh-quit t]))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1463
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1464
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1465
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1466 ;;; Support for emacs21 toolbar using gnus/message.el icons (and code).
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1467 (eval-when-compile (defvar tool-bar-map))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1468 (defvar mh-folder-tool-bar-map nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1469 (defvar mh-folder-seq-tool-bar-map nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1470 "Tool-bar to use when narrowed to a sequence in MH-Folder buffers.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1471 (when (and (fboundp 'tool-bar-add-item)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1472 tool-bar-mode)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1473 (setq mh-folder-tool-bar-map
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1474 (let ((tool-bar-map (make-sparse-keymap)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1475 (tool-bar-add-item "mail" 'mh-inc-folder 'mh-foldertoolbar-inc-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1476 :help "Incorporate new mail in Inbox")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1477 (tool-bar-add-item "attach" 'mh-mime-save-parts
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1478 'mh-foldertoolbar-mime-save-parts
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1479 :help "Save MIME parts")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1480
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1481 (tool-bar-add-item "left_arrow" 'mh-previous-undeleted-msg
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1482 'mh-foldertoolbar-prev :help "Previous message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1483 (tool-bar-add-item "page-down" 'mh-page-msg 'mh-foldertoolbar-page
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1484 :help "Page this message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1485 (tool-bar-add-item "right_arrow" 'mh-next-undeleted-msg
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1486 'mh-foldertoolbar-next :help "Next message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1487
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1488 (tool-bar-add-item "close" 'mh-delete-msg 'mh-foldertoolbar-delete
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1489 :help "Mark for deletion")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1490 (tool-bar-add-item "refile" 'mh-refile-msg 'mh-foldertoolbar-refile
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1491 :help "Refile this message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1492 (tool-bar-add-item "undo" 'mh-undo 'mh-foldertoolbar-undo
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1493 :help "Undo this mark")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1494 (tool-bar-add-item "execute" 'mh-execute-commands 'mh-foldertoolbar-exec
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1495 :help "Perform moves and deletes")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1496
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1497 (tool-bar-add-item "show" 'mh-toggle-showing
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1498 'mh-foldertoolbar-toggle-show
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1499 :help "Toggle showing message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1500
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1501 (cond
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1502 (mh-tool-bar-reply-3-buttons-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1503 (tool-bar-add-item "reply-from" (lambda (&optional arg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1504 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1505 (mh-reply (mh-get-msg-num nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1506 "from" arg))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1507 'mh-foldertoolbar-reply-from
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1508 :help "Reply to \"from\"")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1509 (tool-bar-add-item "reply-to" (lambda (&optional arg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1510 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1511 (mh-reply (mh-get-msg-num nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1512 "to" arg))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1513 'mh-foldertoolbar-reply-to
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1514 :help "Reply to \"to\"")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1515 (tool-bar-add-item "reply-all" (lambda (&optional arg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1516 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1517 (mh-reply (mh-get-msg-num nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1518 "all" arg))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1519 'mh-foldertoolbar-reply-all
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1520 :help "Reply to \"all\""))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1521 (t
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1522 (tool-bar-add-item "mail/reply2" 'mh-reply 'mh-foldertoolbar-reply
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1523 :help "Reply to this message")))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1524 (tool-bar-add-item "mail_compose" 'mh-send 'mh-foldertoolbar-compose
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1525 :help "Compose new message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1526
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1527 (tool-bar-add-item "rescan" 'mh-rescan-folder 'mh-foldertoolbar-rescan
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1528 :help "Rescan this folder")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1529 (tool-bar-add-item "repack" 'mh-pack-folder 'mh-foldertoolbar-pack
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1530 :help "Repack this folder")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1531
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1532 (tool-bar-add-item "search"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1533 (lambda (&optional arg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1534 (interactive "P")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1535 (call-interactively mh-tool-bar-search-function))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1536 'mh-foldertoolbar-search :help "Search")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1537 (tool-bar-add-item "fld_open" 'mh-visit-folder 'mh-foldertoolbar-visit
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1538 :help "Visit other folder")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1539
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1540 (tool-bar-add-item "preferences" (lambda ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1541 (interactive)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1542 (customize-group "mh"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1543 'mh-foldertoolbar-customize
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1544 :help "mh-e preferences")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1545 (tool-bar-add-item "help" (lambda ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1546 (interactive)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1547 (Info-goto-node "(mh-e)Top"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1548 'mh-foldertoolbar-help :help "Help")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1549 tool-bar-map))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1550
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1551 (setq mh-folder-seq-tool-bar-map
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1552 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1553 (tool-bar-add-item "widen" 'mh-widen 'mh-foldertoolbar-widen
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1554 :help "Widen from this sequence")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1555 tool-bar-map))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1556 )
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1557
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1558
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1559
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1560 (defmacro mh-remove-xemacs-horizontal-scrollbar ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1561 "Get rid of the horizontal scrollbar that XEmacs insists on putting in."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1562 (when mh-xemacs-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1563 `(if (and (featurep 'scrollbar)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1564 (fboundp 'set-specifier))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1565 (set-specifier horizontal-scrollbar-visible-p nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1566 (cons (current-buffer) nil)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1567
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1568 (defmacro mh-write-file-functions-compat ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1569 "Return `write-file-functions' if it exists.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1570 Otherwise return `local-write-file-hooks'. This macro exists purely for
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1571 compatibility. The former symbol is used in Emacs 21.4 onward while the latter
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1572 is used in previous versions and XEmacs."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1573 (if (boundp 'write-file-functions)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1574 ''write-file-functions ;Emacs 21.4
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1575 ''local-write-file-hooks)) ;<Emacs 21.4, XEmacs
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1576
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1577 (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder"
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1578 "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
1579
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1580 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
1581 messages. Messages can be marked for deletion or refiling into another
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1582 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
1583
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1584 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
1585 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
1586 is non-nil, the action is applied to the region.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1587
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1588 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
1589 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
1590 option if you wish to modify scan's format.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1591
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1592 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
1593
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1594 \\{mh-folder-mode-map}"
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1595
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1596 (make-local-variable 'font-lock-defaults)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1597 (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
1598 (mh-make-local-vars
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1599 'mh-current-folder (buffer-name) ; Name of folder, a string
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1600 '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
1601 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1602 (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
1603 'mh-showing-mode nil ; Show message also?
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1604 'mh-delete-list nil ; List of msgs nums to delete
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1605 '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
1606 'mh-seq-list nil ; Alist of (seq . msgs) nums
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1607 'mh-seen-list nil ; List of displayed messages
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1608 'mh-next-direction 'forward ; Direction to move to next message
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1609 'mh-narrowed-to-seq nil ; Sequence display is narrowed to
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1610 'mh-view-ops () ; Stack that keeps track of the order
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1611 ; in which narrowing/threading has been
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1612 ; carried out.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1613 'mh-first-msg-num nil ; Number of first msg in buffer
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1614 '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
1615 'mh-msg-count nil ; Number of msgs in buffer
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1616 '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
1617 'mh-previous-window-config nil) ; Previous window configuration
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1618 (mh-remove-xemacs-horizontal-scrollbar)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1619 (setq truncate-lines t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1620 (auto-save-mode -1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1621 (setq buffer-offer-save t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1622 (add-hook (mh-write-file-functions-compat) 'mh-execute-commands nil t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1623 (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
1624 (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
1625 (if (fboundp 'hl-line-mode)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1626 (hl-line-mode 1))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1627 (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
1628 (or (assq 'mh-showing-mode minor-mode-alist)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1629 (setq minor-mode-alist
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1630 (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
1631 (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
1632 (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
1633 (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
1634 (if (and (boundp 'tool-bar-mode) tool-bar-mode)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1635 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1636 (if (and mh-xemacs-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1637 font-lock-auto-fontify)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1638 (turn-on-font-lock))) ; Force font-lock in XEmacs.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1639
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1640 (defun mh-make-local-vars (&rest pairs)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1641 "Initialize local variables according to the variable-value PAIRS."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1642
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1643 (while pairs
30882
e5b3af28990a (mh-make-local-vars):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 29120
diff changeset
1644 (set (make-local-variable (car pairs)) (car (cdr pairs)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1645 (setq pairs (cdr (cdr pairs)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1646
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1647 (defun mh-scan-folder (folder range &optional dont-exec-pending)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1648 "Scan the FOLDER over the RANGE.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1649 If the optional argument DONT-EXEC-PENDING is non-nil then pending deletes and
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1650 refiles aren't carried out.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1651 Return in the folder's buffer."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1652 (cond ((null (get-buffer folder))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1653 (mh-make-folder folder))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1654 (t
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1655 (or dont-exec-pending (mh-process-or-undo-commands folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1656 (switch-to-buffer folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1657 (mh-regenerate-headers range)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1658 (if (zerop (buffer-size))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1659 (if (equal range "all")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1660 (message "Folder %s is empty" folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1661 (message "No messages in %s, range %s" folder range))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1662 (mh-goto-cur-msg))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1663 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1664 (when dont-exec-pending
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1665 ;; Re-annotate messages to be refiled...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1666 (dolist (folder-msg-list mh-refile-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1667 (dolist (msg (cdr folder-msg-list))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1668 (mh-notate msg mh-note-refiled mh-cmd-note)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1669 ;; Re-annotate messages to be deleted...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1670 (dolist (msg mh-delete-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1671 (mh-notate msg mh-note-deleted mh-cmd-note)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1672
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1673 (defun mh-regenerate-headers (range &optional update)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1674 "Scan folder over range RANGE.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1675 If UPDATE, append the scan lines, otherwise replace."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1676 (let ((folder mh-current-folder)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1677 (range (if (and range (atom range)) (list range) range))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1678 scan-start)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1679 (message "Scanning %s..." folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1680 (with-mh-folder-updating (nil)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1681 (if update
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1682 (goto-char (point-max))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1683 (delete-region (point-min) (point-max))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1684 (if mh-adaptive-cmd-note-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1685 (mh-set-cmd-note (mh-message-number-width folder))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1686 (setq scan-start (point))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1687 (apply #'mh-exec-cmd-output
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1688 mh-scan-prog nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1689 (mh-scan-format)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1690 "-noclear" "-noheader"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1691 "-width" (window-width)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1692 folder range)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1693 (goto-char scan-start)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1694 (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
1695 (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
1696 ((looking-at "scan: bad message list ")
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1697 (keep-lines mh-scan-valid-regexp))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1698 ((looking-at "scan: ")) ; Keep error messages
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1699 (t
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1700 (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1701 (setq mh-seq-list (mh-read-folder-sequences folder nil))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1702 (mh-notate-user-sequences)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1703 (or update
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1704 (setq mh-mode-line-annotation
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1705 (if (equal range '("all"))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1706 nil
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1707 mh-partial-folder-mode-line-annotation)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1708 (mh-make-folder-mode-line))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1709 (message "Scanning %s...done" folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1710
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1711 (defun mh-generate-new-cmd-note (folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1712 "Fix the `mh-cmd-note' value for this FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1713
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1714 After doing an `mh-get-new-mail' operation in this FOLDER, at least
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1715 one line that looks like a truncated message number was found.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1716
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1717 Remove the text added by the last `mh-inc' command. It should be the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1718 messages cur-last. Call `mh-set-cmd-note' with the widest message number
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1719 in FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1720
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1721 Reformat the message number width on each line in the buffer and trim
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1722 the line length to fit in the window.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1723
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1724 Rescan the FOLDER in the range cur-last in order to display the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1725 messages that were removed earlier. They should all fit in the scan
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1726 line now with no message truncation."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1727 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1728 (let ((maxcol (1- (window-width)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1729 (old-cmd-note mh-cmd-note)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1730 mh-cmd-note-fmt
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1731 msgnum)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1732 ;; Nuke all of the lines just added by the last inc
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1733 (delete-char (- (point-max) (point)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1734 ;; Update the current buffer to reflect the new mh-cmd-note
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1735 ;; value needed to display messages.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1736 (mh-set-cmd-note (mh-message-number-width folder))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1737 (setq mh-cmd-note-fmt (concat "%" (format "%d" mh-cmd-note) "d"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1738 ;; Cleanup the messages that are in the buffer right now
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1739 (goto-char (point-min))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1740 (cond ((memq 'unthread mh-view-ops)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1741 (mh-thread-add-spaces (- mh-cmd-note old-cmd-note)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1742 (t (while (re-search-forward mh-scan-msg-number-regexp nil 0 1)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1743 ;; reformat the number to fix in mh-cmd-note columns
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1744 (setq msgnum (string-to-number
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1745 (buffer-substring
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1746 (match-beginning 1) (match-end 1))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1747 (replace-match (format mh-cmd-note-fmt msgnum))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1748 ;; trim the line to fix in the window
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1749 (end-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1750 (let ((eol (point)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1751 (move-to-column maxcol)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1752 (if (<= (point) eol)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1753 (delete-char (- eol (point))))))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1754 ;; now re-read the lost messages
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1755 (goto-char (point-max))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1756 (prog1 (point)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1757 (mh-regenerate-headers "cur-last" t)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1758
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1759 (defun mh-get-new-mail (maildrop-name)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1760 "Read new mail from MAILDROP-NAME into the current buffer.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1761 Return in the current buffer."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1762 (let ((point-before-inc (point))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1763 (folder mh-current-folder)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1764 (new-mail-flag nil))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1765 (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
1766 (if maildrop-name
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1767 (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
1768 (message "inc %s..." folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1769 (setq mh-next-direction 'forward)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1770 (goto-char (point-max))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1771 (let ((start-of-inc (point)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1772 (mh-remove-cur-notation)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1773 (if maildrop-name
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1774 ;; I think MH 5 used "-ms-file" instead of "-file",
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1775 ;; which would make inc'ing from maildrops fail.
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1776 (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
1777 (mh-scan-format)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1778 "-file" (expand-file-name maildrop-name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1779 "-width" (window-width)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1780 "-truncate")
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1781 (mh-exec-cmd-output mh-inc-prog nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1782 (mh-scan-format)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1783 "-width" (window-width)))
14341
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1784 (if maildrop-name
2fcbb7422170 (mh-get-new-mail): Delete format call inside message.
Karl Heuer <kwzh@gnu.org>
parents: 14231
diff changeset
1785 (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
1786 (message "inc %s...done" folder))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1787 (goto-char start-of-inc)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1788 (cond ((save-excursion
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1789 (re-search-forward "^inc: no mail" nil t))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1790 (message "No new mail%s%s" (if maildrop-name " in " "")
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1791 (if maildrop-name maildrop-name "")))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1792 ((and (when mh-narrowed-to-seq
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1793 (let ((saved-text (buffer-substring-no-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1794 start-of-inc (point-max))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1795 (delete-region start-of-inc (point-max))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1796 (unwind-protect (mh-widen)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1797 (goto-char (point-max))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1798 (setq start-of-inc (point))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1799 (insert saved-text)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1800 (goto-char start-of-inc))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1801 nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1802 ((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
1803 (error "Error incorporating mail"))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1804 ((and
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1805 (equal mh-scan-format-file t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1806 mh-adaptive-cmd-note-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1807 ;; Have we reached an edge condition?
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1808 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1809 (re-search-forward mh-scan-msg-overflow-regexp nil 0 1))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1810 (setq start-of-inc (mh-generate-new-cmd-note folder))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1811 nil))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1812 (t
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1813 (setq new-mail-flag t)))
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1814 (keep-lines mh-scan-valid-regexp) ; Flush random scan lines
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1815 (setq mh-seq-list (mh-read-folder-sequences folder t))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1816 (mh-notate-user-sequences)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1817 (if new-mail-flag
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1818 (progn
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1819 (mh-make-folder-mode-line)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1820 (when (memq 'unthread mh-view-ops)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1821 (mh-thread-inc folder start-of-inc))
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
1822 (mh-goto-cur-msg))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1823 (goto-char point-before-inc))))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1824
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1825 (defun mh-make-folder-mode-line (&optional ignored)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1826 "Set the fields of the mode line for a folder buffer.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1827 The optional argument is now obsolete and IGNORED. It used to be used to pass
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1828 in what is now stored in the buffer-local variable `mh-mode-line-annotation'."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1829 (save-excursion
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1830 (save-window-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1831 (mh-first-msg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1832 (let ((new-first-msg-num (mh-get-msg-num nil)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1833 (when (or (not (memq 'unthread mh-view-ops))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1834 (null mh-first-msg-num)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1835 (null new-first-msg-num)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1836 (< new-first-msg-num mh-first-msg-num))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1837 (setq mh-first-msg-num new-first-msg-num)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1838 (mh-last-msg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1839 (let ((new-last-msg-num (mh-get-msg-num nil)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1840 (when (or (not (memq 'unthread mh-view-ops))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1841 (null mh-last-msg-num)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1842 (null new-last-msg-num)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1843 (> new-last-msg-num mh-last-msg-num))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1844 (setq mh-last-msg-num new-last-msg-num)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1845 (setq mh-msg-count (if mh-first-msg-num
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1846 (count-lines (point-min) (point-max))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1847 0))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1848 (setq mode-line-buffer-identification
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1849 (list (format "{%%b%s} %s msg%s"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1850 (if mh-mode-line-annotation
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1851 (format "/%s" mh-mode-line-annotation)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1852 "")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1853 (if (zerop mh-msg-count)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1854 "no"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1855 (format "%d" mh-msg-count))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1856 (if (zerop mh-msg-count)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1857 "s"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1858 (cond ((> mh-msg-count 1)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1859 (format "s (%d-%d)" mh-first-msg-num
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1860 mh-last-msg-num))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1861 (mh-first-msg-num
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1862 (format " (%d)" mh-first-msg-num))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1863 ("")))))))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1864
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1865 (defun mh-unmark-all-headers (remove-all-flags)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1866 "Remove all '+' flags from the folder listing.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1867 With non-nil argument REMOVE-ALL-FLAGS, remove all 'D', '^' and '%' flags too.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1868 Optimized for speed (i.e., no regular expressions)."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1869 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1870 (let ((case-fold-search nil)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1871 (last-line (1- (point-max)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1872 char)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1873 (mh-first-msg)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1874 (while (<= (point) last-line)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1875 (forward-char mh-cmd-note)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1876 (setq char (following-char))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1877 (if (or (and remove-all-flags
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1878 (or (= char (aref mh-note-deleted 0))
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1879 (= char (aref mh-note-refiled 0))))
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1880 (= char (aref mh-note-cur 0)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1881 (progn
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1882 (delete-char 1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1883 (insert " ")))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1884 (if remove-all-flags
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1885 (progn
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1886 (forward-char 1)
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
1887 (if (= (following-char) (aref mh-note-seq 0))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1888 (progn
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1889 (delete-char 1)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1890 (insert " ")))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1891 (forward-line)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1892
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1893 (defun mh-remove-cur-notation ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1894 "Remove old cur notation."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1895 (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1896 (save-excursion
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1897 (and cur-msg
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1898 (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
1899 (looking-at mh-scan-cur-msg-number-regexp)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1900 (mh-notate nil ? mh-cmd-note)))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1901
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1902 (defun mh-remove-all-notation ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1903 "Remove all notations on all scan lines that MH-E introduces."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1904 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1905 (goto-char (point-min))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1906 (while (not (eobp))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1907 (mh-notate nil ? mh-cmd-note)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1908 (when (eq (char-after (+ (point) mh-cmd-note 1)) (elt mh-note-seq 0))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1909 (mh-notate nil ? (1+ mh-cmd-note)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1910 (forward-line))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1911
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1912 (defun mh-goto-cur-msg (&optional minimal-changes-flag)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1913 "Position the cursor at the current message.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1914 When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1915 recenter the folder buffer."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1916 (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1917 (cond ((and cur-msg
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1918 (mh-goto-msg cur-msg t t))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1919 (unless minimal-changes-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1920 (mh-notate nil mh-note-cur mh-cmd-note)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1921 (mh-recenter 0)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1922 (mh-maybe-show cur-msg)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1923 (t
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1924 (message "No current message")))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1925
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1926 (defun mh-process-or-undo-commands (folder)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1927 "If FOLDER has outstanding commands, then either process or discard them.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1928 Called by functions like `mh-sort-folder', so also invalidate show buffer."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1929 (set-buffer folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1930 (if (mh-outstanding-commands-p)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1931 (if (or mh-do-not-confirm-flag
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1932 (y-or-n-p
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1933 "Process outstanding deletes and refiles (or lose them)? "))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1934 (mh-process-commands folder)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1935 (mh-undo-folder)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1936 (mh-update-unseen)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1937 (mh-invalidate-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1938
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1939 (defun mh-process-commands (folder)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1940 "Process outstanding commands for FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1941 The value of `mh-folder-updated-hook' is a list of functions to be called,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1942 with no arguments, before the commands are processed."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1943 (message "Processing deletes and refiles for %s..." folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1944 (set-buffer folder)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1945 (with-mh-folder-updating (nil)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1946 ;; 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
1947 (run-hooks 'mh-folder-updated-hook)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
1948
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1949 ;; Update the unseen sequence if it exists
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1950 (mh-update-unseen)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1951
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1952 (let ((redraw-needed-flag nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1953 ;; Then refile messages
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1954 (mh-mapc #'(lambda (folder-msg-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1955 (let ((dest-folder (symbol-name (car folder-msg-list)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1956 (msgs (cdr folder-msg-list)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1957 (setq redraw-needed-flag t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1958 (apply #'mh-exec-cmd
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1959 "refile" "-src" folder dest-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1960 (mh-coalesce-msg-list msgs))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1961 (mh-delete-scan-msgs msgs)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1962 mh-refile-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1963 (setq mh-refile-list ())
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1964
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1965 ;; Now delete messages
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1966 (cond (mh-delete-list
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1967 (setq redraw-needed-flag t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1968 (apply 'mh-exec-cmd "rmm" folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1969 (mh-coalesce-msg-list mh-delete-list))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1970 (mh-delete-scan-msgs mh-delete-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1971 (setq mh-delete-list nil)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1972
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1973 ;; Don't need to remove sequences since delete and refile do so.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1974 ;; Mark cur message
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1975 (if (> (buffer-size) 0)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1976 (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
1977
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1978 ;; Redraw folder window if needed
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1979 (when (and (memq 'unthread mh-view-ops) redraw-needed-flag)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1980 (mh-thread-inc folder (point-max))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1981
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1982 (and (buffer-file-name (get-buffer mh-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1983 (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
1984 ;; If "inc" were to put a new msg in this file,
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1985 ;; we would not notice, so mark it invalid now.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1986 (mh-invalidate-show-buffer))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1987
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1988 (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
1989 (mh-unmark-all-headers t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1990 (mh-notate-user-sequences)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1991 (message "Processing deletes and refiles for %s...done" folder)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1992
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1993 (defun mh-update-unseen ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1994 "Synchronize the unseen sequence with MH.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1995 Return non-nil iff the MH folder was set.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1996 The value of `mh-unseen-updated-hook' is a list of functions to be called,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
1997 with no arguments, after the unseen sequence is updated."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1998 (if mh-seen-list
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
1999 (let* ((unseen-seq (mh-find-seq mh-unseen-seq))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2000 (unseen-msgs (mh-seq-msgs unseen-seq)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2001 (if unseen-msgs
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2002 (progn
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2003 (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
2004 (run-hooks 'mh-unseen-updated-hook)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2005 (while mh-seen-list
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2006 (setq unseen-msgs (delq (car mh-seen-list) unseen-msgs))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2007 (setq mh-seen-list (cdr mh-seen-list)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2008 (setcdr unseen-seq unseen-msgs)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2009 t) ;since we set the folder
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2010 (setq mh-seen-list nil)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2011
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2012 (defun mh-delete-scan-msgs (msgs)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2013 "Delete the scan listing lines for MSGS."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2014 (save-excursion
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
2015 (while msgs
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2016 (when (mh-goto-msg (car msgs) t t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2017 (when (memq 'unthread mh-view-ops)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2018 (mh-thread-forget-message (car msgs)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2019 (mh-delete-line 1))
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
2020 (setq msgs (cdr msgs)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2021
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2022 (defun mh-outstanding-commands-p ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2023 "Return non-nil if there are outstanding deletes or refiles."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2024 (or mh-delete-list mh-refile-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2025
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2026 (defun mh-coalesce-msg-list (messages)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2027 "Give a list of MESSAGES, return a list of message number ranges.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2028 Sort of the opposite of `mh-read-msg-list', which expands ranges.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2029 Message lists passed to MH programs go through this so
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2030 command line arguments won't exceed system limits."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2031 (let ((msgs (sort (copy-sequence messages) 'mh-greaterp))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2032 (range-high nil)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2033 (prev -1)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2034 (ranges nil))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2035 (while prev
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2036 (if range-high
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2037 (if (or (not (numberp prev))
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
2038 (not (equal (car msgs) (1- prev))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2039 (progn ;non-sequential, flush old range
18925
82814d4f6e51 Change eql calls to = or equal.
Richard M. Stallman <rms@gnu.org>
parents: 17422
diff changeset
2040 (if (eq prev range-high)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2041 (setq ranges (cons range-high ranges))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2042 (setq ranges (cons (format "%s-%s" prev range-high) ranges)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2043 (setq range-high nil))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2044 (or range-high
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2045 (setq range-high (car msgs))) ;start new or first range
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2046 (setq prev (car msgs))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2047 (setq msgs (cdr msgs)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2048 ranges))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2049
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2050 (defun mh-greaterp (msg1 msg2)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2051 "Return the greater of two message indicators MSG1 and MSG2.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2052 Strings are \"smaller\" than numbers.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2053 Legal values are things like \"cur\", \"last\", 1, and 1820."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2054 (if (numberp msg1)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2055 (if (numberp msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2056 (> msg1 msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2057 t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2058 (if (numberp msg2)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2059 nil
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2060 (string-lessp msg2 msg1))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2061
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2062 (defun mh-lessp (msg1 msg2)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2063 "Return the lesser of two message indicators MSG1 and MSG2.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2064 Strings are \"smaller\" than numbers.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2065 Legal values are things like \"cur\", \"last\", 1, and 1820."
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2066 (not (mh-greaterp msg1 msg2)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2067
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2068
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2069
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2070 ;;; Basic sequence handling
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2071
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2072 (defun mh-delete-seq-locally (seq)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2073 "Remove MH-E's record of SEQ."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2074 (let ((entry (mh-find-seq seq)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2075 (setq mh-seq-list (delq entry mh-seq-list))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2076
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2077 (defun mh-read-folder-sequences (folder save-refiles)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2078 "Read and return the predefined sequences for a FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2079 If SAVE-REFILES is non-nil, then keep the sequences
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2080 that note messages to be refiled."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2081 (let ((seqs ()))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2082 (cond (save-refiles
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2083 (mh-mapc (function (lambda (seq) ; Save the refiling sequences
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2084 (if (mh-folder-name-p (mh-seq-name seq))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2085 (setq seqs (cons seq seqs)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2086 mh-seq-list)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2087 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2088 (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list"))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2089 (progn
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2090 ;; 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
2091 (while (re-search-forward "^[^: ]+" nil t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2092 (setq seqs (cons (mh-make-seq (intern (buffer-substring
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2093 (match-beginning 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2094 (match-end 0)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2095 (mh-read-msg-list))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2096 seqs)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2097 (delete-region (point-min) (point))))) ; avoid race with
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2098 ; mh-process-daemon
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2099 seqs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2100
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2101 (defun mh-read-msg-list ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2102 "Return a list of message numbers from point to the end of the line.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2103 Expands ranges into set of individual numbers."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2104 (let ((msgs ())
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2105 (end-of-line (save-excursion (end-of-line) (point)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2106 num)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2107 (while (re-search-forward "[0-9]+" end-of-line t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2108 (setq num (string-to-int (buffer-substring (match-beginning 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2109 (match-end 0))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2110 (cond ((looking-at "-") ; Message range
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2111 (forward-char 1)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2112 (re-search-forward "[0-9]+" end-of-line t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2113 (let ((num2 (string-to-int (buffer-substring (match-beginning 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2114 (match-end 0)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2115 (if (< num2 num)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2116 (error "Bad message range: %d-%d" num num2))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2117 (while (<= num num2)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2118 (setq msgs (cons num msgs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2119 (setq num (1+ num)))))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2120 ((not (zerop num)) ;"pick" outputs "0" to mean no match
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2121 (setq msgs (cons num msgs)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2122 msgs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2123
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2124 (defun mh-notate-user-sequences ()
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2125 "Mark the scan listing of all messages in user-defined sequences."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2126 (let ((seqs mh-seq-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2127 name)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2128 (while seqs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2129 (setq name (mh-seq-name (car seqs)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2130 (if (not (mh-internal-seq name))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2131 (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
2132 (setq seqs (cdr seqs)))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2133
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2134 (defun mh-internal-seq (name)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2135 "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
2136 (or (memq name '(answered cur deleted forwarded printed))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2137 (eq name mh-unseen-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2138 (eq name mh-previous-seq)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2139 (mh-folder-name-p name)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2140
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2141 (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
2142 "Delete MESSAGE from SEQUENCE.
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2143 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
2144 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
2145 (interactive (list (mh-get-msg-num t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2146 (mh-read-seq-default "Delete from" t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2147 nil))
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2148 (let ((entry (mh-find-seq sequence)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2149 (cond (entry
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2150 (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
2151 (if (not internal-flag)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2152 (mh-undefine-sequence sequence (list message)))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2153 (setcdr entry (delq message (mh-seq-msgs entry)))))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2154
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2155 (defun mh-undefine-sequence (seq msgs)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2156 "Remove from the SEQ the list of MSGS."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2157 (mh-exec-cmd "mark" mh-current-folder "-delete"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2158 "-sequence" (symbol-name seq)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2159 (mh-coalesce-msg-list msgs)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2160
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2161 (defun mh-define-sequence (seq msgs)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2162 "Define the SEQ to contain the list of MSGS.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2163 Do not mark pseudo-sequences or empty sequences.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2164 Signals an error if SEQ is an illegal name."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2165 (if (and msgs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2166 (not (mh-folder-name-p seq)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2167 (save-excursion
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2168 (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2169 "-sequence" (symbol-name seq)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2170 (mh-coalesce-msg-list msgs)))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2171
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2172 (defun mh-map-over-seqs (function seq-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2173 "Apply FUNCTION to each sequence in SEQ-LIST.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2174 The sequence name and the list of messages are passed as arguments."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2175 (while seq-list
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2176 (funcall function
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2177 (mh-seq-name (car seq-list))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2178 (mh-seq-msgs (car seq-list)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2179 (setq seq-list (cdr seq-list))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2180
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2181 (defun mh-notate-if-in-one-seq (msg character offset seq)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2182 "Notate MSG.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2183 The CHARACTER is placed at the given OFFSET from the beginning of the listing.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2184 The notation is performed if the MSG is only in SEQ."
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2185 (let ((in-seqs (mh-seq-containing-msg msg nil)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2186 (if (and (eq seq (car in-seqs)) (null (cdr in-seqs)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2187 (mh-notate msg character offset))))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2188
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2189 (defun mh-seq-containing-msg (msg &optional include-internal-flag)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2190 "Return a list of the sequences containing MSG.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2191 If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2192 (let ((l mh-seq-list)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2193 (seqs ()))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2194 (while l
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2195 (and (memq msg (mh-seq-msgs (car l)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2196 (or include-internal-flag
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2197 (not (mh-internal-seq (mh-seq-name (car l)))))
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2198 (setq seqs (cons (mh-seq-name (car l)) seqs)))
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2199 (setq l (cdr l)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2200 seqs))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2201
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2202
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2203
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2204 ;;; User prompting commands.
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2205
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2206 (defun mh-read-msg-range (prompt)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2207 "Read a list of blank-separated messages using the given PROMPT."
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2208 (let* ((buf (read-string prompt))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2209 (buf-size (length buf))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2210 (start 0)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2211 (input ()))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2212 (while (< start buf-size)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2213 (let ((next (read-from-string buf start buf-size)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2214 (setq input (cons (car next) input))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2215 (setq start (cdr next))))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2216 (nreverse input)))
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2217
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2218
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2219
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2220 ;;; Build the folder-mode keymap:
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2221
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2222 (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
2223
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2224 ;; Use defalias to make sure the documented primary key bindings
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2225 ;; appear in menu lists.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2226 (defalias 'mh-alt-show 'mh-show)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2227 (defalias 'mh-alt-refile-msg 'mh-refile-msg)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2228 (defalias 'mh-alt-send 'mh-send)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2229 (defalias 'mh-alt-visit-folder 'mh-visit-folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2230
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2231 ;; 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
2232 (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
2233 " " mh-page-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2234 "!" mh-refile-or-write-again
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2235 "," mh-header-display
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2236 "." mh-alt-show
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2237 ">" mh-write-msg-to-file
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2238 "?" mh-help
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2239 "E" mh-extract-rejected-mail
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2240 "M" mh-modify
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2241 "\177" mh-previous-page
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2242 "\C-d" mh-delete-msg-no-motion
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2243 "\t" mh-next-button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2244 [backtab] mh-prev-button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2245 "\M-\t" mh-prev-button
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2246 "\e<" mh-first-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2247 "\e>" mh-last-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2248 "\ed" mh-redistribute
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2249 "\r" mh-show
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2250 "^" mh-alt-refile-msg
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2251 "c" mh-copy-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2252 "d" mh-delete-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2253 "e" mh-edit-again
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2254 "f" mh-forward
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2255 "g" mh-goto-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2256 "i" mh-inc-folder
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2257 "k" mh-delete-subject
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2258 "l" mh-print-msg
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2259 "m" mh-alt-send
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2260 "n" mh-next-undeleted-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2261 "o" mh-refile-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2262 "p" mh-previous-undeleted-msg
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2263 "q" mh-quit
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2264 "r" mh-reply
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2265 "s" mh-send
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2266 "t" mh-toggle-showing
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2267 "u" mh-undo
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2268 "x" mh-execute-commands
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2269 "|" mh-pipe-msg)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2270
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2271 (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2272 "?" mh-prefix-help
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2273 "S" mh-sort-folder
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2274 "f" mh-alt-visit-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2275 "i" mh-index-search
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2276 "k" mh-kill-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2277 "l" mh-list-folders
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2278 "o" mh-alt-visit-folder
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2279 "p" mh-pack-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2280 "r" mh-rescan-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2281 "s" mh-search-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2282 "u" mh-undo-folder
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2283 "v" mh-visit-folder)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2284
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2285 (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2286 "?" mh-prefix-help
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2287 "d" mh-delete-msg-from-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2288 "k" mh-delete-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2289 "l" mh-list-sequences
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2290 "n" mh-narrow-to-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2291 "p" mh-put-msg-in-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2292 "s" mh-msg-is-in-seq
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2293 "w" mh-widen)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2294
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2295 (gnus-define-keys (mh-thread-map "T" mh-folder-mode-map)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2296 "?" mh-prefix-help
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2297 "t" mh-toggle-threads)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2298
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2299 (gnus-define-keys (mh-limit-map "/" mh-folder-mode-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2300 "?" mh-prefix-help
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2301 "s" mh-narrow-to-subject
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2302 "w" mh-widen)
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2303
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2304 (gnus-define-keys (mh-extract-map "X" mh-folder-mode-map)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2305 "?" mh-prefix-help
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2306 "s" mh-store-msg ;shar
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2307 "u" mh-store-msg) ;uuencode
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2308
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2309 (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
2310 " " mh-page-digest
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2311 "?" mh-prefix-help
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2312 "\177" mh-page-digest-backwards
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2313 "b" mh-burst-digest)
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2314
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2315 (gnus-define-keys (mh-mime-map "K" mh-folder-mode-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2316 "?" mh-prefix-help
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2317 "a" mh-mime-save-parts
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2318 "i" mh-folder-inline-mime-part
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2319 "o" mh-folder-save-mime-part
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2320 "v" mh-folder-toggle-mime-part
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2321 "\t" mh-next-button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2322 [backtab] mh-prev-button
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2323 "\M-\t" mh-prev-button)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2324
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2325 (cond
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2326 (mh-xemacs-flag
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2327 (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
2328 (t
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2329 (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
2330
13384
917a1b8dab28 (mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents: 11577
diff changeset
2331 ;; "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
2332
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2333
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2334
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2335 ;;; Help Messages
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2336
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2337 ;;; If you add a new prefix, add appropriate text to the nil key.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2338 ;;;
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2339 ;;; In general, messages are grouped logically. Taking the main commands for
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2340 ;;; example, the first line is "ways to view messages," the second line is
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2341 ;;; "things you can do with messages", and the third is "composing" messages.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2342 ;;;
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2343 ;;; When adding a new prefix, ensure that the help message contains "what" the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2344 ;;; prefix is for. For example, if the word "folder" were not present in the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2345 ;;; `F' entry, it would not be clear what these commands operated upon.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2346 (defvar mh-help-messages
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2347 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2348 "[d]elete, [o]refile, e[x]ecute,\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2349 "[s]end, [r]eply.\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2350 "Prefix characters:\n [F]older, [S]equence, MIME [K]eys, "
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2351 "[T]hread, / Limit, e[X]tract, [D]igest.")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2352
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2353 (?F "[l]ist, [v]isit folder;\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2354 "[t]hread; [s]earch; [i]ndexed search;\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2355 "[p]ack; [S]ort; [r]escan; [k]ill")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2356 (?S "[p]ut message in sequence, [n]arrow, [w]iden,\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2357 "[s]equences, [l]ist,\n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2358 "[d]elete message from sequence, [k]ill sequence")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2359 (?T "[t]oggle thread")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2360 (?/ "Limit to [s]ubject; [w]iden")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2361 (?X "un[s]har, [u]udecode message")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2362 (?D "[b]urst digest")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2363 (?K "[v]iew, [i]nline, [o]utput/save MIME part; save [a]ll parts; \n"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2364 "[TAB] next; [SHIFT-TAB] previous"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2365 "Key binding cheat sheet.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2366
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2367 This is an associative array which is used to show the most common commands.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2368 The key is a prefix char. The value is one or more strings which are
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2369 concatenated together and displayed in the minibuffer if ? is pressed after
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2370 the prefix character. The special key nil is used to display the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2371 non-prefixed commands.
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2372
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2373 The substitutions described in `substitute-command-keys' are performed as
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2374 well.")
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2375
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2376
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2377
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2378 ;;; autoload the other MH-E parts
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2379
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2380 ;;; mh-comp
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2381
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2382 (autoload 'mh-smail "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2383 "Compose and send mail with the MH mail system.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2384 This function is an entry point to MH-E, the Emacs front end
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2385 to the MH mail system.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2386 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
2387
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2388 (autoload 'mh-smail-other-window "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2389 "Compose and send mail in other window with the MH mail system.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2390 This function is an entry point to MH-E, the Emacs front end
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2391 to the MH mail system.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2392 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
2393
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2394 (autoload 'mh-edit-again "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2395 "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
2396 Default is the current message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2397 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
2398 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2399
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2400 (autoload 'mh-extract-rejected-mail "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2401 "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
2402 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
2403 gives the headers to clean out of the original message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2404 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2405
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2406 (autoload 'mh-forward "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2407 "Forward a message or message sequence. Defaults to displayed message.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2408 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
2409 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2410
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2411 (autoload 'mh-redistribute "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2412 "Redistribute a letter.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2413 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
2414 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
2415
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2416 (autoload 'mh-send "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2417 "Compose and send a letter.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2418 The file named by `mh-comp-formfile' will be used as the form.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2419 Do not call this function from outside MH-E; use \\[mh-smail] instead.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2420 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
2421 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
2422 draft and passed three arguments: to, subject, and cc." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2423
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2424 (autoload 'mh-send-other-window "mh-comp"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2425 "Compose and send a letter in another window.
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2426 Do not call this function from outside MH-E;
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2427 use \\[mh-smail-other-window] instead.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2428 See also documentation for `\\[mh-send]' function." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2429
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2430 (autoload 'mh-letter-mode "mh-comp"
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2431 "Mode for composing letters in MH-E.
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2432 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
2433
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2434 ;;; mh-funcs
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2435
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2436 (autoload 'mh-burst-digest "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2437 "Burst apart the current message, which should be a digest.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2438 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
2439 digest are inserted into the folder after that message." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2440
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2441 (autoload 'mh-copy-msg "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2442 "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
2443 Default is the displayed message. If optional prefix argument is
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2444 provided, then prompt for the message sequence." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2445
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2446 (autoload 'mh-kill-folder "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2447 "Remove the current folder." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2448
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2449 (autoload 'mh-list-folders "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2450 "List mail folders." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2451
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2452 (autoload 'mh-pack-folder "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2453 "Renumber the messages of a folder to be 1..n.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2454 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
2455 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
2456 to display after packing. Otherwise, show the entire folder." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2457
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2458 (autoload 'mh-pipe-msg "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2459 "Pipe the current message through the given shell COMMAND.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2460 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
2461 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
2462
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2463 (autoload 'mh-page-digest "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2464 "Advance displayed message to next digested message." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2465
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2466 (autoload 'mh-page-digest-backwards "mh-funcs"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2467 "Back up displayed message to previous digested message." t)
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2468
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2469 (autoload 'mh-print-msg "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2470 "Print MESSAGE(s) (default: displayed message) on printer.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2471 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
2472 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
2473 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
2474
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2475 (autoload 'mh-sort-folder "mh-funcs"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2476 "Sort the messages in the current folder by date.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2477 Calls the MH program sortm to do the work.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2478 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
2479 if this function is passed an argument." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2480
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2481 (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
2482 "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
2483 The message can contain a shar file or uuencoded file.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2484 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
2485 mh-store-default-directory or the current directory." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2486
6855
3cd45985c88c (mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents: 6365
diff changeset
2487 (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
2488 "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
2489 The buffer can contain a shar file or uuencoded file.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2490 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
2491 `mh-store-default-directory' or the current directory." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2492
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2493 (autoload 'mh-help "mh-funcs"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2494 "Display cheat sheet for MH-E commands in minibuffer." t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2495
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2496 (autoload 'mh-prefix-help "mh-funcs"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2497 "Display cheat sheet for the commands of the current prefix in minibuffer."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2498 t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2499
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2500 ;;; mh-pick
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2501
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2502 (autoload 'mh-search-folder "mh-pick"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2503 "Search FOLDER for messages matching a pattern.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2504 Add the messages found to the sequence named `search'." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2505
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2506 ;;; mh-seq
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2507
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2508 (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
2509 "Define sequence 'region as the messages in selected region." t)
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2510 (autoload 'mh-delete-seq "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2511 "Delete the SEQUENCE." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2512 (autoload 'mh-list-sequences "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2513 "List the sequences defined in FOLDER." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2514 (autoload 'mh-msg-is-in-seq "mh-seq"
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2515 "Display the sequences that contain MESSAGE (default: displayed message)." t)
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2516 (autoload 'mh-narrow-to-seq "mh-seq"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2517 "Restrict display of this folder to just messages in SEQUENCE
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2518 Use \\[mh-widen] to undo this command." t)
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2519 (autoload 'mh-put-msg-in-seq "mh-seq"
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2520 "Add MESSAGE(s) (default: displayed message) to SEQUENCE.
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2521 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
2522 (autoload 'mh-rename-seq "mh-seq"
11332
c9c652970786 New version from author.
Karl Heuer <kwzh@gnu.org>
parents: 8691
diff changeset
2523 "Rename SEQUENCE to have NEW-NAME." t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2524 (autoload 'mh-narrow-to-subject "mh-seq"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2525 "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
2526 t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2527 (autoload 'mh-toggle-threads "mh-seq"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2528 "Toggle threaded view of folder." t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2529 (autoload 'mh-delete-subject "mh-seq"
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2530 "Mark all following messages with same subject to be deleted." t)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2531
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2532 ;;; mh-speed
47730
2568d5a27317 Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents: 42205
diff changeset
2533
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2534 (autoload 'mh-folder-speedbar-buttons "mh-speed")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2535 (autoload 'mh-show-speedbar-buttons "mh-speed")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2536 (autoload 'mh-index-folder-speedbar-buttons "mh-speed")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2537 (autoload 'mh-index-show-speedbar-buttons "mh-speed")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2538 (autoload 'mh-letter-speedbar-buttons "mh-speed")
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2539
29078
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2540 (dolist (mess '("^Cursor not pointing to message$"
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2541 "^There is no other window$"))
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2542 (add-to-list 'debug-ignored-errors mess))
2e20146198ce Add to debug-ignored-errors.
Dave Love <fx@gnu.org>
parents: 28033
diff changeset
2543
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2544 (provide 'mh-e)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2545
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2546 ;;; Local Variables:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2547 ;;; sentence-end-double-space: nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2548 ;;; End:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents: 47730
diff changeset
2549
6365
a1b8926f7ece entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2550 ;;; mh-e.el ends here