Mercurial > emacs
annotate lisp/mail/mh-e.el @ 49220:d3cb29669ffe
*** empty log message ***
author | Markus Rost <rost@math.uni-bielefeld.de> |
---|---|
date | Mon, 13 Jan 2003 23:47:04 +0000 |
parents | 30c4902b654d |
children |
rev | line source |
---|---|
6365 | 1 ;;; mh-e.el --- GNU Emacs interface to the MH mail system |
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 | 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 | 6 ;; Maintainer: Bill Wohler <wohler@newt.com> |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
7 ;; Version: 7.1 |
6365 | 8 ;; Keywords: mail |
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 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
6365 | 13 ;; it under the terms of the GNU General Public License as published by |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
11333 | 17 ;; GNU Emacs is distributed in the hope that it will be useful, |
6365 | 18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
14169 | 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
25 ;; Boston, MA 02111-1307, USA. | |
6365 | 26 |
27 ;;; Commentary: | |
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 | 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 | 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 | 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 | 48 ;; the -build switch to repl and forw. |
6365 | 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 | 72 |
14231
069791dced1e
Fix Change Log comment line.
Erik Naggum <erik@naggum.no>
parents:
14169
diff
changeset
|
73 ;;; Change Log: |
6365 | 74 |
14169 | 75 ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982. |
76 ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985. | |
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 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
82 ;; $Id: mh-e.el,v 1.240 2003/01/08 00:46:25 wohler Exp $ |
6365 | 83 |
84 ;;; Code: | |
85 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
86 (require 'cl) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
87 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
88 (defvar recursive-load-depth-limit) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
89 (eval-when (compile load eval) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
90 (if (and (boundp 'recursive-load-depth-limit) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
91 (integerp recursive-load-depth-limit) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
92 (> 50 recursive-load-depth-limit)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
93 (setq recursive-load-depth-limit 50))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
94 |
6365 | 95 (require 'mh-utils) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
96 (require 'gnus-util) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
97 (require 'easymenu) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
98 (if mh-xemacs-flag |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
99 (require 'mh-xemacs-compat)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
100 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
101 ;; Shush the byte-compiler |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
102 (defvar font-lock-auto-fontify) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
103 (defvar font-lock-defaults) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
104 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
105 (defconst mh-version "7.1" "Version number of MH-E.") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
106 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
107 ;;; Autoloads |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
108 (autoload 'Info-goto-node "info") |
6365 | 109 |
110 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
111 |
11332 | 112 (defvar mh-note-deleted "D" |
113 "String whose first character is used to notate deleted messages.") | |
114 | |
115 (defvar mh-note-refiled "^" | |
116 "String whose first character is used to notate refiled messages.") | |
117 | |
118 (defvar mh-note-cur "+" | |
119 "String whose first character is used to notate the current message.") | |
6365 | 120 |
121 (defvar mh-partial-folder-mode-line-annotation "select" | |
122 "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
|
123 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
|
124 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
125 ;;; 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
|
126 ;;; 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
|
127 ;;; 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
|
128 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
129 ;; 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
|
130 ;; 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
|
131 ;; 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
|
132 ;; 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
|
133 ;; 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
|
134 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
135 (defvar mh-scan-format-mh |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
136 (concat |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
137 "%4(msg)" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
138 "%<(cur)+%| %>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
139 "%<{replied}-" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
140 "%?(nonnull(comp{to}))%<(mymbox{to})t%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
141 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
142 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
143 "%?(nonnull(comp{newsgroups}))n%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
144 "%<(zero) %>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
145 "%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
|
146 "%<(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
|
147 "%<(zero)%17(friendly{from})%> " |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
148 "%{subject}%<{body}<<%{body}%>") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
149 "*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
|
150 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
|
151 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
|
152 first column is 0). |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
153 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
154 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
|
155 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
|
156 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
|
157 `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
|
158 is present.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
159 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
160 (defvar mh-scan-format-nmh |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
161 (concat |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
162 "%4(msg)" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
163 "%<(cur)+%| %>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
164 "%<{replied}-" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
165 "%?(nonnull(comp{to}))%<(mymbox{to})t%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
166 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
167 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
168 "%?(nonnull(comp{newsgroups}))n%>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
169 "%<(zero) %>" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
170 "%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
|
171 "%<(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
|
172 "%<(zero)%17(decode(friendly{from}))%> " |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
173 "%(decode{subject})%<{body}<<%{body}%>") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
174 "*Scan format string for nmh. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
175 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
|
176 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
|
177 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
|
178 first column is 0). |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
179 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
180 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
|
181 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
|
182 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
|
183 `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
|
184 is present.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
185 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
186 (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
|
187 "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
|
188 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
|
189 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
|
190 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
191 (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
|
192 "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
|
193 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
|
194 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
|
195 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
196 (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
|
197 "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
|
198 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
|
199 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
|
200 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
201 (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
|
202 "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
|
203 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
204 (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
|
205 "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
|
206 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
|
207 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
|
208 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
|
209 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
210 (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
|
211 "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
|
212 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
|
213 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
|
214 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
|
215 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
216 (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
|
217 "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
|
218 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
|
219 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
|
220 \(see `mh-scan-format-regexp').") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
221 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
222 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
223 "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
|
224 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
|
225 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
|
226 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
|
227 the recipient's name.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
228 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
229 (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
230 "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
|
231 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
|
232 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
|
233 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
234 (defvar mh-scan-subject-regexp |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
235 ;;"^ *[0-9]+........[ ]*...................\\([Rr][Ee]:\\s-*\\)*\\([^<\n]*\\)" |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
236 "^ *[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
|
237 "*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
|
238 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
|
239 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
|
240 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
|
241 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
|
242 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
243 (defvar mh-scan-format-regexp |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
244 (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
245 "Regexp matching the output of scan. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
246 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
|
247 `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
|
248 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
|
249 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
|
250 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
|
251 third should match the user name.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
252 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
253 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
254 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
255 (defvar mh-folder-font-lock-keywords |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
256 (list |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
257 ;; Folders when displaying index buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
258 (list "^\\+.*" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
259 '(0 mh-index-folder-face)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
260 ;; Marked for deletion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
261 (list (concat mh-scan-deleted-msg-regexp ".*") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
262 '(0 mh-folder-deleted-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
263 ;; Marked for refile |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
264 (list (concat mh-scan-refiled-msg-regexp ".*") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
265 '(0 mh-folder-refiled-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
266 ;;after subj |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
267 (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
|
268 '(mh-folder-font-lock-subject |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
269 (1 mh-folder-followup-face append t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
270 (2 mh-folder-subject-face append t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
271 ;;current msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
272 (list mh-scan-cur-msg-number-regexp |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
273 '(1 mh-folder-cur-msg-number-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
274 (list mh-scan-good-msg-regexp |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
275 '(1 mh-folder-msg-number-face)) ;; Msg number |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
276 (list mh-scan-date-regexp '(1 mh-folder-date-face)) ;; Date |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
277 (list mh-scan-rcpt-regexp |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
278 '(1 mh-folder-to-face) ;; To: |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
279 '(2 mh-folder-address-face)) ;; address |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
280 ;; scan font-lock name |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
281 (list mh-scan-format-regexp |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
282 '(1 mh-folder-date-face) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
283 '(3 mh-folder-scan-format-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
284 ;; Current message line |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
285 (list mh-scan-cur-msg-regexp |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
286 '(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
|
287 ;; Unseen messages in bold |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
288 '(mh-folder-font-lock-unseen (1 'bold append t))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
289 "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
|
290 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
291 (defvar mh-scan-cmd-note-width 1 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
292 "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
|
293 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
|
294 ` ' is the default value, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
295 `D' is the `mh-note-deleted' character, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
296 `^' is the `mh-note-refiled' character, and |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
297 `+' is the `mh-note-cur' character.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
298 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
299 (defvar mh-scan-destination-width 1 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
300 "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
|
301 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
|
302 A ' ' blank space is the default character. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
303 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
|
304 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
|
305 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
|
306 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
|
307 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
|
308 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
|
309 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
310 (defvar mh-scan-date-width 5 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
311 "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
|
312 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
|
313 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
314 (defvar mh-scan-date-flag-width 1 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
315 "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
|
316 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
|
317 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
318 (defvar mh-scan-from-mbox-width 17 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
319 "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
|
320 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
|
321 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
|
322 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
323 (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
|
324 "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
|
325 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
|
326 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
327 (defvar mh-scan-field-from-start-offset |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
328 (+ mh-scan-cmd-note-width |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
329 mh-scan-destination-width |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
330 mh-scan-date-width |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
331 mh-scan-date-flag-width) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
332 "The offset from the `mh-cmd-note' to find the start of \"From:\" address.") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
333 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
334 (defvar mh-scan-field-from-end-offset |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
335 (+ mh-scan-field-from-start-offset mh-scan-from-mbox-width) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
336 "The offset from the `mh-cmd-note' to find the end of \"From:\" address.") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
337 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
338 (defvar mh-scan-field-subject-start-offset |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
339 (+ mh-scan-cmd-note-width |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
340 mh-scan-destination-width |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
341 mh-scan-date-width |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
342 mh-scan-date-flag-width |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
343 mh-scan-from-mbox-width |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
344 mh-scan-from-mbox-sep-width) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
345 "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
|
346 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
347 (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
|
348 "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
|
349 (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
|
350 nil |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
351 (if (match-beginning 1) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
352 (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
|
353 (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
|
354 (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
|
355 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
|
356 t)) |
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 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
359 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
360 ;; Fontifify unseen mesages in bold. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
361 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
362 (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
|
363 "Name of unseen sequence. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
364 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
|
365 On nmh systems.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
366 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
367 (defun mh-folder-unseen-seq-name () |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
368 "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
|
369 (or mh-progs (mh-find-path)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
370 (save-excursion |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
371 (let ((unseen-seq-name "unseen")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
372 (with-temp-buffer |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
373 (unwind-protect |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
374 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
375 (call-process (expand-file-name "mhparam" mh-progs) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
376 nil '(t t) nil "-component" "Unseen-Sequence") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
377 (goto-char (point-min)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
378 (if (re-search-forward "Unseen-Sequence: \\(.*\\)$" nil t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
379 (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
|
380 unseen-seq-name))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
381 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
382 (defun mh-folder-unseen-seq-list () |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
383 "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
|
384 (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
|
385 (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
|
386 (cond |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
387 ((not mh-folder-unseen-seq-name) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
388 nil) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
389 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
390 (let ((folder mh-current-folder)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
391 (save-excursion |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
392 (with-temp-buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
393 (unwind-protect |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
394 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
395 (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
|
396 nil '(t t) nil |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
397 folder "-seq" mh-folder-unseen-seq-name |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
398 "-list") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
399 (goto-char (point-min)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
400 (sort (mh-read-msg-list) '<))))))))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
401 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
402 (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
|
403 "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
|
404 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
|
405 is done highlighting.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
406 (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
|
407 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
408 (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
|
409 "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
|
410 (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
|
411 (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
|
412 (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
|
413 (cond |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
414 ((not mh-folder-unseen-seq-cache) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
415 nil) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
416 ((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
|
417 (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
|
418 nil) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
419 ((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
|
420 (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
|
421 (epoint (progn (forward-line 1)(point)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
422 (if (<= limit (point)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
423 (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
|
424 (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
|
425 t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
426 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
427 ;; 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
|
428 (while (and |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
429 (= 0 (forward-line 1)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
430 (> limit (point)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
431 (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
|
432 ;; 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
|
433 (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
|
434 (cond |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
435 ((or (not cur-msg) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
436 (<= limit (point)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
437 (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
|
438 (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
|
439 nil) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
440 ((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
|
441 (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
|
442 (epoint (progn (forward-line 1)(point)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
443 (if (<= limit (point)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
444 (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
|
445 (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
|
446 t)))))))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
447 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
448 |
6365 | 449 |
450 ;;; Internal variables: | |
451 | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
452 (defvar mh-last-destination nil) ;Destination of last refile or write |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
453 ;command. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
454 (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
|
455 (defvar mh-last-destination-write nil) ;Destination of last write command. |
6365 | 456 |
457 (defvar mh-folder-mode-map (make-keymap) | |
458 "Keymap for MH folders.") | |
459 | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
460 (defvar mh-delete-list nil) ;List of msg numbers to delete. |
6365 | 461 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
462 (defvar mh-refile-list nil) ;List of folder names in mh-seq-list. |
6365 | 463 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
464 (defvar mh-next-direction 'forward) ;Direction to move to next message. |
6365 | 465 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
466 (defvar mh-narrowed-to-seq nil) ;Sequence display is narrowed to or |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
467 ;nil if not narrowed. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
468 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
469 (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
|
470 ;view (such as narrowing or threading). |
6365 | 471 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
472 (defvar mh-index-data nil) ;Info about index search results |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
473 (defvar mh-index-previous-search nil) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
474 (defvar mh-index-msg-checksum-map nil) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
475 (defvar mh-index-checksum-origin-map nil) |
6365 | 476 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
477 (defvar mh-first-msg-num nil) ;Number of first msg in buffer. |
6365 | 478 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
479 (defvar mh-last-msg-num nil) ;Number of last msg in buffer. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
480 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
481 (defvar mh-mode-line-annotation nil) ;Message range displayed in buffer. |
6365 | 482 |
483 ;;; Macros and generic functions: | |
484 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
485 (defun mh-mapc (function list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
486 "Apply FUNCTION to each element of LIST for side effects only." |
6365 | 487 (while list |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
488 (funcall function (car list)) |
6365 | 489 (setq list (cdr list)))) |
490 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
491 (defun mh-scan-format () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
492 "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
|
493 (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
|
494 (list "-format" (if mh-nmh-flag |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
495 (list (mh-update-scan-format |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
496 mh-scan-format-nmh mh-cmd-note)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
497 (list (mh-update-scan-format |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
498 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
|
499 (if (not (equal mh-scan-format-file nil)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
500 (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
|
501 |
6365 | 502 |
503 | |
504 ;;; Entry points: | |
505 | |
506 ;;;###autoload | |
507 (defun mh-rmail (&optional arg) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
508 "Inc(orporate) new mail with MH. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
509 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
|
510 the Emacs front end to the MH mail system." |
6365 | 511 (interactive "P") |
512 (mh-find-path) | |
513 (if arg | |
514 (call-interactively 'mh-visit-folder) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
515 (mh-inc-folder))) |
6365 | 516 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
517 ;;;###autoload |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
518 (defun mh-nmail (&optional arg) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
519 "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
|
520 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
|
521 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
|
522 (interactive "P") |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
523 (mh-find-path) ; init mh-inbox |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
524 (if arg |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
525 (call-interactively 'mh-visit-folder) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
526 (mh-visit-folder mh-inbox))) |
6365 | 527 |
528 | |
529 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
530 ;;; User executable MH-E commands: |
6365 | 531 |
532 (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
|
533 "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
|
534 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
535 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
|
536 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
|
537 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
|
538 (interactive (list (cond |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
539 ((mh-mark-active-p t) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
540 (mh-region-to-msg-list (region-beginning) (region-end))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
541 (current-prefix-arg |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
542 (mh-read-seq-default "Delete" t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
543 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
544 (mh-get-msg-num t))))) |
6365 | 545 (mh-delete-msg-no-motion msg-or-seq) |
546 (mh-next-msg)) | |
547 | |
548 (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
|
549 "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
|
550 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
|
551 then prompt for the message sequence." |
6365 | 552 (interactive (list (if current-prefix-arg |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
553 (mh-read-seq-default "Delete" t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
554 (mh-get-msg-num t)))) |
6365 | 555 (if (numberp msg-or-seq) |
556 (mh-delete-a-msg msg-or-seq) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
557 (mh-map-to-seq-msgs 'mh-delete-a-msg msg-or-seq))) |
6365 | 558 |
559 (defun mh-execute-commands () | |
560 "Process outstanding delete and refile requests." | |
561 (interactive) | |
562 (if mh-narrowed-to-seq (mh-widen)) | |
563 (mh-process-commands mh-current-folder) | |
564 (mh-set-scan-mode) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
565 (mh-goto-cur-msg) ; after mh-set-scan-mode for efficiency |
6365 | 566 (mh-make-folder-mode-line) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
567 t) ; return t for write-file-functions |
6365 | 568 |
569 (defun mh-first-msg () | |
570 "Move to the first message." | |
571 (interactive) | |
11332 | 572 (goto-char (point-min)) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
573 (while (and (not (eobp)) (not (looking-at mh-scan-valid-regexp))) |
11332 | 574 (forward-line 1))) |
6365 | 575 |
576 (defun mh-header-display () | |
577 "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
|
578 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
|
579 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
|
580 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
|
581 Type \"\\[mh-show]\" to show the message normally again." |
6365 | 582 (interactive) |
583 (and (not mh-showing-with-headers) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
584 (or mhl-formfile mh-clean-message-header-flag) |
6365 | 585 (mh-invalidate-show-buffer)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
586 (let ((mh-decode-mime-flag nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
587 (mhl-formfile nil) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
588 (mh-clean-message-header-flag nil)) |
6365 | 589 (mh-show-msg nil) |
590 (mh-in-show-buffer (mh-show-buffer) | |
591 (goto-char (point-min)) | |
592 (mh-recenter 0)) | |
593 (setq mh-showing-with-headers t))) | |
594 | |
595 (defun mh-inc-folder (&optional maildrop-name) | |
11332 | 596 "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
|
597 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
|
598 default. If the prefix argument is given, incorporates mail into the current |
11332 | 599 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
|
600 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
|
601 arguments, after incorporating new mail. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
602 Do not call this function from outside MH-E; use \\[mh-rmail] instead." |
6365 | 603 (interactive (list (if current-prefix-arg |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
604 (expand-file-name |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
605 (read-file-name "inc mail from file: " |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
606 mh-user-path))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
607 (let ((threading-needed-flag nil)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
608 (let ((config (current-window-configuration))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
609 (if (not maildrop-name) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
610 (cond ((not (get-buffer mh-inbox)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
611 (mh-make-folder mh-inbox) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
612 (setq threading-needed-flag mh-show-threads-flag) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
613 (setq mh-previous-window-config config)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
614 ((not (eq (current-buffer) (get-buffer mh-inbox))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
615 (switch-to-buffer mh-inbox) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
616 (setq mh-previous-window-config config))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
617 (mh-get-new-mail maildrop-name) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
618 (when (and threading-needed-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
619 (save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
620 (goto-char (point-min)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
621 (or (null mh-large-folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
622 (not (equal (forward-line mh-large-folder) 0)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
623 (and (message "Not threading since the number of messages exceeds `mh-large-folder'") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
624 nil)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
625 (mh-toggle-threads)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
626 (if mh-showing-mode (mh-show)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
627 (run-hooks 'mh-inc-folder-hook))) |
6365 | 628 |
629 (defun mh-last-msg () | |
630 "Move to the last message." | |
631 (interactive) | |
632 (goto-char (point-max)) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
633 (while (and (not (bobp)) (not (looking-at mh-scan-valid-regexp))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
634 (forward-line -1)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
635 (mh-recenter nil)) |
6365 | 636 |
637 (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
|
638 "Move to the next undeleted message ARG in window." |
11332 | 639 (interactive "p") |
6365 | 640 (setq mh-next-direction 'forward) |
11332 | 641 (forward-line 1) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
642 (cond ((re-search-forward mh-scan-good-msg-regexp nil t arg) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
643 (beginning-of-line) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
644 (mh-maybe-show)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
645 (t (forward-line -1) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
646 (message "No more undeleted messages")))) |
6365 | 647 |
11332 | 648 (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
|
649 "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
|
650 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
|
651 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
|
652 selected region is marked for refiling." |
6365 | 653 (interactive |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
654 (list (cond |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
655 ((mh-mark-active-p t) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
656 (mh-region-to-msg-list (region-beginning) (region-end))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
657 (current-prefix-arg |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
658 (mh-read-seq-default "Refile" t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
659 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
660 (mh-get-msg-num t))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
661 (intern |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
662 (mh-prompt-for-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
663 "Destination" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
664 (or (and mh-default-folder-for-message-function |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
665 (let ((refile-file (mh-msg-filename (mh-get-msg-num t)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
666 (save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
667 (set-buffer (get-buffer-create mh-temp-buffer)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
668 (erase-buffer) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
669 (insert-file-contents refile-file) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
670 (let ((buffer-file-name refile-file)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
671 (funcall mh-default-folder-for-message-function))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
672 (and (eq 'refile (car mh-last-destination-folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
673 (symbol-name (cdr mh-last-destination-folder))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
674 "") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
675 t)))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
676 (setq mh-last-destination (cons 'refile folder) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
677 mh-last-destination-folder mh-last-destination) |
6365 | 678 (if (numberp msg-or-seq) |
11332 | 679 (mh-refile-a-msg msg-or-seq folder) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
680 (mh-map-to-seq-msgs 'mh-refile-a-msg msg-or-seq folder)) |
6365 | 681 (mh-next-msg)) |
682 | |
11332 | 683 (defun mh-refile-or-write-again (message) |
6365 | 684 "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
|
685 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
|
686 refile or write command." |
6365 | 687 (interactive (list (mh-get-msg-num t))) |
688 (if (null mh-last-destination) | |
689 (error "No previous refile or write")) | |
690 (cond ((eq (car mh-last-destination) 'refile) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
691 (mh-refile-a-msg message (cdr mh-last-destination)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
692 (message "Destination folder: %s" (cdr mh-last-destination))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
693 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
694 (apply 'mh-write-msg-to-file message (cdr mh-last-destination)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
695 (message "Destination: %s" (cdr mh-last-destination)))) |
6365 | 696 (mh-next-msg)) |
697 | |
698 (defun mh-quit () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
699 "Quit the current MH-E folder. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
700 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
|
701 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
|
702 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
|
703 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
|
704 arguments, upon exit of this function." |
6365 | 705 (interactive) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
706 (run-hooks 'mh-before-quit-hook) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
707 (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
|
708 (when show-buffer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
709 (kill-buffer show-buffer))) |
11332 | 710 (mh-update-sequences) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
711 (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
|
712 (bury-buffer (current-buffer)) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
713 (if (get-buffer mh-temp-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
714 (kill-buffer mh-temp-buffer)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
715 (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
|
716 (kill-buffer mh-temp-folders-buffer)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
717 (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
|
718 (kill-buffer mh-temp-sequences-buffer)) |
6365 | 719 (if mh-previous-window-config |
720 (set-window-configuration mh-previous-window-config)) | |
721 (run-hooks 'mh-quit-hook)) | |
722 | |
723 (defun mh-page-msg (&optional arg) | |
724 "Page the displayed message forwards. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
725 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
|
726 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
|
727 bottom of the current message." |
6365 | 728 (interactive "P") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
729 (if mh-showing-mode |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
730 (if mh-page-to-next-msg-flag |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
731 (if (equal mh-next-direction 'backward) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
732 (mh-previous-undeleted-msg) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
733 (mh-next-undeleted-msg)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
734 (if (mh-in-show-buffer (mh-show-buffer) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
735 (pos-visible-in-window-p (point-max))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
736 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
737 (message (format |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
738 "End of message (Type %s to read %s undeleted message)" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
739 (single-key-description last-input-event) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
740 (if (equal mh-next-direction 'backward) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
741 "previous" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
742 "next"))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
743 (setq mh-page-to-next-msg-flag t)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
744 (scroll-other-window arg))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
745 (mh-show))) |
6365 | 746 |
747 (defun mh-previous-page (&optional arg) | |
748 "Page the displayed message backwards. | |
749 Scrolls ARG lines or a full screen if no argument is supplied." | |
750 (interactive "P") | |
751 (mh-in-show-buffer (mh-show-buffer) | |
752 (scroll-down arg))) | |
753 | |
754 (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
|
755 "Move to the previous undeleted message ARG in window." |
6365 | 756 (interactive "p") |
757 (setq mh-next-direction 'backward) | |
758 (beginning-of-line) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
759 (cond ((re-search-backward mh-scan-good-msg-regexp nil t arg) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
760 (mh-maybe-show)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
761 (t (message "No previous undeleted message")))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
762 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
763 (defun mh-previous-unread-msg (&optional count) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
764 "Move to previous unread message. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
765 With optional argument COUNT, COUNT-1 unread messages before current message |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
766 are skipped." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
767 (interactive "p") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
768 (unless (> count 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
769 (error "The function mh-previous-unread-msg expects positive argument")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
770 (setq count (1- count)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
771 (let ((unread-sequence (cdr (assoc mh-unseen-seq mh-seq-list))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
772 (cur-msg (mh-get-msg-num nil))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
773 (cond ((and (not cur-msg) (not (bobp)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
774 ;; If we are at the end of the buffer back up one line and go |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
775 ;; to unread message after that. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
776 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
777 (forward-line -1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
778 (setq cur-msg (mh-get-msg-num nil))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
779 nil)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
780 ((or (null unread-sequence) (not cur-msg)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
781 ;; No unread message or there aren't any messages in buffer... |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
782 (message "No more unread messages")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
783 ((progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
784 ;; Skip count messages... |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
785 (while (and unread-sequence (>= (car unread-sequence) cur-msg)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
786 (setq unread-sequence (cdr unread-sequence))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
787 (while (> count 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
788 (setq unread-sequence (cdr unread-sequence)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
789 (setq count (1- count))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
790 (not (car unread-sequence))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
791 (message "No more unread messages")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
792 (t (mh-goto-msg (car unread-sequence)))))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
793 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
794 (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
|
795 "Search for next button satisfying criterion. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
796 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
|
797 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
|
798 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
|
799 (unless (or (and (symbolp criterion) (fboundp criterion)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
800 (functionp criterion)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
801 (setq criterion (lambda (x) t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
802 ;; 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
|
803 (goto-char (or (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
804 (beginning-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
805 ;; Find point before current button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
806 (let ((point-before-current-button |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
807 (save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
808 (while (get-text-property (point) 'mh-data) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
809 (unless (= (forward-line |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
810 (if backward-flag 1 -1)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
811 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
812 (if backward-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
813 (goto-char (point-min)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
814 (goto-char (point-max))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
815 (point)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
816 ;; Skip over current button |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
817 (while (and (get-text-property (point) 'mh-data) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
818 (not (if backward-flag (bobp) (eobp)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
819 (forward-line (if backward-flag -1 1))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
820 ;; Stop at next MIME button if any exists. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
821 (block loop |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
822 (while (/= (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
823 (unless (= (forward-line |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
824 (if backward-flag -1 1)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
825 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
826 (if backward-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
827 (goto-char (point-max)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
828 (goto-char (point-min))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
829 (beginning-of-line)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
830 (point)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
831 point-before-current-button) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
832 (when (and (get-text-property (point) 'mh-data) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
833 (funcall criterion (point))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
834 (return-from loop (point)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
835 nil))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
836 (point)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
837 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
838 (defun mh-next-button (&optional backward-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
839 "Go to the next MIME button. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
840 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
|
841 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
|
842 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
|
843 previous MIME button." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
844 (interactive (list current-prefix-arg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
845 (unless mh-showing-mode |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
846 (mh-show)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
847 (mh-in-show-buffer (mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
848 (mh-goto-next-button backward-flag))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
849 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
850 (defun mh-prev-button () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
851 "Go to the prev MIME button. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
852 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
|
853 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
|
854 buffer." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
855 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
856 (mh-next-button t)) |
6365 | 857 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
858 (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
|
859 "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
|
860 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
|
861 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
|
862 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
|
863 searching for a suitable parts." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
864 (unless mh-showing-mode |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
865 (mh-show)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
866 (mh-in-show-buffer (mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
867 (let ((criterion |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
868 (cond (part-index |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
869 (lambda (p) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
870 (let ((part (get-text-property p 'mh-part))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
871 (and (integerp part) (= part part-index))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
872 (t (lambda (p) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
873 (if include-security-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
874 (get-text-property p 'mh-data) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
875 (integerp (get-text-property p 'mh-part))))))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
876 (point (point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
877 (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
|
878 (or (null part-index) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
879 (= (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
|
880 (funcall action)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
881 ((and (get-text-property point 'mh-data) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
882 include-security-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
883 (null part-index)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
884 (funcall action)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
885 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
886 (mh-goto-next-button nil criterion) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
887 (if (= (point) point) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
888 (message "No matching MIME part found") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
889 (funcall action))))))) |
6365 | 890 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
891 (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
|
892 "Toggle display of button. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
893 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
|
894 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
|
895 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
|
896 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
|
897 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
898 (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
|
899 (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
|
900 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
901 (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
|
902 "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
|
903 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
|
904 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
|
905 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
|
906 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
|
907 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
908 (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
|
909 (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
|
910 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
911 (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
|
912 "Save MIME part. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
913 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
|
914 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
|
915 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
|
916 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
|
917 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
918 (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
|
919 (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
|
920 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
921 (defun mh-reset-threads-and-narrowing () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
922 "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
|
923 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
|
924 (setq mh-view-ops ()) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
925 (setq mh-narrowed-to-seq nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
926 (let ((buffer-read-only nil)) (erase-buffer))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
927 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
928 (defun mh-rescan-folder (&optional range dont-exec-pending) |
6365 | 929 "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
|
930 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
|
931 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
|
932 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
|
933 refiles aren't carried out." |
6365 | 934 (interactive (list (if current-prefix-arg |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
935 (mh-read-msg-range mh-current-folder t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
936 nil))) |
6365 | 937 (setq mh-next-direction 'forward) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
938 (let ((threaded-flag (memq 'unthread mh-view-ops))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
939 (mh-reset-threads-and-narrowing) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
940 (mh-scan-folder mh-current-folder (or range "all") dont-exec-pending) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
941 (cond (threaded-flag (mh-toggle-threads)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
942 (mh-index-data (mh-index-insert-folder-headers))))) |
6365 | 943 |
944 (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
|
945 "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
|
946 If prefix argument NO-HEADERS is provided, write only the message body. |
6365 | 947 Otherwise send the entire message including the headers." |
948 (interactive | |
949 (list (mh-get-msg-num t) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
950 (let ((default-dir (if (eq 'write (car mh-last-destination-write)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
951 (file-name-directory |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
952 (car (cdr mh-last-destination-write))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
953 default-directory))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
954 (read-file-name (format "Save message%s in file: " |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
955 (if current-prefix-arg " body" "")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
956 default-dir |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
957 (if (eq 'write (car mh-last-destination-write)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
958 (car (cdr mh-last-destination-write)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
959 (expand-file-name "mail.out" default-dir)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
960 current-prefix-arg)) |
11332 | 961 (let ((msg-file-to-output (mh-msg-filename msg)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
962 (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
|
963 (setq mh-last-destination (list 'write file (if no-headers 'no-headers)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
964 mh-last-destination-write mh-last-destination) |
6365 | 965 (save-excursion |
11332 | 966 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 967 (erase-buffer) |
11332 | 968 (insert-file-contents msg-file-to-output) |
6365 | 969 (goto-char (point-min)) |
970 (if no-headers (search-forward "\n\n")) | |
971 (append-to-file (point) (point-max) output-file)))) | |
972 | |
973 (defun mh-toggle-showing () | |
974 "Toggle the scanning mode/showing mode of displaying messages." | |
975 (interactive) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
976 (if mh-showing-mode |
6365 | 977 (mh-set-scan-mode) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
978 (mh-show))) |
6365 | 979 |
980 (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
|
981 "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
|
982 Default is the displayed message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
983 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
|
984 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
|
985 selected region is unmarked." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
986 (interactive (list (cond |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
987 ((mh-mark-active-p t) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
988 (mh-region-to-msg-list (region-beginning) (region-end))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
989 (current-prefix-arg |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
990 (mh-read-seq-default "Undo" t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
991 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
992 (mh-get-msg-num t))))) |
6365 | 993 (cond ((numberp msg-or-seq) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
994 (let ((original-position (point))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
995 (beginning-of-line) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
996 (while (not (or (looking-at mh-scan-deleted-msg-regexp) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
997 (looking-at mh-scan-refiled-msg-regexp) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
998 (and (eq mh-next-direction 'forward) (bobp)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
999 (and (eq mh-next-direction 'backward) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1000 (save-excursion (forward-line) (eobp))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1001 (forward-line (if (eq mh-next-direction 'forward) -1 1))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1002 (if (or (looking-at mh-scan-deleted-msg-regexp) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1003 (looking-at mh-scan-refiled-msg-regexp)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1004 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1005 (mh-undo-msg (mh-get-msg-num t)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1006 (mh-maybe-show)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1007 (goto-char original-position) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1008 (error "Nothing to undo")))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1009 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1010 (mh-map-to-seq-msgs 'mh-undo-msg msg-or-seq))) |
6365 | 1011 (if (not (mh-outstanding-commands-p)) |
1012 (mh-set-folder-modified-p nil))) | |
1013 | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1014 ;;;###mh-autoload |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1015 (defun mh-folder-line-matches-show-buffer-p () |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1016 "Return t if the message under point in folder-mode is in the show buffer. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1017 Return nil in any other circumstance (no message under point, no show buffer, |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1018 the message in the show buffer doesn't match." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1019 (and (eq major-mode 'mh-folder-mode) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1020 (mh-get-msg-num nil) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1021 mh-show-buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1022 (get-buffer mh-show-buffer) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1023 (buffer-file-name (get-buffer mh-show-buffer)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1024 (string-match ".*/\\([0-9]+\\)$" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1025 (buffer-file-name (get-buffer mh-show-buffer))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1026 (string-equal |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1027 (match-string 1 (buffer-file-name (get-buffer mh-show-buffer))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1028 (int-to-string (mh-get-msg-num nil))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1029 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1030 (eval-when-compile (require 'gnus)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1031 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1032 (defmacro mh-macro-expansion-time-gnus-version () |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1033 "Return Gnus version available at macro expansion time. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1034 The macro evaluates the Gnus version at macro expansion time. If MH-E was |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1035 compiled then macro expansion happens at compile time." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1036 gnus-version) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1037 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1038 (defun mh-run-time-gnus-version () |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1039 "Return Gnus version available at run time." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1040 (require 'gnus) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1041 gnus-version) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1042 |
11332 | 1043 ;;;###autoload |
6365 | 1044 (defun mh-version () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1045 "Display version information about MH-E and the MH mail handling system." |
6365 | 1046 (interactive) |
1047 (mh-find-progs) | |
11332 | 1048 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 1049 (erase-buffer) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1050 ;; MH-E version. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1051 (insert "MH-E " mh-version "\n\n") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1052 ;; MH-E compilation details. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1053 (insert "MH-E compilation details:\n") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1054 (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1055 (gnus-compiled-version (if compiled-mhe |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1056 (mh-macro-expansion-time-gnus-version) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1057 "N/A"))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1058 (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1059 " Gnus (compile-time):\t" gnus-compiled-version "\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1060 " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1061 ;; Emacs version. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1062 (insert (emacs-version) "\n\n") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1063 ;; MH version. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1064 (let ((help-start (point))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1065 (condition-case err-data |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1066 (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
|
1067 (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
|
1068 (goto-char help-start) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1069 (if mh-nmh-flag |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1070 (search-forward "inc -- " nil t) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1071 (search-forward "version: " nil t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1072 (delete-region help-start (point))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1073 (goto-char (point-max)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1074 (insert " mh-progs:\t" mh-progs "\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1075 " mh-lib:\t" mh-lib "\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1076 " mh-lib-progs:\t" mh-lib-progs "\n\n") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1077 ;; Linux version. |
6365 | 1078 (condition-case () |
1079 (call-process "uname" nil t nil "-a") | |
1080 (file-error)) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1081 (goto-char (point-min)) |
11332 | 1082 (display-buffer mh-temp-buffer)) |
6365 | 1083 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1084 (defun mh-parse-flist-output-line (line) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1085 "Parse LINE to generate folder name, unseen messages and total messages." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1086 (with-temp-buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1087 (insert line) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1088 (goto-char (point-max)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1089 (let (folder unseen total p) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1090 (when (search-backward " out of " (point-min) t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1091 (setq total (read-from-string |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1092 (buffer-substring-no-properties |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1093 (match-end 0) (line-end-position)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1094 (when (search-backward " in sequence " (point-min) t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1095 (setq p (point)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1096 (when (search-backward " has " (point-min) t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1097 (setq unseen (read-from-string (buffer-substring-no-properties |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1098 (match-end 0) p))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1099 (while (or (eq (char-after) ?+) (eq (char-after) ? )) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1100 (backward-char)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1101 (setq folder (buffer-substring-no-properties |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1102 (point-min) (1+ (point)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1103 (values (format "+%s" folder) (car unseen) (car total)))))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1104 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1105 (defun mh-folder-size (folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1106 "Find size of FOLDER." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1107 (with-temp-buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1108 (call-process (expand-file-name "flist" mh-progs) nil t nil |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1109 "-norecurse" folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1110 (goto-char (point-min)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1111 (multiple-value-bind (folder1 unseen total) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1112 (mh-parse-flist-output-line |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1113 (buffer-substring (point) (line-end-position))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1114 (unless (equal folder folder1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1115 (error "Call to flist failed on folder %s" folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1116 (values total unseen)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1117 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1118 (defun mh-visit-folder (folder &optional range index-data) |
11332 | 1119 "Visit FOLDER and display RANGE of messages. |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1120 Do not call this function from outside MH-E; see \\[mh-rmail] instead. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1121 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1122 If RANGE is nil (the default if it is omitted when called non-interactively), |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1123 then all messages in FOLDER are displayed. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1124 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1125 If an index buffer is being created then INDEX-DATA is used to initialize the |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1126 index buffer specific data structures." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1127 (interactive (let ((folder-name (mh-prompt-for-folder "Visit" mh-inbox t))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1128 (list folder-name (mh-read-msg-range folder-name)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1129 (let ((config (current-window-configuration)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1130 (threaded-view-flag mh-show-threads-flag)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1131 (save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1132 (when (get-buffer folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1133 (set-buffer folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1134 (setq threaded-view-flag (memq 'unthread mh-view-ops)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1135 (mh-reset-threads-and-narrowing))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1136 (when index-data |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1137 (mh-make-folder folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1138 (setq mh-index-data (car index-data) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1139 mh-index-msg-checksum-map (make-hash-table :test #'equal) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1140 mh-index-checksum-origin-map (make-hash-table :test #'equal)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1141 (mh-index-update-maps folder (cadr index-data))) |
6365 | 1142 (mh-scan-folder folder (or range "all")) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1143 (cond ((and threaded-view-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1144 (save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1145 (goto-char (point-min)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1146 (or (null mh-large-folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1147 (not (equal (forward-line mh-large-folder) 0)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1148 (and (message "Not threading since the number of messages exceeds `mh-large-folder'") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1149 nil)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1150 (mh-toggle-threads)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1151 (mh-index-data |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1152 (mh-index-insert-folder-headers))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1153 (unless mh-showing-mode (delete-other-windows)) |
6365 | 1154 (setq mh-previous-window-config config)) |
1155 nil) | |
1156 | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1157 ;;;###mh-autoload |
11332 | 1158 (defun mh-update-sequences () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1159 "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
|
1160 Flush MH-E's state out to MH. The message at the cursor becomes current." |
11332 | 1161 (interactive) |
1162 ;; 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
|
1163 ;; which updates MH-E's state from MH. |
11332 | 1164 (let ((folder-set (mh-update-unseen)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1165 (new-cur (mh-get-msg-num nil))) |
11332 | 1166 (if new-cur |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1167 (let ((seq-entry (mh-find-seq 'cur))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1168 (mh-remove-cur-notation) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1169 (setcdr seq-entry |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1170 (list new-cur)) ;delete-seq-locally, add-msgs-to-seq |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1171 (mh-define-sequence 'cur (list new-cur)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1172 (beginning-of-line) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1173 (if (looking-at mh-scan-good-msg-regexp) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1174 (mh-notate nil mh-note-cur mh-cmd-note))) |
11332 | 1175 (or folder-set |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1176 (save-excursion |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1177 ;; 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
|
1178 ;; So I added this sanity check. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1179 (if (stringp mh-current-folder) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1180 (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
|
1181 (mh-exec-cmd-quiet t "folder" "-fast"))))))) |
11332 | 1182 |
6365 | 1183 |
1184 | |
1185 ;;; Support routines. | |
1186 | |
1187 (defun mh-delete-a-msg (msg) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1188 "Delete the MSG. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1189 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
|
1190 arguments, after the message has been deleted." |
6365 | 1191 (save-excursion |
1192 (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
|
1193 (if (looking-at mh-scan-refiled-msg-regexp) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1194 (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
|
1195 (if (looking-at mh-scan-deleted-msg-regexp) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1196 nil |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1197 (mh-set-folder-modified-p t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1198 (setq mh-delete-list (cons msg mh-delete-list)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1199 (mh-notate msg mh-note-deleted mh-cmd-note) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1200 (run-hooks 'mh-delete-msg-hook)))) |
6365 | 1201 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1202 (defun mh-refile-a-msg (msg folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1203 "Refile MSG in FOLDER. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1204 Folder is a symbol, not a string. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1205 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
|
1206 arguments, after the message has been refiled." |
6365 | 1207 (save-excursion |
1208 (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
|
1209 (cond ((looking-at mh-scan-deleted-msg-regexp) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1210 (error "Message %d is deleted. Undo delete before moving" msg)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1211 ((looking-at mh-scan-refiled-msg-regexp) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1212 (if (y-or-n-p |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1213 (format "Message %d already refiled. Copy to %s as well? " |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1214 msg folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1215 (mh-exec-cmd "refile" (mh-get-msg-num t) "-link" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1216 "-src" mh-current-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1217 (symbol-name folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1218 (message "Message not copied."))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1219 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1220 (mh-set-folder-modified-p t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1221 (cond ((null (assoc folder mh-refile-list)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1222 (push (list folder msg) mh-refile-list)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1223 ((not (member msg (cdr (assoc folder mh-refile-list)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1224 (push msg (cdr (assoc folder mh-refile-list))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1225 (mh-notate msg mh-note-refiled mh-cmd-note) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1226 (run-hooks 'mh-refile-msg-hook))))) |
6365 | 1227 |
1228 (defun mh-next-msg () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1229 "Move backward or forward to the next undeleted message in the buffer." |
6365 | 1230 (if (eq mh-next-direction 'forward) |
1231 (mh-next-undeleted-msg 1) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1232 (mh-previous-undeleted-msg 1))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1233 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1234 (defun mh-next-unread-msg (&optional count) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1235 "Move to next unread message. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1236 With optional argument COUNT, COUNT-1 unread messages are skipped." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1237 (interactive "p") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1238 (unless (> count 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1239 (error "The function mh-next-unread-msg expects positive argument")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1240 (setq count (1- count)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1241 (let ((unread-sequence (reverse (cdr (assoc mh-unseen-seq mh-seq-list)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1242 (cur-msg (mh-get-msg-num nil))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1243 (cond ((and (not cur-msg) (not (bobp)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1244 ;; If we are at the end of the buffer back up one line and go |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1245 ;; to unread message after that. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1246 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1247 (forward-line -1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1248 (setq cur-msg (mh-get-msg-num nil))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1249 nil)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1250 ((or (null unread-sequence) (not cur-msg)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1251 ;; No unread message or there aren't any messages in buffer... |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1252 (message "No more unread messages")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1253 ((progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1254 ;; Skip messages |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1255 (while (and unread-sequence (>= cur-msg (car unread-sequence))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1256 (setq unread-sequence (cdr unread-sequence))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1257 (while (> count 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1258 (setq unread-sequence (cdr unread-sequence)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1259 (setq count (1- count))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1260 (not (car unread-sequence))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1261 (message "No more unread messages")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1262 (t (mh-goto-msg (car unread-sequence)))))) |
6365 | 1263 |
1264 (defun mh-set-scan-mode () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1265 "Display the scan listing buffer, but do not show a message." |
6365 | 1266 (if (get-buffer mh-show-buffer) |
1267 (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
|
1268 (mh-showing-mode 0) |
11577
5a94d8168bdb
(mh-set-scan-mode): Use force-mode-line-update.
Karl Heuer <kwzh@gnu.org>
parents:
11505
diff
changeset
|
1269 (force-mode-line-update) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1270 (if mh-recenter-summary-flag |
6365 | 1271 (mh-recenter nil))) |
1272 | |
1273 (defun mh-undo-msg (msg) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1274 "Undo the deletion or refile of one MSG." |
6365 | 1275 (cond ((memq msg mh-delete-list) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1276 (setq mh-delete-list (delq msg mh-delete-list))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1277 (t |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1278 (dolist (folder-msg-list mh-refile-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1279 (setf (cdr folder-msg-list) (remove msg (cdr folder-msg-list)))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1280 (setq mh-refile-list (loop for x in mh-refile-list |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1281 unless (null (cdr x)) collect x)))) |
6365 | 1282 (mh-notate msg ? mh-cmd-note)) |
1283 | |
1284 | |
1285 | |
1286 ;;; The folder data abstraction. | |
1287 | |
1288 (defun mh-make-folder (name) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1289 "Create a new mail folder called NAME. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1290 Make it the current folder." |
6365 | 1291 (switch-to-buffer name) |
1292 (setq buffer-read-only nil) | |
1293 (erase-buffer) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1294 (if mh-adaptive-cmd-note-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1295 (mh-set-cmd-note (mh-message-number-width name))) |
6365 | 1296 (setq buffer-read-only t) |
1297 (mh-folder-mode) | |
1298 (mh-set-folder-modified-p nil) | |
11332 | 1299 (setq buffer-file-name mh-folder-filename) |
1300 (mh-make-folder-mode-line)) | |
6365 | 1301 |
1302 ;;; Ensure new buffers won't get this mode if default-major-mode is nil. | |
1303 (put 'mh-folder-mode 'mode-class 'special) | |
1304 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1305 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1306 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1307 ;;; 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
|
1308 ;;; 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
|
1309 ;;; folder-mode "Sequence" menu |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1310 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1311 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
|
1312 '("Sequence" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1313 ["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
|
1314 ["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
|
1315 ["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
|
1316 (mh-get-msg-num nil)] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1317 ["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
|
1318 ["Delete Sequence..." mh-delete-seq t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1319 ["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
|
1320 ["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
|
1321 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1322 ["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
|
1323 ["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
|
1324 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1325 ["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
|
1326 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1327 ;;; folder-mode "Message" menu |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1328 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1329 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
|
1330 '("Message" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1331 ["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
|
1332 ["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
|
1333 ["Next Message" mh-next-undeleted-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1334 ["Previous Message" mh-previous-undeleted-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1335 ["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
|
1336 ["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
|
1337 ["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
|
1338 ["Modify Message" mh-modify] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1339 ["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
|
1340 ["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
|
1341 ["Undo Delete/Refile" mh-undo t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1342 ["Process Delete/Refile" mh-execute-commands |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1343 (or mh-refile-list mh-delete-list)] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1344 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1345 ["Compose a New Message" mh-send t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1346 ["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
|
1347 ["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
|
1348 ["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
|
1349 ["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
|
1350 ["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
|
1351 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1352 ["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
|
1353 ["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
|
1354 ["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
|
1355 (mh-get-msg-num nil)] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1356 ["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
|
1357 ["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
|
1358 ["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
|
1359 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1360 ;;; folder-mode "Folder" menu |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1361 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1362 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
|
1363 '("Folder" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1364 ["Incorporate New Mail" mh-inc-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1365 ["Toggle Show/Folder" mh-toggle-showing t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1366 ["Execute Delete/Refile" mh-execute-commands |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1367 (or mh-refile-list mh-delete-list)] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1368 ["Rescan Folder" mh-rescan-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1369 ["Thread Folder" mh-toggle-threads |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1370 (not (memq 'unthread mh-view-ops))] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1371 ["Pack Folder" mh-pack-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1372 ["Sort Folder" mh-sort-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1373 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1374 ["List Folders" mh-list-folders t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1375 ["Visit a Folder..." mh-visit-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1376 ["Search a Folder..." mh-search-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1377 ["Indexed Search..." mh-index-search t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1378 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1379 ["Quit MH-E" mh-quit t])) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1380 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1381 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1382 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1383 (defmacro mh-remove-xemacs-horizontal-scrollbar () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1384 "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
|
1385 (when mh-xemacs-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1386 `(if (and (featurep 'scrollbar) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1387 (fboundp 'set-specifier)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1388 (set-specifier horizontal-scrollbar-visible-p nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1389 (cons (current-buffer) nil))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1390 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1391 (defmacro mh-write-file-functions-compat () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1392 "Return `write-file-functions' if it exists. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1393 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
|
1394 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
|
1395 is used in previous versions and XEmacs." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1396 (if (boundp 'write-file-functions) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1397 ''write-file-functions ;Emacs 21.4 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1398 ''local-write-file-hooks)) ;<Emacs 21.4, XEmacs |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1399 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1400 (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
|
1401 "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
|
1402 |
6365 | 1403 You can show the message the cursor is pointing to, and step through the |
1404 messages. Messages can be marked for deletion or refiling into another | |
1405 folder; these commands are executed all at once with a separate command. | |
1406 | |
1407 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
|
1408 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
|
1409 is non-nil, the action is applied to the region. |
6365 | 1410 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1411 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
|
1412 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
|
1413 option if you wish to modify scan's format. |
6365 | 1414 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1415 When a folder is visited, the hook `mh-folder-mode-hook' is run. |
6365 | 1416 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1417 \\{mh-folder-mode-map}" |
6365 | 1418 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1419 (make-local-variable 'font-lock-defaults) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1420 (setq font-lock-defaults '(mh-folder-font-lock-keywords t)) |
11332 | 1421 (mh-make-local-vars |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1422 'mh-current-folder (buffer-name) ; Name of folder, a string |
6365 | 1423 'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1424 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/" |
6365 | 1425 (file-name-as-directory (mh-expand-file-name (buffer-name))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1426 'mh-showing-mode nil ; Show message also? |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1427 'mh-delete-list nil ; List of msgs nums to delete |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1428 'mh-refile-list nil ; List of folder names in mh-seq-list |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1429 'mh-seq-list nil ; Alist of (seq . msgs) nums |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1430 'mh-seen-list nil ; List of displayed messages |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1431 'mh-next-direction 'forward ; Direction to move to next message |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1432 '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
|
1433 '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
|
1434 ; in which narrowing/threading has been |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1435 ; carried out. |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1436 'mh-index-data nil ; If the folder was created by a call |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1437 ; to mh-index-search this contains info |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1438 ; about the search results. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1439 'mh-index-previous-search nil ; Previous folder and search-regexp |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1440 'mh-index-msg-checksum-map nil ; msg -> checksum map |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1441 'mh-index-checksum-origin-map nil ; checksum -> ( orig-folder, orig-msg ) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1442 'mh-first-msg-num nil ; Number of first msg in buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1443 'mh-last-msg-num nil ; Number of last msg in buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1444 'mh-msg-count nil ; Number of msgs in buffer |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1445 'mh-mode-line-annotation nil ; Indicates message range |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1446 '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
|
1447 (mh-remove-xemacs-horizontal-scrollbar) |
6365 | 1448 (setq truncate-lines t) |
1449 (auto-save-mode -1) | |
1450 (setq buffer-offer-save t) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1451 (add-hook (mh-write-file-functions-compat) 'mh-execute-commands nil t) |
6365 | 1452 (make-local-variable 'revert-buffer-function) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1453 (make-local-variable 'hl-line-mode) ; avoid pollution |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1454 (if (fboundp 'hl-line-mode) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1455 (hl-line-mode 1)) |
6365 | 1456 (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
|
1457 (or (assq 'mh-showing-mode minor-mode-alist) |
6365 | 1458 (setq minor-mode-alist |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1459 (cons '(mh-showing-mode " Show") minor-mode-alist))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1460 (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
|
1461 (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
|
1462 (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
|
1463 (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
|
1464 (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
|
1465 (if (and mh-xemacs-flag |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1466 font-lock-auto-fontify) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1467 (turn-on-font-lock))) ; Force font-lock in XEmacs. |
6365 | 1468 |
11332 | 1469 (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
|
1470 "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
|
1471 |
6365 | 1472 (while pairs |
30882
e5b3af28990a
(mh-make-local-vars):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
29120
diff
changeset
|
1473 (set (make-local-variable (car pairs)) (car (cdr pairs))) |
6365 | 1474 (setq pairs (cdr (cdr pairs))))) |
1475 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1476 (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
|
1477 "Scan the FOLDER over the RANGE. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1478 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
|
1479 refiles aren't carried out. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1480 Return in the folder's buffer." |
6365 | 1481 (cond ((null (get-buffer folder)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1482 (mh-make-folder folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1483 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1484 (or dont-exec-pending (mh-process-or-undo-commands folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1485 (switch-to-buffer folder))) |
6365 | 1486 (mh-regenerate-headers range) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1487 (if (zerop (buffer-size)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1488 (if (equal range "all") |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1489 (message "Folder %s is empty" folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1490 (message "No messages in %s, range %s" folder range)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1491 (mh-goto-cur-msg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1492 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1493 (when dont-exec-pending |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1494 ;; Re-annotate messages to be refiled... |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1495 (dolist (folder-msg-list mh-refile-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1496 (dolist (msg (cdr folder-msg-list)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1497 (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
|
1498 ;; Re-annotate messages to be deleted... |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1499 (dolist (msg mh-delete-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1500 (mh-notate msg mh-note-deleted mh-cmd-note))))) |
6365 | 1501 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1502 (defun mh-set-cmd-note (width) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1503 "Set `mh-cmd-note' to WIDTH characters (minimum of 2). |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1504 |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1505 If `mh-scan-format-file' specifies nil or a filename, then this function |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1506 will NOT update `mh-cmd-note'." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1507 ;; Add one to the width to always have whitespace in column zero. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1508 (setq width (max (1+ width) 2)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1509 (if (and (equal mh-scan-format-file t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1510 (not (eq mh-cmd-note width))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1511 (setq mh-cmd-note width)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1512 mh-cmd-note) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1513 |
11332 | 1514 (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
|
1515 "Scan folder over range RANGE. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1516 If UPDATE, append the scan lines, otherwise replace." |
11332 | 1517 (let ((folder mh-current-folder) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1518 (range (if (and range (atom range)) (list range) range)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1519 scan-start) |
6365 | 1520 (message "Scanning %s..." folder) |
1521 (with-mh-folder-updating (nil) | |
11332 | 1522 (if update |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1523 (goto-char (point-max)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1524 (delete-region (point-min) (point-max)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1525 (if mh-adaptive-cmd-note-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1526 (mh-set-cmd-note (mh-message-number-width folder)))) |
11332 | 1527 (setq scan-start (point)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1528 (apply #'mh-exec-cmd-output |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1529 mh-scan-prog nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1530 (mh-scan-format) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1531 "-noclear" "-noheader" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1532 "-width" (window-width) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1533 folder range) |
11332 | 1534 (goto-char scan-start) |
6365 | 1535 (cond ((looking-at "scan: no messages in") |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1536 (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1537 ((looking-at "scan: bad message list ") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1538 (keep-lines mh-scan-valid-regexp)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1539 ((looking-at "scan: ")) ; Keep error messages |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1540 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1541 (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines |
6365 | 1542 (setq mh-seq-list (mh-read-folder-sequences folder nil)) |
1543 (mh-notate-user-sequences) | |
11332 | 1544 (or update |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1545 (setq mh-mode-line-annotation |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1546 (if (equal range '("all")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1547 nil |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1548 mh-partial-folder-mode-line-annotation))) |
11332 | 1549 (mh-make-folder-mode-line)) |
6365 | 1550 (message "Scanning %s...done" folder))) |
1551 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1552 (defun mh-generate-new-cmd-note (folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1553 "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
|
1554 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1555 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
|
1556 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
|
1557 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1558 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
|
1559 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
|
1560 in FOLDER. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1561 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1562 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
|
1563 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
|
1564 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1565 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
|
1566 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
|
1567 line now with no message truncation." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1568 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1569 (let ((maxcol (1- (window-width))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1570 (old-cmd-note mh-cmd-note) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1571 mh-cmd-note-fmt |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1572 msgnum) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1573 ;; 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
|
1574 (delete-char (- (point-max) (point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1575 ;; 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
|
1576 ;; value needed to display messages. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1577 (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
|
1578 (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
|
1579 ;; 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
|
1580 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1581 (cond ((memq 'unthread mh-view-ops) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1582 (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
|
1583 (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
|
1584 ;; 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
|
1585 (setq msgnum (string-to-number |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1586 (buffer-substring |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1587 (match-beginning 1) (match-end 1)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1588 (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
|
1589 ;; 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
|
1590 (end-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1591 (let ((eol (point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1592 (move-to-column maxcol) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1593 (if (<= (point) eol) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1594 (delete-char (- eol (point)))))))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1595 ;; now re-read the lost messages |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1596 (goto-char (point-max)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1597 (prog1 (point) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1598 (mh-regenerate-headers "cur-last" t))))) |
6365 | 1599 |
1600 (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
|
1601 "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
|
1602 Return in the current buffer." |
6365 | 1603 (let ((point-before-inc (point)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1604 (folder mh-current-folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1605 (new-mail-flag nil)) |
6365 | 1606 (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
|
1607 (if maildrop-name |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1608 (message "inc %s -file %s..." folder maildrop-name) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1609 (message "inc %s..." folder)) |
6365 | 1610 (setq mh-next-direction 'forward) |
1611 (goto-char (point-max)) | |
1612 (let ((start-of-inc (point))) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1613 (mh-remove-cur-notation) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1614 (if maildrop-name |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1615 ;; I think MH 5 used "-ms-file" instead of "-file", |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1616 ;; which would make inc'ing from maildrops fail. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1617 (mh-exec-cmd-output mh-inc-prog nil folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1618 (mh-scan-format) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1619 "-file" (expand-file-name maildrop-name) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1620 "-width" (window-width) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1621 "-truncate") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1622 (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
|
1623 (mh-scan-format) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1624 "-width" (window-width))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1625 (if maildrop-name |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1626 (message "inc %s -file %s...done" folder maildrop-name) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1627 (message "inc %s...done" folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1628 (goto-char start-of-inc) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1629 (cond ((save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1630 (re-search-forward "^inc: no mail" nil t)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1631 (message "No new mail%s%s" (if maildrop-name " in " "") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1632 (if maildrop-name maildrop-name ""))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1633 ((and (when mh-narrowed-to-seq |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1634 (let ((saved-text (buffer-substring-no-properties |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1635 start-of-inc (point-max)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1636 (delete-region start-of-inc (point-max)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1637 (unwind-protect (mh-widen) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1638 (goto-char (point-max)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1639 (setq start-of-inc (point)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1640 (insert saved-text) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1641 (goto-char start-of-inc)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1642 nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1643 ((re-search-forward "^inc:" nil t) ; Error messages |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1644 (error "Error incorporating mail")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1645 ((and |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1646 (equal mh-scan-format-file t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1647 mh-adaptive-cmd-note-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1648 ;; Have we reached an edge condition? |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1649 (save-excursion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1650 (re-search-forward mh-scan-msg-overflow-regexp nil 0 1)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1651 (setq start-of-inc (mh-generate-new-cmd-note folder)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1652 nil)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1653 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1654 (setq new-mail-flag t))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1655 (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
|
1656 (setq mh-seq-list (mh-read-folder-sequences folder t)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1657 (when (equal (point-max) start-of-inc) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1658 (mh-notate-seq 'cur mh-note-cur mh-cmd-note)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1659 (mh-notate-user-sequences) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1660 (if new-mail-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1661 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1662 (mh-make-folder-mode-line) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1663 (when (memq 'unthread mh-view-ops) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1664 (mh-thread-inc folder start-of-inc)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1665 (mh-goto-cur-msg)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1666 (goto-char point-before-inc)))))) |
6365 | 1667 |
11332 | 1668 (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
|
1669 "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
|
1670 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
|
1671 in what is now stored in the buffer-local variable `mh-mode-line-annotation'." |
6365 | 1672 (save-excursion |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1673 (save-window-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1674 (mh-first-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1675 (let ((new-first-msg-num (mh-get-msg-num nil))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1676 (when (or (not (memq 'unthread mh-view-ops)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1677 (null mh-first-msg-num) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1678 (null new-first-msg-num) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1679 (< new-first-msg-num mh-first-msg-num)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1680 (setq mh-first-msg-num new-first-msg-num))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1681 (mh-last-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1682 (let ((new-last-msg-num (mh-get-msg-num nil))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1683 (when (or (not (memq 'unthread mh-view-ops)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1684 (null mh-last-msg-num) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1685 (null new-last-msg-num) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1686 (> new-last-msg-num mh-last-msg-num)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1687 (setq mh-last-msg-num new-last-msg-num))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1688 (setq mh-msg-count (if mh-first-msg-num |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1689 (count-lines (point-min) (point-max)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1690 0)) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1691 (setq mode-line-buffer-identification |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1692 (list (format "{%%b%s} %s msg%s" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1693 (if mh-mode-line-annotation |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1694 (format "/%s" mh-mode-line-annotation) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1695 "") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1696 (if (zerop mh-msg-count) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1697 "no" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1698 (format "%d" mh-msg-count)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1699 (if (zerop mh-msg-count) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1700 "s" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1701 (cond ((> mh-msg-count 1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1702 (format "s (%d-%d)" mh-first-msg-num |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1703 mh-last-msg-num)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1704 (mh-first-msg-num |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1705 (format " (%d)" mh-first-msg-num)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1706 (""))))))))) |
6365 | 1707 |
1708 (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
|
1709 "Remove all '+' flags from the folder listing. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1710 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
|
1711 Optimized for speed (i.e., no regular expressions)." |
6365 | 1712 (save-excursion |
1713 (let ((case-fold-search nil) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1714 (last-line (1- (point-max))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1715 char) |
6365 | 1716 (mh-first-msg) |
1717 (while (<= (point) last-line) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1718 (forward-char mh-cmd-note) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1719 (setq char (following-char)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1720 (if (or (and remove-all-flags |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1721 (or (= char (aref mh-note-deleted 0)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1722 (= char (aref mh-note-refiled 0)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1723 (= char (aref mh-note-cur 0))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1724 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1725 (delete-char 1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1726 (insert " "))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1727 (if remove-all-flags |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1728 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1729 (forward-char 1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1730 (if (= (following-char) (aref mh-note-seq 0)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1731 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1732 (delete-char 1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1733 (insert " "))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1734 (forward-line))))) |
6365 | 1735 |
11332 | 1736 (defun mh-remove-cur-notation () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1737 "Remove old cur notation." |
11332 | 1738 (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) |
1739 (save-excursion | |
1740 (and cur-msg | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1741 (mh-goto-msg cur-msg t t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1742 (looking-at mh-scan-cur-msg-number-regexp) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1743 (mh-notate nil ? mh-cmd-note))))) |
11332 | 1744 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1745 (defun mh-remove-all-notation () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1746 "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
|
1747 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1748 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1749 (while (not (eobp)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1750 (unless (or (equal (char-after) ?+) (eolp)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1751 (mh-notate nil ? mh-cmd-note) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1752 (when (eq (char-after (+ (point) mh-cmd-note 1)) (elt mh-note-seq 0)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1753 (mh-notate nil ? (1+ mh-cmd-note)))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1754 (forward-line)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1755 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1756 ;;;###mh-autoload |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1757 (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
|
1758 "Position the cursor at the current message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1759 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
|
1760 recenter the folder buffer." |
6365 | 1761 (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) |
1762 (cond ((and cur-msg | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1763 (mh-goto-msg cur-msg t t)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1764 (unless minimal-changes-flag |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1765 (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
|
1766 (mh-recenter 0) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1767 (mh-maybe-show cur-msg))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1768 (t |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1769 (message "No current message"))))) |
6365 | 1770 |
1771 (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
|
1772 "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
|
1773 Called by functions like `mh-sort-folder', so also invalidate show buffer." |
6365 | 1774 (set-buffer folder) |
1775 (if (mh-outstanding-commands-p) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1776 (if (or mh-do-not-confirm-flag |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1777 (y-or-n-p |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1778 "Process outstanding deletes and refiles (or lose them)? ")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1779 (mh-process-commands folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1780 (mh-undo-folder))) |
6365 | 1781 (mh-update-unseen) |
1782 (mh-invalidate-show-buffer)) | |
1783 | |
1784 (defun mh-process-commands (folder) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1785 "Process outstanding commands for FOLDER. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1786 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
|
1787 with no arguments, before the commands are processed." |
6365 | 1788 (message "Processing deletes and refiles for %s..." folder) |
1789 (set-buffer folder) | |
1790 (with-mh-folder-updating (nil) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1791 ;; 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
|
1792 (run-hooks 'mh-folder-updated-hook) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1793 |
6365 | 1794 ;; Update the unseen sequence if it exists |
1795 (mh-update-unseen) | |
1796 | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1797 (let ((redraw-needed-flag mh-index-data)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1798 ;; Remove invalid scan lines if we are in an index folder and then remove |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1799 ;; the real messages |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1800 (when mh-index-data |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1801 (mh-index-delete-folder-headers) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1802 (mh-index-execute-commands)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1803 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1804 ;; Then refile messages |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1805 (mh-mapc #'(lambda (folder-msg-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1806 (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
|
1807 (msgs (cdr folder-msg-list))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1808 (setq redraw-needed-flag t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1809 (apply #'mh-exec-cmd |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1810 "refile" "-src" folder dest-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1811 (mh-coalesce-msg-list msgs)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1812 (mh-delete-scan-msgs msgs))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1813 mh-refile-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1814 (setq mh-refile-list ()) |
6365 | 1815 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1816 ;; Now delete messages |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1817 (cond (mh-delete-list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1818 (setq redraw-needed-flag t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1819 (apply 'mh-exec-cmd "rmm" folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1820 (mh-coalesce-msg-list mh-delete-list)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1821 (mh-delete-scan-msgs mh-delete-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1822 (setq mh-delete-list nil))) |
6365 | 1823 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1824 ;; 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
|
1825 ;; Mark cur message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1826 (if (> (buffer-size) 0) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1827 (mh-define-sequence 'cur (list (or (mh-get-msg-num nil) "last")))) |
6365 | 1828 |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1829 ;; Redraw folder buffer if needed |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1830 (when (and redraw-needed-flag) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1831 (cond ((memq 'unthread mh-view-ops) (mh-thread-inc folder (point-max))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1832 (mh-index-data (mh-index-insert-folder-headers))))) |
6365 | 1833 |
1834 (and (buffer-file-name (get-buffer mh-show-buffer)) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1835 (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1836 ;; If "inc" were to put a new msg in this file, |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1837 ;; we would not notice, so mark it invalid now. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1838 (mh-invalidate-show-buffer)) |
6365 | 1839 |
1840 (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil)) | |
1841 (mh-unmark-all-headers t) | |
1842 (mh-notate-user-sequences) | |
1843 (message "Processing deletes and refiles for %s...done" folder))) | |
1844 | |
1845 (defun mh-update-unseen () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1846 "Synchronize the unseen sequence with MH. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1847 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
|
1848 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
|
1849 with no arguments, after the unseen sequence is updated." |
6365 | 1850 (if mh-seen-list |
11332 | 1851 (let* ((unseen-seq (mh-find-seq mh-unseen-seq)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1852 (unseen-msgs (mh-seq-msgs unseen-seq))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1853 (if unseen-msgs |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1854 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1855 (mh-undefine-sequence mh-unseen-seq mh-seen-list) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1856 (run-hooks 'mh-unseen-updated-hook) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1857 (while mh-seen-list |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1858 (setq unseen-msgs (delq (car mh-seen-list) unseen-msgs)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1859 (setq mh-seen-list (cdr mh-seen-list))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1860 (setcdr unseen-seq unseen-msgs) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1861 t) ;since we set the folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1862 (setq mh-seen-list nil))))) |
6365 | 1863 |
1864 (defun mh-delete-scan-msgs (msgs) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1865 "Delete the scan listing lines for MSGS." |
6365 | 1866 (save-excursion |
13384
917a1b8dab28
(mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents:
11577
diff
changeset
|
1867 (while msgs |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1868 (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
|
1869 (when (memq 'unthread mh-view-ops) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1870 (mh-thread-forget-message (car msgs))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1871 (mh-delete-line 1)) |
13384
917a1b8dab28
(mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents:
11577
diff
changeset
|
1872 (setq msgs (cdr msgs))))) |
6365 | 1873 |
1874 (defun mh-outstanding-commands-p () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1875 "Return non-nil if there are outstanding deletes or refiles." |
6365 | 1876 (or mh-delete-list mh-refile-list)) |
1877 | |
11332 | 1878 (defun mh-coalesce-msg-list (messages) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1879 "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
|
1880 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
|
1881 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
|
1882 command line arguments won't exceed system limits." |
11332 | 1883 (let ((msgs (sort (copy-sequence messages) 'mh-greaterp)) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1884 (range-high nil) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1885 (prev -1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1886 (ranges nil)) |
11332 | 1887 (while prev |
1888 (if range-high | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1889 (if (or (not (numberp prev)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1890 (not (equal (car msgs) (1- prev)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1891 (progn ;non-sequential, flush old range |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1892 (if (eq prev range-high) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1893 (setq ranges (cons range-high ranges)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1894 (setq ranges (cons (format "%s-%s" prev range-high) ranges))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1895 (setq range-high nil)))) |
11332 | 1896 (or range-high |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1897 (setq range-high (car msgs))) ;start new or first range |
11332 | 1898 (setq prev (car msgs)) |
1899 (setq msgs (cdr msgs))) | |
1900 ranges)) | |
1901 | |
1902 (defun mh-greaterp (msg1 msg2) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1903 "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
|
1904 Strings are \"smaller\" than numbers. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1905 Legal values are things like \"cur\", \"last\", 1, and 1820." |
11332 | 1906 (if (numberp msg1) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1907 (if (numberp msg2) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1908 (> msg1 msg2) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1909 t) |
11332 | 1910 (if (numberp msg2) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1911 nil |
11332 | 1912 (string-lessp msg2 msg1)))) |
1913 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1914 (defun mh-lessp (msg1 msg2) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1915 "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
|
1916 Strings are \"smaller\" than numbers. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1917 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
|
1918 (not (mh-greaterp msg1 msg2))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1919 |
6365 | 1920 |
1921 | |
1922 ;;; Basic sequence handling | |
1923 | |
1924 (defun mh-delete-seq-locally (seq) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1925 "Remove MH-E's record of SEQ." |
6365 | 1926 (let ((entry (mh-find-seq seq))) |
1927 (setq mh-seq-list (delq entry mh-seq-list)))) | |
1928 | |
1929 (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
|
1930 "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
|
1931 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
|
1932 that note messages to be refiled." |
6365 | 1933 (let ((seqs ())) |
1934 (cond (save-refiles | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1935 (mh-mapc (function (lambda (seq) ; Save the refiling sequences |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1936 (if (mh-folder-name-p (mh-seq-name seq)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1937 (setq seqs (cons seq seqs))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1938 mh-seq-list))) |
6365 | 1939 (save-excursion |
1940 (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list")) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1941 (progn |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1942 ;; look for name in line of form "cur: 4" or "myseq (private): 23" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1943 (while (re-search-forward "^[^: ]+" nil t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1944 (setq seqs (cons (mh-make-seq (intern (buffer-substring |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1945 (match-beginning 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1946 (match-end 0))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1947 (mh-read-msg-list)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1948 seqs))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1949 (delete-region (point-min) (point))))) ; avoid race with |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1950 ; mh-process-daemon |
6365 | 1951 seqs)) |
1952 | |
1953 (defun mh-read-msg-list () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1954 "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
|
1955 Expands ranges into set of individual numbers." |
6365 | 1956 (let ((msgs ()) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1957 (end-of-line (save-excursion (end-of-line) (point))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1958 num) |
6365 | 1959 (while (re-search-forward "[0-9]+" end-of-line t) |
1960 (setq num (string-to-int (buffer-substring (match-beginning 0) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1961 (match-end 0)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1962 (cond ((looking-at "-") ; Message range |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1963 (forward-char 1) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1964 (re-search-forward "[0-9]+" end-of-line t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1965 (let ((num2 (string-to-int (buffer-substring (match-beginning 0) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1966 (match-end 0))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1967 (if (< num2 num) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1968 (error "Bad message range: %d-%d" num num2)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1969 (while (<= num num2) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1970 (setq msgs (cons num msgs)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1971 (setq num (1+ num))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1972 ((not (zerop num)) ;"pick" outputs "0" to mean no match |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1973 (setq msgs (cons num msgs))))) |
6365 | 1974 msgs)) |
1975 | |
1976 (defun mh-notate-user-sequences () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1977 "Mark the scan listing of all messages in user-defined sequences." |
6365 | 1978 (let ((seqs mh-seq-list) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1979 name) |
6365 | 1980 (while seqs |
1981 (setq name (mh-seq-name (car seqs))) | |
1982 (if (not (mh-internal-seq name)) | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1983 (mh-notate-seq name mh-note-seq (1+ mh-cmd-note))) |
6365 | 1984 (setq seqs (cdr seqs))))) |
1985 | |
1986 (defun mh-internal-seq (name) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1987 "Return non-nil if NAME is the name of an internal MH-E sequence." |
6365 | 1988 (or (memq name '(answered cur deleted forwarded printed)) |
1989 (eq name mh-unseen-seq) | |
1990 (eq name mh-previous-seq) | |
1991 (mh-folder-name-p name))) | |
1992 | |
11332 | 1993 (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
|
1994 "Delete MESSAGE from SEQUENCE. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
1995 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
|
1996 INTERNAL-FLAG non-nil means do not inform MH of the change." |
6365 | 1997 (interactive (list (mh-get-msg-num t) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1998 (mh-read-seq-default "Delete from" t) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
1999 nil)) |
11332 | 2000 (let ((entry (mh-find-seq sequence))) |
6365 | 2001 (cond (entry |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2002 (mh-notate-if-in-one-seq message ? (1+ mh-cmd-note) sequence) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2003 (if (not internal-flag) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2004 (mh-undefine-sequence sequence (list message))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2005 (setcdr entry (delq message (mh-seq-msgs entry))))))) |
6365 | 2006 |
2007 (defun mh-undefine-sequence (seq msgs) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2008 "Remove from the SEQ the list of MSGS." |
6365 | 2009 (mh-exec-cmd "mark" mh-current-folder "-delete" |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2010 "-sequence" (symbol-name seq) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2011 (mh-coalesce-msg-list msgs))) |
6365 | 2012 |
2013 (defun mh-define-sequence (seq msgs) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2014 "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
|
2015 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
|
2016 Signals an error if SEQ is an illegal name." |
6365 | 2017 (if (and msgs |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2018 (not (mh-folder-name-p seq))) |
6365 | 2019 (save-excursion |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2020 (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2021 "-sequence" (symbol-name seq) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2022 (mh-coalesce-msg-list msgs))))) |
6365 | 2023 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2024 (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
|
2025 "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
|
2026 The sequence name and the list of messages are passed as arguments." |
6365 | 2027 (while seq-list |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2028 (funcall function |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2029 (mh-seq-name (car seq-list)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2030 (mh-seq-msgs (car seq-list))) |
6365 | 2031 (setq seq-list (cdr seq-list)))) |
2032 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2033 (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
|
2034 "Notate MSG. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2035 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
|
2036 The notation is performed if the MSG is only in SEQ." |
11332 | 2037 (let ((in-seqs (mh-seq-containing-msg msg nil))) |
6365 | 2038 (if (and (eq seq (car in-seqs)) (null (cdr in-seqs))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2039 (mh-notate msg character offset)))) |
6365 | 2040 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2041 (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
|
2042 "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
|
2043 If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list." |
6365 | 2044 (let ((l mh-seq-list) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2045 (seqs ())) |
6365 | 2046 (while l |
11332 | 2047 (and (memq msg (mh-seq-msgs (car l))) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2048 (or include-internal-flag |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2049 (not (mh-internal-seq (mh-seq-name (car l))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2050 (setq seqs (cons (mh-seq-name (car l)) seqs))) |
6365 | 2051 (setq l (cdr l))) |
2052 seqs)) | |
2053 | |
2054 | |
2055 | |
2056 ;;; User prompting commands. | |
2057 | |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2058 (defun mh-read-msg-range (folder &optional always-prompt-flag) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2059 "Prompt for message range from FOLDER. |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2060 If optional second argument ALWAYS-PROMPT-FLAG is non-nil then always ask for |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2061 range." |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2062 (multiple-value-bind (total unseen) (mh-folder-size folder) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2063 (cond |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2064 ((and (not always-prompt-flag) (numberp unseen) (> unseen 0)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2065 (list (symbol-name mh-unseen-seq))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2066 ((or (null mh-large-folder) (not (numberp total))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2067 (list "all")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2068 ((and (numberp total) (or always-prompt-flag (> total mh-large-folder))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2069 (let* ((prompt |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2070 (format "Range or number of messages to read (default: %s): " |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2071 total)) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2072 (in (read-string prompt nil nil (number-to-string total)))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2073 (cond ((string-match "^[ \f\t\n\r\v]*[0-9]+[ \f\t\n\r\v]*$" in) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2074 (list (format "last:%s" (car (read-from-string in))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2075 ((equal in "") (list "all")) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2076 (t (split-string in))))) |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2077 (t (list "all"))))) |
6365 | 2078 |
2079 | |
2080 | |
2081 ;;; Build the folder-mode keymap: | |
2082 | |
2083 (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
|
2084 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2085 ;; 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
|
2086 ;; appear in menu lists. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2087 (defalias 'mh-alt-show 'mh-show) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2088 (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
|
2089 (defalias 'mh-alt-send 'mh-send) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2090 (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
|
2091 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2092 ;; 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
|
2093 (gnus-define-keys mh-folder-mode-map |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2094 " " mh-page-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2095 "!" mh-refile-or-write-again |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2096 "," mh-header-display |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2097 "." mh-alt-show |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2098 ">" mh-write-msg-to-file |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2099 "?" mh-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2100 "E" mh-extract-rejected-mail |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2101 "M" mh-modify |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2102 "\177" mh-previous-page |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2103 "\C-d" mh-delete-msg-no-motion |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2104 "\t" mh-index-next-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2105 [backtab] mh-index-previous-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2106 "\M-\t" mh-index-previous-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2107 "\e<" mh-first-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2108 "\e>" mh-last-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2109 "\ed" mh-redistribute |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2110 "\r" mh-show |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2111 "^" mh-alt-refile-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2112 "c" mh-copy-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2113 "d" mh-delete-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2114 "e" mh-edit-again |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2115 "f" mh-forward |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2116 "g" mh-goto-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2117 "i" mh-inc-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2118 "k" mh-delete-subject-or-thread |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2119 "l" mh-print-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2120 "m" mh-alt-send |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2121 "n" mh-next-undeleted-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2122 "\M-n" mh-next-unread-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2123 "o" mh-refile-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2124 "p" mh-previous-undeleted-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2125 "\M-p" mh-previous-unread-msg |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2126 "q" mh-quit |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2127 "r" mh-reply |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2128 "s" mh-send |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2129 "t" mh-toggle-showing |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2130 "u" mh-undo |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2131 "v" mh-index-visit-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2132 "x" mh-execute-commands |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2133 "|" mh-pipe-msg) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2134 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2135 (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2136 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2137 "S" mh-sort-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2138 "f" mh-alt-visit-folder |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2139 "i" mh-index-search |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2140 "k" mh-kill-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2141 "l" mh-list-folders |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2142 "o" mh-alt-visit-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2143 "p" mh-pack-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2144 "r" mh-rescan-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2145 "s" mh-search-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2146 "u" mh-undo-folder |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2147 "v" mh-visit-folder) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2148 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2149 (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2150 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2151 "d" mh-delete-msg-from-seq |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2152 "k" mh-delete-seq |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2153 "l" mh-list-sequences |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2154 "n" mh-narrow-to-seq |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2155 "p" mh-put-msg-in-seq |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2156 "s" mh-msg-is-in-seq |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2157 "w" mh-widen) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2158 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2159 (gnus-define-keys (mh-thread-map "T" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2160 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2161 "u" mh-thread-ancestor |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2162 "p" mh-thread-previous-sibling |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2163 "n" mh-thread-next-sibling |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2164 "t" mh-toggle-threads |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2165 "d" mh-thread-delete |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2166 "o" mh-thread-refile) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2167 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2168 (gnus-define-keys (mh-limit-map "/" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2169 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2170 "s" mh-narrow-to-subject |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2171 "w" mh-widen) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2172 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2173 (gnus-define-keys (mh-extract-map "X" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2174 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2175 "s" mh-store-msg ;shar |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2176 "u" mh-store-msg) ;uuencode |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2177 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2178 (gnus-define-keys (mh-digest-map "D" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2179 " " mh-page-digest |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2180 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2181 "\177" mh-page-digest-backwards |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2182 "b" mh-burst-digest) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2183 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2184 (gnus-define-keys (mh-mime-map "K" mh-folder-mode-map) |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2185 "?" mh-prefix-help |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2186 "a" mh-mime-save-parts |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2187 "i" mh-folder-inline-mime-part |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2188 "o" mh-folder-save-mime-part |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2189 "v" mh-folder-toggle-mime-part |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2190 "\t" mh-next-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2191 [backtab] mh-prev-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2192 "\M-\t" mh-prev-button) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2193 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2194 (cond |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2195 (mh-xemacs-flag |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2196 (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
|
2197 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2198 (define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse))) |
6365 | 2199 |
13384
917a1b8dab28
(mh-make-folder-mode-line): support mh-msg-count.
Karl Heuer <kwzh@gnu.org>
parents:
11577
diff
changeset
|
2200 ;; "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
|
2201 |
6365 | 2202 |
2203 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2204 ;;; Help Messages |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2205 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2206 ;;; 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
|
2207 ;;; |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2208 ;;; 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
|
2209 ;;; 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
|
2210 ;;; "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
|
2211 ;;; |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2212 ;;; 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
|
2213 ;;; 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
|
2214 ;;; `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
|
2215 (defvar mh-help-messages |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2216 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n" |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2217 "[d]elete, [o]refile, e[x]ecute,\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2218 "[s]end, [r]eply.\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2219 "Prefix characters:\n [F]older, [S]equence, MIME [K]eys, " |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2220 "[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
|
2221 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2222 (?F "[l]ist, [v]isit folder;\n" |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2223 "[t]hread; [s]earch; [i]ndexed search;\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2224 "[p]ack; [S]ort; [r]escan; [k]ill") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2225 (?S "[p]ut message in sequence, [n]arrow, [w]iden,\n" |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2226 "[s]equences, [l]ist,\n" |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2227 "[d]elete message from sequence, [k]ill sequence") |
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2228 (?T "[t]oggle, [d]elete, [o]refile thread") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2229 (?/ "Limit to [s]ubject; [w]iden") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2230 (?X "un[s]har, [u]udecode message") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2231 (?D "[b]urst digest") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2232 (?K "[v]iew, [i]nline, [o]utput/save MIME part; save [a]ll parts; \n" |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2233 "[TAB] next; [SHIFT-TAB] previous")) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2234 "Key binding cheat sheet. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2235 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2236 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
|
2237 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
|
2238 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
|
2239 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
|
2240 non-prefixed commands. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2241 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2242 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
|
2243 well.") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42205
diff
changeset
|
2244 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2245 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2246 |
29078 | 2247 (dolist (mess '("^Cursor not pointing to message$" |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2248 "^There is no other window$")) |
29078 | 2249 (add-to-list 'debug-ignored-errors mess)) |
2250 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2251 (provide 'mh-e) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2252 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2253 ;;; Local Variables: |
49120
30c4902b654d
Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents:
48595
diff
changeset
|
2254 ;;; indent-tabs-mode: nil |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2255 ;;; sentence-end-double-space: nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2256 ;;; End: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2257 |
6365 | 2258 ;;; mh-e.el ends here |