Mercurial > emacs
comparison lisp/mh-e/mh-e.el @ 89966:d8411455de48
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-32
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-486
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-487
Tweak permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-488
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-489
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-490
Update from CVS: man/fixit.texi (Spelling): Fix typo.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-491
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-494
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-495
Update from CVS: Add missing lisp/mh-e files
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-496
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-499
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-500
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-513
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 27 Aug 2004 07:00:34 +0000 |
parents | 97905c4f1a42 25da1d331c99 |
children | 4da4a09e8b1b |
comparison
equal
deleted
inserted
replaced
89965:5e9097d1ad99 | 89966:d8411455de48 |
---|---|
3 ;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, | 3 ;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, |
4 ;; 2000, 01, 02, 03, 2004 Free Software Foundation, Inc. | 4 ;; 2000, 01, 02, 03, 2004 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Bill Wohler <wohler@newt.com> | 6 ;; Author: Bill Wohler <wohler@newt.com> |
7 ;; Maintainer: Bill Wohler <wohler@newt.com> | 7 ;; Maintainer: Bill Wohler <wohler@newt.com> |
8 ;; Version: 7.4.4 | 8 ;; Version: 7.82 |
9 ;; Keywords: mail | 9 ;; Keywords: mail |
10 | 10 |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 | 12 |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
73 | 73 |
74 ;;; Change Log: | 74 ;;; Change Log: |
75 | 75 |
76 ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982. | 76 ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982. |
77 ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985. | 77 ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985. |
78 ;; Rewritten for GNU Emacs, James Larus 1985. larus@ginger.berkeley.edu | 78 ;; Rewritten for GNU Emacs, James Larus, 1985. |
79 ;; Modified by Stephen Gildea 1988. gildea@lcs.mit.edu | 79 ;; Modified by Stephen Gildea, 1988. |
80 ;; Maintenance picked up by Bill Wohler <wohler@newt.com> and the | 80 ;; Maintenance picked up by Bill Wohler and the |
81 ;; SourceForge Crew <http://mh-e.sourceforge.net/>. 2001. | 81 ;; SourceForge Crew <http://mh-e.sourceforge.net/>, 2001. |
82 | 82 |
83 ;;; Code: | 83 ;;; Code: |
84 | 84 |
85 (provide 'mh-e) | 85 (provide 'mh-e) |
86 | |
87 (eval-when-compile (require 'mh-acros)) | |
88 (mh-require-cl) | |
86 (require 'mh-utils) | 89 (require 'mh-utils) |
87 (mh-require-cl) | 90 (require 'mh-init) |
88 | |
89 (defvar recursive-load-depth-limit) | |
90 (eval-when (compile load eval) | |
91 (if (and (boundp 'recursive-load-depth-limit) | |
92 (integerp recursive-load-depth-limit) | |
93 (> 50 recursive-load-depth-limit)) | |
94 (setq recursive-load-depth-limit 50))) | |
95 | |
96 (require 'mh-inc) | 91 (require 'mh-inc) |
92 (require 'mh-seq) | |
97 (require 'gnus-util) | 93 (require 'gnus-util) |
98 (require 'easymenu) | 94 (require 'easymenu) |
99 | 95 |
100 ;; Shush the byte-compiler | 96 ;; Shush the byte-compiler |
101 (defvar font-lock-auto-fontify) | 97 (defvar font-lock-auto-fontify) |
102 (defvar font-lock-defaults) | 98 (defvar font-lock-defaults) |
103 | 99 |
104 (defconst mh-version "7.4.4" "Version number of MH-E.") | 100 (defconst mh-version "7.82" "Version number of MH-E.") |
105 | 101 |
106 ;;; Autoloads | 102 ;;; Autoloads |
107 (autoload 'Info-goto-node "info") | 103 (autoload 'Info-goto-node "info") |
108 | |
109 | |
110 | |
111 (defvar mh-note-deleted "D" | |
112 "String whose first character is used to notate deleted messages.") | |
113 | |
114 (defvar mh-note-refiled "^" | |
115 "String whose first character is used to notate refiled messages.") | |
116 | |
117 (defvar mh-note-cur "+" | |
118 "String whose first character is used to notate the current message.") | |
119 | 104 |
120 (defvar mh-partial-folder-mode-line-annotation "select" | 105 (defvar mh-partial-folder-mode-line-annotation "select" |
121 "Annotation when displaying part of a folder. | 106 "Annotation when displaying part of a folder. |
122 The string is displayed after the folder's name. nil for no annotation.") | 107 The string is displayed after the folder's name. nil for no annotation.") |
123 | 108 |
109 | |
110 ;;; Scan Line Formats | |
111 | |
124 ;;; Parameterize MH-E to work with different scan formats. The defaults work | 112 ;;; Parameterize MH-E to work with different scan formats. The defaults work |
125 ;;; with the standard MH scan listings, in which the first 4 characters on | 113 ;;; with the standard MH scan listings, in which the first 4 characters on |
126 ;;; the line are the message number, followed by two places for notations. | 114 ;;; the line are the message number, followed by two places for notations. |
127 | 115 |
128 ;; The following scan formats are passed to the scan program if the | 116 ;; The following scan formats are passed to the scan program if the setting of |
129 ;; setting of `mh-scan-format-file' above is nil. They are identical | 117 ;; `mh-scan-format-file' is t. They are identical except the later one makes |
130 ;; except the later one makes use of the nmh `decode' function to | 118 ;; use of the nmh `decode' function to decode RFC 2047 encodings. If you just |
131 ;; decode RFC 2047 encodings. If you just want to change the width of | 119 ;; want to change the width of the msg number, use the `mh-set-cmd-note' |
132 ;; the msg number, use the `mh-set-cmd-note' function. | 120 ;; function. |
133 | 121 |
134 (defvar mh-scan-format-mh | 122 (defvar mh-scan-format-mh |
135 (concat | 123 (concat |
136 "%4(msg)" | 124 "%4(msg)" |
137 "%<(cur)+%| %>" | 125 "%<(cur)+%| %>" |
148 "*Scan format string for MH, provided to the scan program via the -format arg. | 136 "*Scan format string for MH, provided to the scan program via the -format arg. |
149 This format is identical to the default except that additional hints for | 137 This format is identical to the default except that additional hints for |
150 fontification have been added to the fifth column (remember that in Emacs, the | 138 fontification have been added to the fifth column (remember that in Emacs, the |
151 first column is 0). | 139 first column is 0). |
152 | 140 |
153 The values of the fifth column, in priority order, are: `-' if the | 141 The values of the fifth column, in priority order, are: `-' if the message has |
154 message has been replied to, t if an address on the To: line matches | 142 been replied to, t if an address on the To: line matches one of the |
155 one of the mailboxes of the current user, `c' if the Cc: line matches, | 143 mailboxes of the current user, `c' if the Cc: line matches, `b' if the Bcc: |
156 `b' if the Bcc: line matches, and `n' if a non-empty Newsgroups: header | 144 line matches, and `n' if a non-empty Newsgroups: header is present.") |
157 is present.") | |
158 | 145 |
159 (defvar mh-scan-format-nmh | 146 (defvar mh-scan-format-nmh |
160 (concat | 147 (concat |
161 "%4(msg)" | 148 "%4(msg)" |
162 "%<(cur)+%| %>" | 149 "%<(cur)+%| %>" |
174 This string is passed to the scan program via the -format arg. | 161 This string is passed to the scan program via the -format arg. |
175 This format is identical to the default except that additional hints for | 162 This format is identical to the default except that additional hints for |
176 fontification have been added to the fifth column (remember that in Emacs, the | 163 fontification have been added to the fifth column (remember that in Emacs, the |
177 first column is 0). | 164 first column is 0). |
178 | 165 |
179 The values of the fifth column, in priority order, are: `-' if the | 166 The values of the fifth column, in priority order, are: `-' if the message has |
180 message has been replied to, t if an address on the To: line matches | 167 been replied to, t if an address on the To: field matches one of the |
181 one of the mailboxes of the current user, `c' if the Cc: line matches, | 168 mailboxes of the current user, `c' if the Cc: field matches, `b' if the Bcc: |
182 `b' if the Bcc: line matches, and `n' if a non-empty Newsgroups: header | 169 field matches, and `n' if a non-empty Newsgroups: field is present.") |
183 is present.") | 170 |
171 (defvar mh-note-deleted ?D | |
172 "Deleted messages are marked by this character. | |
173 See also `mh-scan-deleted-msg-regexp'.") | |
174 | |
175 (defvar mh-note-refiled ?^ | |
176 "Refiled messages are marked by this character. | |
177 See also `mh-scan-refiled-msg-regexp'.") | |
178 | |
179 (defvar mh-note-cur ?+ | |
180 "The current message (in MH) is marked by this character. | |
181 See also `mh-scan-cur-msg-number-regexp'.") | |
184 | 182 |
185 (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]" | 183 (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]" |
186 "Regexp specifying the scan lines that are 'good' messages. | 184 "This regexp specifies the scan lines that are 'good' messages. |
187 The default `mh-folder-font-lock-keywords' expects this expression to contain | 185 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
188 at least one parenthesized expression which matches the message number.") | 186 expression to contain at least one parenthesized expression which matches the |
187 message number as in the default of \"^\\\\( *[0-9]+\\\\)[^D^0-9]\".") | |
189 | 188 |
190 (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" | 189 (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" |
191 "Regexp matching scan lines of deleted messages. | 190 "This regexp matches deleted messages. |
192 The default `mh-folder-font-lock-keywords' expects this expression to contain | 191 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
193 at least one parenthesized expression which matches the message number.") | 192 expression to contain at least one parenthesized expression which matches the |
193 message number as in the default of \"^\\\\( *[0-9]+\\\\)D\". | |
194 See also `mh-note-deleted'.") | |
194 | 195 |
195 (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" | 196 (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" |
196 "Regexp matching scan lines of refiled messages. | 197 "This regexp matches refiled messages. |
197 The default `mh-folder-font-lock-keywords' expects this expression to contain | 198 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
198 at least one parenthesized expression which matches the message number.") | 199 expression to contain at least one parenthesized expression which matches the |
200 message number as in the default of \"^\\\\( *[0-9]+\\\\)\\\\^\". | |
201 See also `mh-note-refiled'.") | |
199 | 202 |
200 (defvar mh-scan-valid-regexp "^ *[0-9]" | 203 (defvar mh-scan-valid-regexp "^ *[0-9]" |
201 "Regexp matching scan lines for messages (not error messages).") | 204 "This regexp matches scan lines for messages (not error messages).") |
202 | 205 |
203 (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" | 206 (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" |
204 "Regexp matching scan line for the current message. | 207 "This regexp matches the current message. |
205 The default `mh-folder-font-lock-keywords' expects this expression to contain | 208 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
206 at least one parenthesized expression which matches the message number. | 209 expression to contain at least one parenthesized expression which matches the |
207 Don't disable this regexp as it's needed by non fontifying functions.") | 210 message number as in the default of \"^\\\\( *[0-9]+\\\\+\\\\).*\". Don't |
208 | 211 disable this regexp as it's needed by non-fontifying functions. |
209 (defvar mh-scan-cur-msg-regexp "^\\( *[0-9]+\\+DISABLED.*\\)" | 212 See also `mh-note-cur'.") |
210 "Regexp matching scan line for the current message. | |
211 The default `mh-folder-font-lock-keywords' expects this expression to contain | |
212 at least one parenthesized expression which matches the whole line. | |
213 To enable this feature, remove the string DISABLED from the regexp.") | |
214 | 213 |
215 (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" | 214 (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" |
216 "Regexp matching a valid date in scan lines. | 215 "This regexp matches a valid date. |
217 The default `mh-folder-font-lock-keywords' expects this expression to contain | 216 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
218 only one parenthesized expression which matches the date field | 217 expression to contain only one parenthesized expression which matches the date |
219 \(see `mh-scan-format-regexp').") | 218 field as in the default of \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. |
219 See also `mh-scan-format-regexp'.") | |
220 | 220 |
221 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" | 221 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
222 "Regexp specifying the recipient in scan lines for messages we sent. | 222 "This regexp specifies the recipient in messages you sent. |
223 The default `mh-folder-font-lock-keywords' expects this expression to contain | 223 Note that the default setting of `mh-folder-font-lock-keywords' |
224 two parenthesized expressions. The first is expected to match the To: | 224 expects this expression to contain two parenthesized expressions. The |
225 that the default scan format file generates. The second is expected to match | 225 first is expected to match the `To:' that the default scan format |
226 the recipient's name.") | 226 file generates. The second is expected to match the recipient's name |
227 as in the default of \"\\\\(To:\\\\)\\\\(..............\\\\)\".") | |
227 | 228 |
228 (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" | 229 (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" |
229 "Regexp matching the message body beginning displayed in scan lines. | 230 "This regexp matches the message body fragment displayed in scan lines. |
230 The default `mh-folder-font-lock-keywords' expects this expression to contain | 231 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
231 at least one parenthesized expression which matches the body text.") | 232 expression to contain at least one parenthesized expression which matches the |
233 body text as in the default of \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\".") | |
232 | 234 |
233 (defvar mh-scan-subject-regexp | 235 (defvar mh-scan-subject-regexp |
234 ;;"^ *[0-9]+........[ ]*...................\\([Rr][Ee]:\\s-*\\)*\\([^<\n]*\\)" | |
235 "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" | 236 "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" |
236 "*Regexp matching the subject string in MH folder mode. | 237 "This regexp matches the subject. |
237 The default `mh-folder-font-lock-keywords' expects this expression to contain | 238 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
238 at least tree parenthesized expressions. The first is expected to match the Re: | 239 expression to contain at least three parenthesized expressions. The first is |
239 string, if any. The second matches an optional bracketed number after Re, | 240 expected to match the `Re:' string, if any. The second matches an optional |
240 such as in Re[2]: and the third is expected to match the subject line itself.") | 241 bracketed number after `Re:', such as in `Re[2]:' (and is thus a |
242 sub-expression of the first expression) and the third is expected to match | |
243 the subject line itself as in the default of \"^ *[0-9]+........[ ]*...................\\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)*\\\\([^<\\n]*\\\\)\".") | |
241 | 244 |
242 (defvar mh-scan-format-regexp | 245 (defvar mh-scan-format-regexp |
243 (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") | 246 (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") |
244 "Regexp matching the output of scan. | 247 "This regexp matches the output of scan. |
245 The default value is based upon the default values of either | 248 Note that the default setting of `mh-folder-font-lock-keywords' expects this |
246 `mh-scan-format-mh' or `mh-scan-format-nmh'. | 249 expression to contain at least three parenthesized expressions. The first |
247 The default `mh-folder-font-lock-keywords' expects this expression to contain | 250 should match the fontification hint, the second is found in |
248 at least three parenthesized expressions. The first should match the | 251 `mh-scan-date-regexp', and the third should match the user name as in the |
249 fontification hint, the second is found in `mh-scan-date-regexp', and the | 252 default of \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp |
250 third should match the user name.") | 253 \"*\\\\(..................\\\\)\")\".") |
251 | 254 |
252 | 255 |
253 | 256 |
254 (defvar mh-folder-font-lock-keywords | 257 (defvar mh-folder-font-lock-keywords |
255 (list | 258 (list |
277 '(1 mh-folder-to-face) ;; To: | 280 '(1 mh-folder-to-face) ;; To: |
278 '(2 mh-folder-address-face)) ;; address | 281 '(2 mh-folder-address-face)) ;; address |
279 ;; scan font-lock name | 282 ;; scan font-lock name |
280 (list mh-scan-format-regexp | 283 (list mh-scan-format-regexp |
281 '(1 mh-folder-date-face) | 284 '(1 mh-folder-date-face) |
282 '(3 mh-folder-scan-format-face)) | 285 '(3 mh-folder-scan-format-face))) |
283 ;; Current message line | |
284 (list mh-scan-cur-msg-regexp | |
285 '(1 mh-folder-cur-msg-face prepend t))) | |
286 "Regexp keywords used to fontify the MH-Folder buffer.") | 286 "Regexp keywords used to fontify the MH-Folder buffer.") |
287 | 287 |
288 (defvar mh-scan-cmd-note-width 1 | 288 (defvar mh-scan-cmd-note-width 1 |
289 "Number of columns consumed by the cmd-note field in `mh-scan-format'. | 289 "Number of columns consumed by the cmd-note field in `mh-scan-format'. |
290 This column will have one of the values: ` ', `D', `^', `+' and where | 290 This column will have one of the values: ` ', `D', `^', `+' and where |
353 t)) | 353 t)) |
354 | 354 |
355 | 355 |
356 | 356 |
357 ;; Fontifify unseen mesages in bold. | 357 ;; Fontifify unseen mesages in bold. |
358 | |
359 (defvar mh-folder-unseen-seq-name nil | |
360 "Name of unseen sequence. | |
361 The default for this is provided by the function `mh-folder-unseen-seq-name' | |
362 On nmh systems.") | |
363 | |
364 (defun mh-folder-unseen-seq-name () | |
365 "Provide name of unseen sequence from mhparam." | |
366 (or mh-progs (mh-find-path)) | |
367 (save-excursion | |
368 (let ((unseen-seq-name "unseen")) | |
369 (with-temp-buffer | |
370 (unwind-protect | |
371 (progn | |
372 (call-process (expand-file-name "mhparam" mh-progs) | |
373 nil '(t t) nil "-component" "Unseen-Sequence") | |
374 (goto-char (point-min)) | |
375 (if (re-search-forward "Unseen-Sequence: \\(.*\\)$" nil t) | |
376 (setq unseen-seq-name (match-string 1)))))) | |
377 unseen-seq-name))) | |
378 | |
379 (defun mh-folder-unseen-seq-list () | |
380 "Return a list of unseen message numbers for current folder." | |
381 (if (not mh-folder-unseen-seq-name) | |
382 (setq mh-folder-unseen-seq-name (mh-folder-unseen-seq-name))) | |
383 (cond | |
384 ((not mh-folder-unseen-seq-name) | |
385 nil) | |
386 (t | |
387 (let ((folder mh-current-folder)) | |
388 (save-excursion | |
389 (with-temp-buffer | |
390 (unwind-protect | |
391 (progn | |
392 (call-process (expand-file-name "mark" mh-progs) | |
393 nil '(t t) nil | |
394 folder "-seq" mh-folder-unseen-seq-name | |
395 "-list") | |
396 (goto-char (point-min)) | |
397 (sort (mh-read-msg-list) '<))))))))) | |
398 | 358 |
399 (defmacro mh-generate-sequence-font-lock (seq prefix face) | 359 (defmacro mh-generate-sequence-font-lock (seq prefix face) |
400 "Generate the appropriate code to fontify messages in SEQ. | 360 "Generate the appropriate code to fontify messages in SEQ. |
401 PREFIX is used to generate unique names for the variables and functions | 361 PREFIX is used to generate unique names for the variables and functions |
402 defined by the macro. So a different prefix should be provided for every | 362 defined by the macro. So a different prefix should be provided for every |
490 | 450 |
491 (defvar mh-sequence-notation-history nil) | 451 (defvar mh-sequence-notation-history nil) |
492 ;Rememeber original notation that | 452 ;Rememeber original notation that |
493 ;is overwritten by `mh-note-seq'. | 453 ;is overwritten by `mh-note-seq'. |
494 | 454 |
455 (defvar mh-colors-available-flag nil) ;Are colors available? | |
456 | |
495 ;;; Macros and generic functions: | 457 ;;; Macros and generic functions: |
496 | 458 |
497 (defun mh-mapc (function list) | 459 (defun mh-mapc (function list) |
498 "Apply FUNCTION to each element of LIST for side effects only." | 460 "Apply FUNCTION to each element of LIST for side effects only." |
499 (while list | 461 (while list |
501 (setq list (cdr list)))) | 463 (setq list (cdr list)))) |
502 | 464 |
503 (defun mh-scan-format () | 465 (defun mh-scan-format () |
504 "Return the output format argument for the scan program." | 466 "Return the output format argument for the scan program." |
505 (if (equal mh-scan-format-file t) | 467 (if (equal mh-scan-format-file t) |
506 (list "-format" (if mh-nmh-flag | 468 (list "-format" (if (mh-variant-p 'nmh 'mu-mh) |
507 (list (mh-update-scan-format | 469 (list (mh-update-scan-format |
508 mh-scan-format-nmh mh-cmd-note)) | 470 mh-scan-format-nmh mh-cmd-note)) |
509 (list (mh-update-scan-format | 471 (list (mh-update-scan-format |
510 mh-scan-format-mh mh-cmd-note)))) | 472 mh-scan-format-mh mh-cmd-note)))) |
511 (if (not (equal mh-scan-format-file nil)) | 473 (if (not (equal mh-scan-format-file nil)) |
517 | 479 |
518 ;;;###autoload | 480 ;;;###autoload |
519 (defun mh-rmail (&optional arg) | 481 (defun mh-rmail (&optional arg) |
520 "Inc(orporate) new mail with MH. | 482 "Inc(orporate) new mail with MH. |
521 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, | 483 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, |
522 the Emacs front end to the MH mail system." | 484 the Emacs interface to the MH mail system." |
523 (interactive "P") | 485 (interactive "P") |
524 (mh-find-path) | 486 (mh-find-path) |
525 (if arg | 487 (if arg |
526 (call-interactively 'mh-visit-folder) | 488 (call-interactively 'mh-visit-folder) |
527 (unless (get-buffer mh-inbox) | 489 (unless (get-buffer mh-inbox) |
530 | 492 |
531 ;;;###autoload | 493 ;;;###autoload |
532 (defun mh-nmail (&optional arg) | 494 (defun mh-nmail (&optional arg) |
533 "Check for new mail in inbox folder. | 495 "Check for new mail in inbox folder. |
534 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, | 496 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, |
535 the Emacs front end to the MH mail system." | 497 the Emacs interface to the MH mail system." |
536 (interactive "P") | 498 (interactive "P") |
537 (mh-find-path) ; init mh-inbox | 499 (mh-find-path) ; init mh-inbox |
538 (if arg | 500 (if arg |
539 (call-interactively 'mh-visit-folder) | 501 (call-interactively 'mh-visit-folder) |
540 (mh-visit-folder mh-inbox))) | 502 (mh-visit-folder mh-inbox))) |
614 (mh-prompt-for-folder "inc mail into" mh-inbox t)))) | 576 (mh-prompt-for-folder "inc mail into" mh-inbox t)))) |
615 (if (not folder) | 577 (if (not folder) |
616 (setq folder mh-inbox)) | 578 (setq folder mh-inbox)) |
617 (let ((threading-needed-flag nil)) | 579 (let ((threading-needed-flag nil)) |
618 (let ((config (current-window-configuration))) | 580 (let ((config (current-window-configuration))) |
581 (delete-other-windows) | |
619 (cond ((not (get-buffer folder)) | 582 (cond ((not (get-buffer folder)) |
620 (mh-make-folder folder) | 583 (mh-make-folder folder) |
621 (setq threading-needed-flag mh-show-threads-flag) | 584 (setq threading-needed-flag mh-show-threads-flag) |
622 (setq mh-previous-window-config config)) | 585 (setq mh-previous-window-config config)) |
623 ((not (eq (current-buffer) (get-buffer folder))) | 586 ((not (eq (current-buffer) (get-buffer folder))) |
657 (t (forward-line -1) | 620 (t (forward-line -1) |
658 (message "No more undeleted messages") | 621 (message "No more undeleted messages") |
659 (if wait-after-complaining-flag (sit-for 1))))) | 622 (if wait-after-complaining-flag (sit-for 1))))) |
660 | 623 |
661 (defun mh-folder-from-address () | 624 (defun mh-folder-from-address () |
662 "Determine folder name from address in From field. | 625 "Derive folder name from sender. |
663 Takes the address in the From: header field, and returns one of: | 626 |
664 | 627 The name of the folder is derived as follows: |
665 a) The folder name associated with the address in the alist | 628 |
666 `mh-default-folder-list'. If the `Check Recipient' boolean | 629 a) The folder name associated with the first address found in the list |
667 is set, then the `mh-default-folder-list' addresses are | 630 `mh-default-folder-list' is used. Each element in this list contains a |
668 checked against the recipient instead of the originator | 631 `Check Recipient' item. If this item is turned on, then the address is |
669 (making possible to use this feature for mailing lists). | 632 checked against the recipient instead of the sender. This is useful for |
670 The first match found in `mh-default-folder-list' is used. | 633 mailing lists. |
671 | 634 |
672 b) The address' corresponding alias from the user's personal | 635 b) An alias prefixed by `mh-default-folder-prefix' corresponding to the |
673 aliases file prefixed by `mh-default-folder-prefix'. | 636 address is used. The prefix is used to prevent clutter in your mail |
674 | 637 directory. |
675 Returns nil if the address was not found in either place or if the variable | 638 |
676 `mh-default-folder-must-exist-flag' is nil and the folder does not exist." | 639 Return nil if a folder name was not derived, or if the variable |
640 `mh-default-folder-must-exist-flag' is t and the folder does not exist." | |
677 ;; Loop for all entries in mh-default-folder-list | 641 ;; Loop for all entries in mh-default-folder-list |
678 (save-restriction | 642 (save-restriction |
679 (goto-char (point-min)) | 643 (goto-char (point-min)) |
680 (re-search-forward "\n\n" nil t) | 644 (re-search-forward "\n\n" nil 'limit) |
681 (narrow-to-region (point-min) (point)) | 645 (narrow-to-region (point-min) (point)) |
682 (let ((to/cc (concat (or (message-fetch-field "to") "") ", " | 646 (let ((to/cc (concat (or (message-fetch-field "to") "") ", " |
683 (or (message-fetch-field "cc") ""))) | 647 (or (message-fetch-field "cc") ""))) |
684 (from (or (message-fetch-field "from") "")) | 648 (from (or (message-fetch-field "from") "")) |
685 folder-name) | 649 folder-name) |
713 | 677 |
714 (defun mh-prompt-for-refile-folder () | 678 (defun mh-prompt-for-refile-folder () |
715 "Prompt the user for a folder in which the message should be filed. | 679 "Prompt the user for a folder in which the message should be filed. |
716 The folder is returned as a string. | 680 The folder is returned as a string. |
717 | 681 |
718 If `mh-default-folder-for-message-function' is a function then the message | 682 The default folder name is generated by the option |
719 being refiled is yanked into a temporary buffer and the function is called to | 683 `mh-default-folder-for-message-function' if it is non-nil or |
720 intelligently guess where the message is to be refiled. | 684 `mh-folder-from-address'." |
721 | |
722 Otherwise, a default folder name is generated by `mh-folder-from-address'." | |
723 (mh-prompt-for-folder | 685 (mh-prompt-for-folder |
724 "Destination" | 686 "Destination" |
725 (let ((refile-file (mh-msg-filename (mh-get-msg-num t)))) | 687 (let ((refile-file (ignore-errors (mh-msg-filename (mh-get-msg-num t))))) |
726 (save-excursion | 688 (if (null refile-file) "" |
727 (set-buffer (get-buffer-create mh-temp-buffer)) | 689 (save-excursion |
728 (erase-buffer) | 690 (set-buffer (get-buffer-create mh-temp-buffer)) |
729 (insert-file-contents refile-file) | 691 (erase-buffer) |
730 (or (and mh-default-folder-for-message-function | 692 (insert-file-contents refile-file) |
731 (let ((buffer-file-name refile-file)) | 693 (or (and mh-default-folder-for-message-function |
732 (funcall mh-default-folder-for-message-function))) | 694 (let ((buffer-file-name refile-file)) |
733 (mh-folder-from-address) | 695 (funcall mh-default-folder-for-message-function))) |
734 (and (eq 'refile (car mh-last-destination-folder)) | 696 (mh-folder-from-address) |
735 (symbol-name (cdr mh-last-destination-folder))) | 697 (and (eq 'refile (car mh-last-destination-folder)) |
736 ""))) | 698 (symbol-name (cdr mh-last-destination-folder))) |
699 "")))) | |
737 t)) | 700 t)) |
738 | 701 |
739 (defun mh-refile-msg (range folder &optional dont-update-last-destination-flag) | 702 (defun mh-refile-msg (range folder &optional dont-update-last-destination-flag) |
740 "Refile RANGE into FOLDER. | 703 "Refile RANGE into FOLDER. |
741 | 704 |
870 (while (> count 0) | 833 (while (> count 0) |
871 (setq unread-sequence (cdr unread-sequence)) | 834 (setq unread-sequence (cdr unread-sequence)) |
872 (setq count (1- count))) | 835 (setq count (1- count))) |
873 (not (car unread-sequence))) | 836 (not (car unread-sequence))) |
874 (message "No more unread messages")) | 837 (message "No more unread messages")) |
875 (t (mh-goto-msg (car unread-sequence)))))) | 838 (t (loop for msg in unread-sequence |
839 when (mh-goto-msg msg t) return nil | |
840 finally (message "No more unread messages")))))) | |
876 | 841 |
877 (defun mh-goto-next-button (backward-flag &optional criterion) | 842 (defun mh-goto-next-button (backward-flag &optional criterion) |
878 "Search for next button satisfying criterion. | 843 "Search for next button satisfying criterion. |
879 If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If | 844 If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If |
880 CRITERION is a function or a symbol which has a function binding then that | 845 CRITERION is a function or a symbol which has a function binding then that |
1088 (t (mh-iterate-on-range () range | 1053 (t (mh-iterate-on-range () range |
1089 (mh-undo-msg nil)))) | 1054 (mh-undo-msg nil)))) |
1090 (if (not (mh-outstanding-commands-p)) | 1055 (if (not (mh-outstanding-commands-p)) |
1091 (mh-set-folder-modified-p nil))) | 1056 (mh-set-folder-modified-p nil))) |
1092 | 1057 |
1093 ;;;###mh-autoload | 1058 |
1094 (defun mh-folder-line-matches-show-buffer-p () | 1059 (defun mh-folder-line-matches-show-buffer-p () |
1095 "Return t if the message under point in folder-mode is in the show buffer. | 1060 "Return t if the message under point in folder-mode is in the show buffer. |
1096 Return nil in any other circumstance (no message under point, no show buffer, | 1061 Return nil in any other circumstance (no message under point, no show buffer, |
1097 the message in the show buffer doesn't match." | 1062 the message in the show buffer doesn't match." |
1098 (and (eq major-mode 'mh-folder-mode) | 1063 (and (eq major-mode 'mh-folder-mode) |
1121 | 1086 |
1122 ;;;###autoload | 1087 ;;;###autoload |
1123 (defun mh-version () | 1088 (defun mh-version () |
1124 "Display version information about MH-E and the MH mail handling system." | 1089 "Display version information about MH-E and the MH mail handling system." |
1125 (interactive) | 1090 (interactive) |
1126 (mh-find-progs) | |
1127 (set-buffer (get-buffer-create mh-info-buffer)) | 1091 (set-buffer (get-buffer-create mh-info-buffer)) |
1128 (erase-buffer) | 1092 (erase-buffer) |
1129 ;; MH-E version. | 1093 ;; MH-E version. |
1130 (insert "MH-E " mh-version "\n\n") | 1094 (insert "MH-E " mh-version "\n\n") |
1131 ;; MH-E compilation details. | 1095 ;; MH-E compilation details. |
1138 " Gnus (compile-time):\t" gnus-compiled-version "\n" | 1102 " Gnus (compile-time):\t" gnus-compiled-version "\n" |
1139 " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n")) | 1103 " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n")) |
1140 ;; Emacs version. | 1104 ;; Emacs version. |
1141 (insert (emacs-version) "\n\n") | 1105 (insert (emacs-version) "\n\n") |
1142 ;; MH version. | 1106 ;; MH version. |
1143 (let ((help-start (point))) | 1107 (if mh-variant-in-use |
1144 (condition-case err-data | 1108 (insert mh-variant-in-use "\n" |
1145 (mh-exec-cmd-output "inc" nil (if mh-nmh-flag "-version" "-help")) | 1109 " mh-progs:\t" mh-progs "\n" |
1146 (file-error (insert (mapconcat 'concat (cdr err-data) ": ") "\n"))) | 1110 " mh-lib:\t" mh-lib "\n" |
1147 (goto-char help-start) | 1111 " mh-lib-progs:\t" mh-lib-progs "\n\n") |
1148 (if mh-nmh-flag | 1112 (insert "No MH variant detected\n")) |
1149 (search-forward "inc -- " nil t) | |
1150 (search-forward "version: " nil t)) | |
1151 (delete-region help-start (point))) | |
1152 (goto-char (point-max)) | |
1153 (insert " mh-progs:\t" mh-progs "\n" | |
1154 " mh-lib:\t" mh-lib "\n" | |
1155 " mh-lib-progs:\t" mh-lib-progs "\n\n") | |
1156 ;; Linux version. | 1113 ;; Linux version. |
1157 (condition-case () | 1114 (condition-case () |
1158 (call-process "uname" nil t nil "-a") | 1115 (call-process "uname" nil t nil "-a") |
1159 (file-error)) | 1116 (file-error)) |
1160 (goto-char (point-min)) | 1117 (goto-char (point-min)) |
1200 (values 0 u folder))))) | 1157 (values 0 u folder))))) |
1201 | 1158 |
1202 (defun mh-folder-size-flist (folder) | 1159 (defun mh-folder-size-flist (folder) |
1203 "Find size of FOLDER using `flist'." | 1160 "Find size of FOLDER using `flist'." |
1204 (with-temp-buffer | 1161 (with-temp-buffer |
1205 (call-process (expand-file-name "flist" mh-progs) nil t nil | 1162 (call-process (expand-file-name "flist" mh-progs) nil t nil "-showzero" |
1206 "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) | 1163 "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) |
1207 (goto-char (point-min)) | 1164 (goto-char (point-min)) |
1208 (multiple-value-bind (folder unseen total) | 1165 (multiple-value-bind (folder unseen total) |
1209 (mh-parse-flist-output-line | 1166 (mh-parse-flist-output-line |
1210 (buffer-substring (point) (line-end-position))) | 1167 (buffer-substring (point) (line-end-position))) |
1234 current-prefix-arg | 1191 current-prefix-arg |
1235 mh-interpret-number-as-range-flag)))) | 1192 mh-interpret-number-as-range-flag)))) |
1236 (let ((config (current-window-configuration)) | 1193 (let ((config (current-window-configuration)) |
1237 (current-buffer (current-buffer)) | 1194 (current-buffer (current-buffer)) |
1238 (threaded-view-flag mh-show-threads-flag)) | 1195 (threaded-view-flag mh-show-threads-flag)) |
1196 (delete-other-windows) | |
1239 (save-excursion | 1197 (save-excursion |
1240 (when (get-buffer folder) | 1198 (when (get-buffer folder) |
1241 (set-buffer folder) | 1199 (set-buffer folder) |
1242 (setq threaded-view-flag (memq 'unthread mh-view-ops)))) | 1200 (setq threaded-view-flag (memq 'unthread mh-view-ops)))) |
1243 (when index-data | 1201 (when index-data |
1256 (and (message "Not threading since the number of messages exceeds `mh-large-folder'") | 1214 (and (message "Not threading since the number of messages exceeds `mh-large-folder'") |
1257 nil)))) | 1215 nil)))) |
1258 (mh-toggle-threads)) | 1216 (mh-toggle-threads)) |
1259 (mh-index-data | 1217 (mh-index-data |
1260 (mh-index-insert-folder-headers))) | 1218 (mh-index-insert-folder-headers))) |
1261 (unless mh-showing-mode (delete-other-windows)) | |
1262 (unless (eq current-buffer (current-buffer)) | 1219 (unless (eq current-buffer (current-buffer)) |
1263 (setq mh-previous-window-config config))) | 1220 (setq mh-previous-window-config config))) |
1264 nil) | 1221 nil) |
1265 | 1222 |
1266 ;;;###mh-autoload | 1223 |
1267 (defun mh-update-sequences () | 1224 (defun mh-update-sequences () |
1268 "Update MH's Unseen-Sequence and current folder and message. | 1225 "Update MH's Unseen-Sequence and current folder and message. |
1269 Flush MH-E's state out to MH. The message at the cursor becomes current." | 1226 Flush MH-E's state out to MH. The message at the cursor becomes current." |
1270 (interactive) | 1227 (interactive) |
1271 ;; mh-update-sequences is the opposite of mh-read-folder-sequences, | 1228 ;; mh-update-sequences is the opposite of mh-read-folder-sequences, |
1332 (format "Message %d already refiled. Copy to %s as well? " | 1289 (format "Message %d already refiled. Copy to %s as well? " |
1333 msg folder)) | 1290 msg folder)) |
1334 (mh-exec-cmd "refile" (mh-get-msg-num t) "-link" | 1291 (mh-exec-cmd "refile" (mh-get-msg-num t) "-link" |
1335 "-src" mh-current-folder | 1292 "-src" mh-current-folder |
1336 (symbol-name folder)) | 1293 (symbol-name folder)) |
1337 (message "Message not copied."))) | 1294 (message "Message not copied"))) |
1338 (t | 1295 (t |
1339 (mh-set-folder-modified-p t) | 1296 (mh-set-folder-modified-p t) |
1340 (cond ((null (assoc folder mh-refile-list)) | 1297 (cond ((null (assoc folder mh-refile-list)) |
1341 (push (list folder msg) mh-refile-list)) | 1298 (push (list folder msg) mh-refile-list)) |
1342 ((not (member msg (cdr (assoc folder mh-refile-list)))) | 1299 ((not (member msg (cdr (assoc folder mh-refile-list)))) |
1379 (while (> count 0) | 1336 (while (> count 0) |
1380 (setq unread-sequence (cdr unread-sequence)) | 1337 (setq unread-sequence (cdr unread-sequence)) |
1381 (setq count (1- count))) | 1338 (setq count (1- count))) |
1382 (not (car unread-sequence))) | 1339 (not (car unread-sequence))) |
1383 (message "No more unread messages")) | 1340 (message "No more unread messages")) |
1384 (t (mh-goto-msg (car unread-sequence)))))) | 1341 (t (loop for msg in unread-sequence |
1342 when (mh-goto-msg msg t) return nil | |
1343 finally (message "No more unread messages")))))) | |
1385 | 1344 |
1386 (defun mh-set-scan-mode () | 1345 (defun mh-set-scan-mode () |
1387 "Display the scan listing buffer, but do not show a message." | 1346 "Display the scan listing buffer, but do not show a message." |
1388 (if (get-buffer mh-show-buffer) | 1347 (if (get-buffer mh-show-buffer) |
1389 (delete-windows-on mh-show-buffer)) | 1348 (delete-windows-on mh-show-buffer)) |
1470 ["Next Message" mh-next-undeleted-msg t] | 1429 ["Next Message" mh-next-undeleted-msg t] |
1471 ["Previous Message" mh-previous-undeleted-msg t] | 1430 ["Previous Message" mh-previous-undeleted-msg t] |
1472 ["Go to First Message" mh-first-msg t] | 1431 ["Go to First Message" mh-first-msg t] |
1473 ["Go to Last Message" mh-last-msg t] | 1432 ["Go to Last Message" mh-last-msg t] |
1474 ["Go to Message by Number..." mh-goto-msg t] | 1433 ["Go to Message by Number..." mh-goto-msg t] |
1475 ["Modify Message" mh-modify] | 1434 ["Modify Message" mh-modify t] |
1476 ["Delete Message" mh-delete-msg (mh-get-msg-num nil)] | 1435 ["Delete Message" mh-delete-msg (mh-get-msg-num nil)] |
1477 ["Refile Message" mh-refile-msg (mh-get-msg-num nil)] | 1436 ["Refile Message" mh-refile-msg (mh-get-msg-num nil)] |
1478 ["Undo Delete/Refile" mh-undo t] | 1437 ["Undo Delete/Refile" mh-undo (mh-outstanding-commands-p)] |
1479 ["Process Delete/Refile" mh-execute-commands | 1438 ["Execute Delete/Refile" mh-execute-commands |
1480 (or mh-refile-list mh-delete-list)] | 1439 (mh-outstanding-commands-p)] |
1481 "--" | 1440 "--" |
1482 ["Compose a New Message" mh-send t] | 1441 ["Compose a New Message" mh-send t] |
1483 ["Reply to Message..." mh-reply (mh-get-msg-num nil)] | 1442 ["Reply to Message..." mh-reply (mh-get-msg-num nil)] |
1484 ["Forward Message..." mh-forward (mh-get-msg-num nil)] | 1443 ["Forward Message..." mh-forward (mh-get-msg-num nil)] |
1485 ["Redistribute Message..." mh-redistribute (mh-get-msg-num nil)] | 1444 ["Redistribute Message..." mh-redistribute (mh-get-msg-num nil)] |
1499 mh-folder-folder-menu mh-folder-mode-map "Menu for MH-E folder." | 1458 mh-folder-folder-menu mh-folder-mode-map "Menu for MH-E folder." |
1500 '("Folder" | 1459 '("Folder" |
1501 ["Incorporate New Mail" mh-inc-folder t] | 1460 ["Incorporate New Mail" mh-inc-folder t] |
1502 ["Toggle Show/Folder" mh-toggle-showing t] | 1461 ["Toggle Show/Folder" mh-toggle-showing t] |
1503 ["Execute Delete/Refile" mh-execute-commands | 1462 ["Execute Delete/Refile" mh-execute-commands |
1504 (or mh-refile-list mh-delete-list)] | 1463 (mh-outstanding-commands-p)] |
1505 ["Rescan Folder" mh-rescan-folder t] | 1464 ["Rescan Folder" mh-rescan-folder t] |
1506 ["Thread Folder" mh-toggle-threads | 1465 ["Thread Folder" mh-toggle-threads |
1507 (not (memq 'unthread mh-view-ops))] | 1466 (not (memq 'unthread mh-view-ops))] |
1508 ["Pack Folder" mh-pack-folder t] | 1467 ["Pack Folder" mh-pack-folder t] |
1509 ["Sort Folder" mh-sort-folder t] | 1468 ["Sort Folder" mh-sort-folder t] |
1539 (eval-when-compile | 1498 (eval-when-compile |
1540 (defvar tool-bar-mode) | 1499 (defvar tool-bar-mode) |
1541 (defvar tool-bar-map) | 1500 (defvar tool-bar-map) |
1542 (defvar desktop-save-buffer)) ;Emacs 21.4 | 1501 (defvar desktop-save-buffer)) ;Emacs 21.4 |
1543 | 1502 |
1503 ;; Register mh-folder-mode as supporting which-function-mode... | |
1504 (load "which-func" t t) | |
1505 (when (and (boundp 'which-func-modes) | |
1506 (not (member 'mh-folder-mode which-func-modes))) | |
1507 (push 'mh-folder-mode which-func-modes)) | |
1508 | |
1544 (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder" | 1509 (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder" |
1545 "Major MH-E mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map> | 1510 "Major MH-E mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map> |
1546 | 1511 |
1547 You can show the message the cursor is pointing to, and step through the | 1512 You can show the message the cursor is pointing to, and step through the |
1548 messages. Messages can be marked for deletion or refiling into another | 1513 messages. Messages can be marked for deletion or refiling into another |
1549 folder; these commands are executed all at once with a separate command. | 1514 folder; these commands are executed all at once with a separate command. |
1550 | 1515 |
1551 A prefix argument (\\[universal-argument]) to delete, refile, list, or undo | |
1552 applies the action to a message sequence. If `transient-mark-mode', | |
1553 is non-nil, the action is applied to the region. | |
1554 | |
1555 Options that control this mode can be changed with \\[customize-group]; | 1516 Options that control this mode can be changed with \\[customize-group]; |
1556 specify the \"mh\" group. In particular, please see the `mh-scan-format-file' | 1517 specify the \"mh\" group. In particular, please see the `mh-scan-format-file' |
1557 option if you wish to modify scan's format. | 1518 option if you wish to modify scan's format. |
1558 | 1519 |
1559 When a folder is visited, the hook `mh-folder-mode-hook' is run. | 1520 When a folder is visited, the hook `mh-folder-mode-hook' is run. |
1521 | |
1522 Ranges | |
1523 ====== | |
1524 Many commands that operate on individual messages, such as `mh-forward' or | |
1525 `mh-refile-msg' take a RANGE argument. This argument can be used in several | |
1526 ways. | |
1527 | |
1528 If you provide the prefix argument (\\[universal-argument]) to these commands, | |
1529 then you will be prompted for the message range. This can be any legal MH | |
1530 range which can include messages, sequences, and the abbreviations (described | |
1531 in the mh(1) man page): | |
1532 | |
1533 <num1>-<num2> | |
1534 Indicates all messages in the range <num1> to <num2>, inclusive. The range | |
1535 must be nonempty. | |
1536 | |
1537 `<num>:N' | |
1538 `<num>:+N' | |
1539 `<num>:-N' | |
1540 Up to N messages beginning with (or ending with) message num. Num may be | |
1541 any of the pre-defined symbols: first, prev, cur, next or last. | |
1542 | |
1543 `first:N' | |
1544 `prev:N' | |
1545 `next:N' | |
1546 `last:N' | |
1547 The first, previous, next or last messages, if they exist. | |
1548 | |
1549 `all' | |
1550 All of the messages. | |
1551 | |
1552 For example, a range that shows all of these things is `1 2 3 5-10 last:5 | |
1553 unseen'. | |
1554 | |
1555 If the option `transient-mark-mode' is set to t and you set a region in the | |
1556 MH-Folder buffer, then the MH-E command will perform the operation on all | |
1557 messages in that region. | |
1560 | 1558 |
1561 \\{mh-folder-mode-map}" | 1559 \\{mh-folder-mode-map}" |
1562 | 1560 |
1563 (make-local-variable 'font-lock-defaults) | 1561 (make-local-variable 'font-lock-defaults) |
1564 (setq font-lock-defaults '(mh-folder-font-lock-keywords t)) | 1562 (setq font-lock-defaults '(mh-folder-font-lock-keywords t)) |
1565 (make-local-variable 'desktop-save-buffer) | 1563 (make-local-variable 'desktop-save-buffer) |
1566 (setq desktop-save-buffer t) | 1564 (setq desktop-save-buffer t) |
1567 (mh-make-local-vars | 1565 (mh-make-local-vars |
1566 'mh-colors-available-flag (mh-colors-available-p) | |
1567 ; Do we have colors available | |
1568 'mh-current-folder (buffer-name) ; Name of folder, a string | 1568 'mh-current-folder (buffer-name) ; Name of folder, a string |
1569 'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs | 1569 'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs |
1570 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/" | 1570 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/" |
1571 (file-name-as-directory (mh-expand-file-name (buffer-name))) | 1571 (file-name-as-directory (mh-expand-file-name (buffer-name))) |
1572 'mh-display-buttons-for-inline-parts-flag | |
1573 mh-display-buttons-for-inline-parts-flag ; Allow for display of buttons to | |
1574 ; be toggled. | |
1572 'mh-arrow-marker (make-marker) ; Marker where arrow is displayed | 1575 'mh-arrow-marker (make-marker) ; Marker where arrow is displayed |
1573 'overlay-arrow-position nil ; Allow for simultaneous display in | 1576 'overlay-arrow-position nil ; Allow for simultaneous display in |
1574 'overlay-arrow-string ">" ; different MH-E buffers. | 1577 'overlay-arrow-string ">" ; different MH-E buffers. |
1575 'mh-showing-mode nil ; Show message also? | 1578 'mh-showing-mode nil ; Show message also? |
1576 'mh-delete-list nil ; List of msgs nums to delete | 1579 'mh-delete-list nil ; List of msgs nums to delete |
1595 'mh-msg-count nil ; Number of msgs in buffer | 1598 'mh-msg-count nil ; Number of msgs in buffer |
1596 'mh-mode-line-annotation nil ; Indicates message range | 1599 'mh-mode-line-annotation nil ; Indicates message range |
1597 'mh-sequence-notation-history (make-hash-table) | 1600 'mh-sequence-notation-history (make-hash-table) |
1598 ; Remember what is overwritten by | 1601 ; Remember what is overwritten by |
1599 ; mh-note-seq. | 1602 ; mh-note-seq. |
1603 'imenu-create-index-function 'mh-index-create-imenu-index | |
1604 ; Setup imenu support | |
1600 'mh-previous-window-config nil) ; Previous window configuration | 1605 'mh-previous-window-config nil) ; Previous window configuration |
1601 (mh-remove-xemacs-horizontal-scrollbar) | 1606 (mh-remove-xemacs-horizontal-scrollbar) |
1602 (setq truncate-lines t) | 1607 (setq truncate-lines t) |
1603 (auto-save-mode -1) | 1608 (auto-save-mode -1) |
1604 (setq buffer-offer-save t) | 1609 (setq buffer-offer-save t) |
1618 (mh-funcall-if-exists mh-toolbar-init :folder) | 1623 (mh-funcall-if-exists mh-toolbar-init :folder) |
1619 (if (and mh-xemacs-flag | 1624 (if (and mh-xemacs-flag |
1620 font-lock-auto-fontify) | 1625 font-lock-auto-fontify) |
1621 (turn-on-font-lock))) ; Force font-lock in XEmacs. | 1626 (turn-on-font-lock))) ; Force font-lock in XEmacs. |
1622 | 1627 |
1628 (defun mh-toggle-mime-buttons () | |
1629 "Toggle display of buttons for inline MIME parts." | |
1630 (interactive) | |
1631 (setq mh-display-buttons-for-inline-parts-flag | |
1632 (not mh-display-buttons-for-inline-parts-flag)) | |
1633 (mh-show nil t)) | |
1634 | |
1635 (defun mh-colors-available-p () | |
1636 "Check if colors are available in the Emacs being used." | |
1637 (or mh-xemacs-flag | |
1638 (let ((color-cells | |
1639 (or (ignore-errors (mh-funcall-if-exists display-color-cells)) | |
1640 (ignore-errors (mh-funcall-if-exists | |
1641 x-display-color-cells))))) | |
1642 (and (numberp color-cells) (>= color-cells 8))))) | |
1643 | |
1644 (defun mh-colors-in-use-p () | |
1645 "Check if colors are being used in the folder buffer." | |
1646 (and mh-colors-available-flag font-lock-mode)) | |
1647 | |
1623 (defun mh-make-local-vars (&rest pairs) | 1648 (defun mh-make-local-vars (&rest pairs) |
1624 "Initialize local variables according to the variable-value PAIRS." | 1649 "Initialize local variables according to the variable-value PAIRS." |
1625 | 1650 |
1626 (while pairs | 1651 (while pairs |
1627 (set (make-local-variable (car pairs)) (car (cdr pairs))) | 1652 (set (make-local-variable (car pairs)) (car (cdr pairs))) |
1629 | 1654 |
1630 ;;;###autoload | 1655 ;;;###autoload |
1631 (defun mh-restore-desktop-buffer (desktop-buffer-file-name | 1656 (defun mh-restore-desktop-buffer (desktop-buffer-file-name |
1632 desktop-buffer-name | 1657 desktop-buffer-name |
1633 desktop-buffer-misc) | 1658 desktop-buffer-misc) |
1634 "Restore an MH folder buffer specified in a desktop file." | 1659 "Restore an MH folder buffer specified in a desktop file. |
1660 When desktop creates a buffer, DESKTOP-BUFFER-FILE-NAME holds the file name to | |
1661 visit, DESKTOP-BUFFER-NAME holds the desired buffer name, and | |
1662 DESKTOP-BUFFER-MISC holds a list of miscellaneous info used by the | |
1663 `desktop-buffer-handlers' functions." | |
1635 (mh-find-path) | 1664 (mh-find-path) |
1636 (mh-visit-folder desktop-buffer-name) | 1665 (mh-visit-folder desktop-buffer-name) |
1637 (current-buffer)) | 1666 (current-buffer)) |
1638 | 1667 |
1639 (defun mh-scan-folder (folder range &optional dont-exec-pending) | 1668 (defun mh-scan-folder (folder range &optional dont-exec-pending) |
1640 "Scan the FOLDER over the RANGE. | 1669 "Scan the FOLDER over the RANGE. |
1641 If the optional argument DONT-EXEC-PENDING is non-nil then pending deletes and | 1670 If the optional argument DONT-EXEC-PENDING is non-nil then pending deletes and |
1642 refiles aren't carried out. | 1671 refiles aren't carried out. |
1643 Return in the folder's buffer." | 1672 Return in the folder's buffer." |
1673 (when (stringp range) | |
1674 (setq range (delete "" (split-string range "[ \t\n]")))) | |
1644 (cond ((null (get-buffer folder)) | 1675 (cond ((null (get-buffer folder)) |
1645 (mh-make-folder folder)) | 1676 (mh-make-folder folder)) |
1646 (t | 1677 (t |
1647 (unless dont-exec-pending | 1678 (unless dont-exec-pending |
1648 (mh-process-or-undo-commands folder) | 1679 (mh-process-or-undo-commands folder) |
1691 "-width" (window-width) | 1722 "-width" (window-width) |
1692 folder range) | 1723 folder range) |
1693 (goto-char scan-start) | 1724 (goto-char scan-start) |
1694 (cond ((looking-at "scan: no messages in") | 1725 (cond ((looking-at "scan: no messages in") |
1695 (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines | 1726 (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines |
1696 ((looking-at "scan: bad message list ") | 1727 ((looking-at (if (mh-variant-p 'mu-mh) |
1728 "scan: message set .* does not exist" | |
1729 "scan: bad message list ")) | |
1697 (keep-lines mh-scan-valid-regexp)) | 1730 (keep-lines mh-scan-valid-regexp)) |
1698 ((looking-at "scan: ")) ; Keep error messages | 1731 ((looking-at "scan: ")) ; Keep error messages |
1699 (t | 1732 (t |
1700 (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines | 1733 (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines |
1701 (setq mh-seq-list (mh-read-folder-sequences folder nil)) | 1734 (setq mh-seq-list (mh-read-folder-sequences folder nil)) |
1867 (mh-first-msg-num | 1900 (mh-first-msg-num |
1868 (format " (%d)" mh-first-msg-num)) | 1901 (format " (%d)" mh-first-msg-num)) |
1869 ("")))))) | 1902 ("")))))) |
1870 (mh-logo-display)))) | 1903 (mh-logo-display)))) |
1871 | 1904 |
1872 ;;; XXX: Remove this function, if no one uses it any more... | |
1873 (defun mh-unmark-all-headers (remove-all-flags) | |
1874 "Remove all '+' flags from the folder listing. | |
1875 With non-nil argument REMOVE-ALL-FLAGS, remove all 'D', '^' and '%' flags too. | |
1876 Optimized for speed (i.e., no regular expressions). | |
1877 | |
1878 This function is deprecated. Use `mh-remove-all-notation' instead." | |
1879 (save-excursion | |
1880 (let ((case-fold-search nil) | |
1881 (last-line (1- (point-max))) | |
1882 char) | |
1883 (mh-first-msg) | |
1884 (while (<= (point) last-line) | |
1885 (forward-char mh-cmd-note) | |
1886 (setq char (following-char)) | |
1887 (if (or (and remove-all-flags | |
1888 (or (= char (aref mh-note-deleted 0)) | |
1889 (= char (aref mh-note-refiled 0)))) | |
1890 (= char (aref mh-note-cur 0))) | |
1891 (progn | |
1892 (delete-char 1) | |
1893 (insert " "))) | |
1894 (if remove-all-flags | |
1895 (progn | |
1896 (forward-char 1) | |
1897 (if (= (following-char) (aref mh-note-seq 0)) | |
1898 (progn | |
1899 (delete-char 1) | |
1900 (insert " "))))) | |
1901 (forward-line))))) | |
1902 | |
1903 (defun mh-add-sequence-notation (msg internal-seq-flag) | 1905 (defun mh-add-sequence-notation (msg internal-seq-flag) |
1904 "Add sequence notation to the MSG on the current line. | 1906 "Add sequence notation to the MSG on the current line. |
1905 If INTERNAL-SEQ-FLAG is non-nil, then just remove text properties from the | 1907 If INTERNAL-SEQ-FLAG is non-nil, then refontify the scan line if font-lock is |
1906 current line, so that font-lock would automatically refontify it." | 1908 turned on." |
1907 (with-mh-folder-updating (t) | 1909 (with-mh-folder-updating (t) |
1908 (save-excursion | 1910 (save-excursion |
1909 (beginning-of-line) | 1911 (beginning-of-line) |
1910 (if internal-seq-flag | 1912 (if internal-seq-flag |
1911 (mh-notate nil nil mh-cmd-note) | 1913 (progn |
1914 ;; Change the buffer so that if transient-mark-mode is active | |
1915 ;; and there is an active region it will get deactivated as in | |
1916 ;; the case of user sequences. | |
1917 (mh-notate nil nil mh-cmd-note) | |
1918 (when font-lock-mode | |
1919 (font-lock-fontify-region (point) (line-end-position)))) | |
1912 (forward-char (1+ mh-cmd-note)) | 1920 (forward-char (1+ mh-cmd-note)) |
1913 (let ((stack (gethash msg mh-sequence-notation-history))) | 1921 (let ((stack (gethash msg mh-sequence-notation-history))) |
1914 (setf (gethash msg mh-sequence-notation-history) | 1922 (setf (gethash msg mh-sequence-notation-history) |
1915 (cons (char-after) stack))) | 1923 (cons (char-after) stack))) |
1916 (mh-notate nil mh-note-seq (1+ mh-cmd-note)))))) | 1924 (mh-notate nil mh-note-seq (1+ mh-cmd-note)))))) |
1928 ;; ... and this takes care of user sequences. | 1936 ;; ... and this takes care of user sequences. |
1929 (let ((stack (gethash msg mh-sequence-notation-history))) | 1937 (let ((stack (gethash msg mh-sequence-notation-history))) |
1930 (while (and all (cdr stack)) | 1938 (while (and all (cdr stack)) |
1931 (setq stack (cdr stack))) | 1939 (setq stack (cdr stack))) |
1932 (when stack | 1940 (when stack |
1933 (mh-notate nil (car stack) (1+ mh-cmd-note))) | 1941 (save-excursion |
1942 (beginning-of-line) | |
1943 (forward-char (1+ mh-cmd-note)) | |
1944 (delete-char 1) | |
1945 (insert (car stack)))) | |
1934 (setf (gethash msg mh-sequence-notation-history) (cdr stack)))))) | 1946 (setf (gethash msg mh-sequence-notation-history) (cdr stack)))))) |
1935 | 1947 |
1936 (defun mh-remove-cur-notation () | 1948 (defun mh-remove-cur-notation () |
1937 "Remove old cur notation." | 1949 "Remove old cur notation." |
1938 (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) | 1950 (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) |
1951 (mh-iterate-on-range msg (cons (point-min) (point-max)) | 1963 (mh-iterate-on-range msg (cons (point-min) (point-max)) |
1952 (mh-notate nil ? mh-cmd-note) | 1964 (mh-notate nil ? mh-cmd-note) |
1953 (mh-remove-sequence-notation msg nil t)) | 1965 (mh-remove-sequence-notation msg nil t)) |
1954 (clrhash mh-sequence-notation-history))) | 1966 (clrhash mh-sequence-notation-history))) |
1955 | 1967 |
1956 ;;;###mh-autoload | 1968 |
1957 (defun mh-goto-cur-msg (&optional minimal-changes-flag) | 1969 (defun mh-goto-cur-msg (&optional minimal-changes-flag) |
1958 "Position the cursor at the current message. | 1970 "Position the cursor at the current message. |
1959 When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't | 1971 When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't |
1960 recenter the folder buffer." | 1972 recenter the folder buffer." |
1961 (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) | 1973 (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) |
2100 (mh-delete-line 1)) | 2112 (mh-delete-line 1)) |
2101 (setq msgs (cdr msgs))))) | 2113 (setq msgs (cdr msgs))))) |
2102 | 2114 |
2103 (defun mh-outstanding-commands-p () | 2115 (defun mh-outstanding-commands-p () |
2104 "Return non-nil if there are outstanding deletes or refiles." | 2116 "Return non-nil if there are outstanding deletes or refiles." |
2105 (or mh-delete-list mh-refile-list)) | 2117 (save-excursion |
2118 (when (eq major-mode 'mh-show-mode) | |
2119 (set-buffer mh-show-folder-buffer)) | |
2120 (or mh-delete-list mh-refile-list))) | |
2106 | 2121 |
2107 (defun mh-coalesce-msg-list (messages) | 2122 (defun mh-coalesce-msg-list (messages) |
2108 "Given a list of MESSAGES, return a list of message number ranges. | 2123 "Given a list of MESSAGES, return a list of message number ranges. |
2109 This is the inverse of `mh-read-msg-list', which expands ranges. | 2124 This is the inverse of `mh-read-msg-list', which expands ranges. |
2110 Message lists passed to MH programs should be processed by this function | 2125 Message lists passed to MH programs should be processed by this function |
2221 | 2236 |
2222 (defun mh-internal-seq (name) | 2237 (defun mh-internal-seq (name) |
2223 "Return non-nil if NAME is the name of an internal MH-E sequence." | 2238 "Return non-nil if NAME is the name of an internal MH-E sequence." |
2224 (or (memq name mh-internal-seqs) | 2239 (or (memq name mh-internal-seqs) |
2225 (eq name mh-unseen-seq) | 2240 (eq name mh-unseen-seq) |
2226 (and mh-tick-seq (eq name mh-tick-seq)) | 2241 (and (mh-colors-in-use-p) mh-tick-seq (eq name mh-tick-seq)) |
2227 (eq name mh-previous-seq) | 2242 (eq name mh-previous-seq) |
2228 (mh-folder-name-p name))) | 2243 (mh-folder-name-p name))) |
2229 | 2244 |
2230 (defun mh-valid-seq-p (name) | 2245 (defun mh-valid-seq-p (name) |
2231 "Return non-nil if NAME is a valid MH sequence name." | 2246 "Return non-nil if NAME is a valid MH sequence name." |
2262 (append folders-changed | 2277 (append folders-changed |
2263 (mh-index-delete-from-sequence sequence msg-list)))) | 2278 (mh-index-delete-from-sequence sequence msg-list)))) |
2264 (when (and (eq sequence mh-unseen-seq) (mh-speed-flists-active-p)) | 2279 (when (and (eq sequence mh-unseen-seq) (mh-speed-flists-active-p)) |
2265 (apply #'mh-speed-flists t folders-changed))))) | 2280 (apply #'mh-speed-flists t folders-changed))))) |
2266 | 2281 |
2282 (defun mh-catchup (range) | |
2283 "Delete RANGE from the `mh-unseen-seq' sequence. | |
2284 | |
2285 Check the document of `mh-interactive-range' to see how RANGE is read in | |
2286 interactive use." | |
2287 (interactive (list (mh-interactive-range "Catchup" | |
2288 (cons (point-min) (point-max))))) | |
2289 (mh-delete-msg-from-seq range mh-unseen-seq)) | |
2290 | |
2267 (defun mh-delete-a-msg-from-seq (msg sequence internal-flag) | 2291 (defun mh-delete-a-msg-from-seq (msg sequence internal-flag) |
2268 "Delete MSG from SEQUENCE. | 2292 "Delete MSG from SEQUENCE. |
2269 If INTERNAL-FLAG is non-nil, then do not inform MH of the change." | 2293 If INTERNAL-FLAG is non-nil, then do not inform MH of the change." |
2270 (let ((entry (mh-find-seq sequence))) | 2294 (let ((entry (mh-find-seq sequence))) |
2271 (when (and entry (memq msg (mh-seq-msgs entry))) | 2295 (when (and entry (memq msg (mh-seq-msgs entry))) |
2288 (not (mh-folder-name-p seq))) | 2312 (not (mh-folder-name-p seq))) |
2289 (save-excursion | 2313 (save-excursion |
2290 (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero" | 2314 (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero" |
2291 "-sequence" (symbol-name seq) | 2315 "-sequence" (symbol-name seq) |
2292 (mh-coalesce-msg-list msgs))))) | 2316 (mh-coalesce-msg-list msgs))))) |
2293 | |
2294 (defun mh-map-over-seqs (function seq-list) | |
2295 "Apply FUNCTION to each sequence in SEQ-LIST. | |
2296 The sequence name and the list of messages are passed as arguments." | |
2297 (while seq-list | |
2298 (funcall function | |
2299 (mh-seq-name (car seq-list)) | |
2300 (mh-seq-msgs (car seq-list))) | |
2301 (setq seq-list (cdr seq-list)))) | |
2302 | |
2303 (defun mh-notate-if-in-one-seq (msg character offset seq) | |
2304 "Notate MSG. | |
2305 The CHARACTER is placed at the given OFFSET from the beginning of the listing. | |
2306 The notation is performed if the MSG is only in SEQ." | |
2307 (let ((in-seqs (mh-seq-containing-msg msg nil))) | |
2308 (if (and (eq seq (car in-seqs)) (null (cdr in-seqs))) | |
2309 (mh-notate msg character offset)))) | |
2310 | 2317 |
2311 (defun mh-seq-containing-msg (msg &optional include-internal-flag) | 2318 (defun mh-seq-containing-msg (msg &optional include-internal-flag) |
2312 "Return a list of the sequences containing MSG. | 2319 "Return a list of the sequences containing MSG. |
2313 If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list." | 2320 If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list." |
2314 (let ((l mh-seq-list) | 2321 (let ((l mh-seq-list) |
2339 " " mh-page-msg | 2346 " " mh-page-msg |
2340 "!" mh-refile-or-write-again | 2347 "!" mh-refile-or-write-again |
2341 "'" mh-toggle-tick | 2348 "'" mh-toggle-tick |
2342 "," mh-header-display | 2349 "," mh-header-display |
2343 "." mh-alt-show | 2350 "." mh-alt-show |
2351 ";" mh-toggle-mh-decode-mime-flag | |
2344 ">" mh-write-msg-to-file | 2352 ">" mh-write-msg-to-file |
2345 "?" mh-help | 2353 "?" mh-help |
2346 "E" mh-extract-rejected-mail | 2354 "E" mh-extract-rejected-mail |
2347 "M" mh-modify | 2355 "M" mh-modify |
2348 "\177" mh-previous-page | 2356 "\177" mh-previous-page |
2360 "e" mh-edit-again | 2368 "e" mh-edit-again |
2361 "f" mh-forward | 2369 "f" mh-forward |
2362 "g" mh-goto-msg | 2370 "g" mh-goto-msg |
2363 "i" mh-inc-folder | 2371 "i" mh-inc-folder |
2364 "k" mh-delete-subject-or-thread | 2372 "k" mh-delete-subject-or-thread |
2365 "l" mh-print-msg | |
2366 "m" mh-alt-send | 2373 "m" mh-alt-send |
2367 "n" mh-next-undeleted-msg | 2374 "n" mh-next-undeleted-msg |
2368 "\M-n" mh-next-unread-msg | 2375 "\M-n" mh-next-unread-msg |
2369 "o" mh-refile-msg | 2376 "o" mh-refile-msg |
2370 "p" mh-previous-undeleted-msg | 2377 "p" mh-previous-undeleted-msg |
2380 | 2387 |
2381 (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map) | 2388 (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map) |
2382 "?" mh-prefix-help | 2389 "?" mh-prefix-help |
2383 "'" mh-index-ticked-messages | 2390 "'" mh-index-ticked-messages |
2384 "S" mh-sort-folder | 2391 "S" mh-sort-folder |
2392 "c" mh-catchup | |
2385 "f" mh-alt-visit-folder | 2393 "f" mh-alt-visit-folder |
2386 "i" mh-index-search | 2394 "i" mh-index-search |
2387 "k" mh-kill-folder | 2395 "k" mh-kill-folder |
2388 "l" mh-list-folders | 2396 "l" mh-list-folders |
2389 "n" mh-index-new-messages | 2397 "n" mh-index-new-messages |
2400 (gnus-define-keys (mh-junk-map "J" mh-folder-mode-map) | 2408 (gnus-define-keys (mh-junk-map "J" mh-folder-mode-map) |
2401 "?" mh-prefix-help | 2409 "?" mh-prefix-help |
2402 "b" mh-junk-blacklist | 2410 "b" mh-junk-blacklist |
2403 "w" mh-junk-whitelist) | 2411 "w" mh-junk-whitelist) |
2404 | 2412 |
2413 (gnus-define-keys (mh-ps-print-map "P" mh-folder-mode-map) | |
2414 "?" mh-prefix-help | |
2415 "A" mh-ps-print-toggle-mime | |
2416 "C" mh-ps-print-toggle-color | |
2417 "F" mh-ps-print-toggle-faces | |
2418 "M" mh-ps-print-toggle-mime | |
2419 "f" mh-ps-print-msg-file | |
2420 "l" mh-print-msg | |
2421 "p" mh-ps-print-msg | |
2422 "s" mh-ps-print-msg-show) | |
2423 | |
2405 (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map) | 2424 (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map) |
2406 "'" mh-narrow-to-tick | 2425 "'" mh-narrow-to-tick |
2407 "?" mh-prefix-help | 2426 "?" mh-prefix-help |
2408 "d" mh-delete-msg-from-seq | 2427 "d" mh-delete-msg-from-seq |
2409 "k" mh-delete-seq | 2428 "k" mh-delete-seq |
2444 "b" mh-burst-digest) | 2463 "b" mh-burst-digest) |
2445 | 2464 |
2446 (gnus-define-keys (mh-mime-map "K" mh-folder-mode-map) | 2465 (gnus-define-keys (mh-mime-map "K" mh-folder-mode-map) |
2447 "?" mh-prefix-help | 2466 "?" mh-prefix-help |
2448 "a" mh-mime-save-parts | 2467 "a" mh-mime-save-parts |
2468 "e" mh-display-with-external-viewer | |
2449 "i" mh-folder-inline-mime-part | 2469 "i" mh-folder-inline-mime-part |
2450 "o" mh-folder-save-mime-part | 2470 "o" mh-folder-save-mime-part |
2471 "t" mh-toggle-mime-buttons | |
2451 "v" mh-folder-toggle-mime-part | 2472 "v" mh-folder-toggle-mime-part |
2452 "\t" mh-next-button | 2473 "\t" mh-next-button |
2453 [backtab] mh-prev-button | 2474 [backtab] mh-prev-button |
2454 "\M-\t" mh-prev-button) | 2475 "\M-\t" mh-prev-button) |
2455 | 2476 |
2475 ;;; prefix is for. For example, if the word "folder" were not present in the | 2496 ;;; prefix is for. For example, if the word "folder" were not present in the |
2476 ;;; `F' entry, it would not be clear what these commands operated upon. | 2497 ;;; `F' entry, it would not be clear what these commands operated upon. |
2477 (defvar mh-help-messages | 2498 (defvar mh-help-messages |
2478 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n" | 2499 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n" |
2479 "[d]elete, [o]refile, e[x]ecute,\n" | 2500 "[d]elete, [o]refile, e[x]ecute,\n" |
2480 "[s]end, [r]eply.\n" | 2501 "[s]end, [r]eply,\n" |
2502 "[;]toggle MIME decoding.\n" | |
2481 "Prefix characters:\n [F]older, [S]equence, [J]unk, MIME [K]eys," | 2503 "Prefix characters:\n [F]older, [S]equence, [J]unk, MIME [K]eys," |
2482 "\n [T]hread, [/]limit, e[X]tract, [D]igest, [I]nc spools.") | 2504 "\n [T]hread, [/]limit, e[X]tract, [D]igest, [I]nc spools.") |
2483 | 2505 |
2484 (?F "[l]ist; [v]isit folder;\n" | 2506 (?F "[l]ist; [v]isit folder;\n" |
2485 "[n]ew messages; [']ticked messages; [s]earch; [i]ndexed search;\n" | 2507 "[n]ew messages; [']ticked messages; [s]earch; [i]ndexed search;\n" |
2486 "[p]ack; [S]ort; [r]escan; [k]ill") | 2508 "[p]ack; [S]ort; [r]escan; [k]ill") |
2509 (?P "PS [p]rint message; [l]non-PS print;\n" | |
2510 "PS Print [s]how window, message to [f]ile;\n" | |
2511 "Toggle printing of [M]IME parts, [C]olor, [F]aces") | |
2487 (?S "[p]ut message in sequence, [n]arrow, [']narrow to ticked, [w]iden,\n" | 2512 (?S "[p]ut message in sequence, [n]arrow, [']narrow to ticked, [w]iden,\n" |
2488 "[s]equences, [l]ist,\n" | 2513 "[s]equences, [l]ist,\n" |
2489 "[d]elete message from sequence, [k]ill sequence") | 2514 "[d]elete message from sequence, [k]ill sequence") |
2490 (?T "[t]oggle, [d]elete, [o]refile thread") | 2515 (?T "[t]oggle, [d]elete, [o]refile thread") |
2491 (?/ "Limit to [c]c, [f]rom, [r]ange, [s]ubject, [t]o; [w]iden") | 2516 (?/ "Limit to [c]c, [f]rom, [r]ange, [s]ubject, [t]o; [w]iden") |