Mercurial > emacs
annotate lisp/mh-e/mh-utils.el @ 68101:78318387b7b6
Use `require' rather than autoload for XEmacs's overlays.
(flymake-get-common-file-prefix, flymake-build-relative-filename):
Delete. Use file-relative-name instead.
(flymake-get-syntax-check-program-args, flymake-perl-init):
Simplify the resulting code.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 09 Jan 2006 19:11:28 +0000 |
parents | 57c4e7929f99 |
children | 5772368fe15e |
rev | line source |
---|---|
67247
b0b7c2e3fc84
Remove errant backslash at beginning of file.
Bill Wohler <wohler@newt.com>
parents:
67246
diff
changeset
|
1 ;;; mh-utils.el --- MH-E code needed for both sending and reading |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2 |
62847
aa8c2e12ee24
Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents:
62767
diff
changeset
|
3 ;; Copyright (C) 1993, 1995, 1997, |
67988
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
4 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
5 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
6 ;; Author: Bill Wohler <wohler@newt.com> |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
7 ;; Maintainer: Bill Wohler <wohler@newt.com> |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
8 ;; Keywords: mail |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
9 ;; See: mh-e.el |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
10 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
11 ;; This file is part of GNU Emacs. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
12 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
14 ;; it under the terms of the GNU General Public License as published by |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
15 ;; the Free Software Foundation; either version 2, or (at your option) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
16 ;; any later version. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
17 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
18 ;; GNU Emacs is distributed in the hope that it will be useful, |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
21 ;; GNU General Public License for more details. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
22 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
23 ;; You should have received a copy of the GNU General Public License |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
26 ;; Boston, MA 02110-1301, USA. | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
27 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
28 ;;; Commentary: |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
29 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
30 ;; Internal support for MH-E package. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
31 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
32 ;;; Change Log: |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
33 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
34 ;;; Code: |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
35 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
36 (eval-and-compile |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
37 (defvar recursive-load-depth-limit) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
38 (if (and (boundp 'recursive-load-depth-limit) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
39 (integerp recursive-load-depth-limit) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
40 (< recursive-load-depth-limit 50)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
41 (setq recursive-load-depth-limit 50))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
42 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
43 (eval-when-compile (require 'mh-acros)) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
44 (mh-require-cl) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
45 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
46 (require 'font-lock) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
47 (require 'gnus-util) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
48 (require 'mh-customize) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
49 (require 'mh-inc) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
50 (require 'mouse) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
51 (require 'sendmail) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
52 |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
53 ;; Non-fatal dependencies |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
54 (load "hl-line" t t) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
55 (load "mm-decode" t t) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
56 (load "mm-view" t t) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
57 (load "tool-bar" t t) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
58 (load "vcard" t t) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
59 |
67681 | 60 |
61 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
62 ;;; Autoloads |
67681 | 63 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
64 (autoload 'gnus-article-highlight-citation "gnus-cite") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
65 (autoload 'message-fetch-field "message") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
66 (autoload 'message-tokenize-header "message") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
67 (unless (fboundp 'make-hash-table) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
68 (autoload 'make-hash-table "cl")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
69 |
67681 | 70 |
71 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
72 ;;; CL Replacements |
67681 | 73 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
74 (defun mh-search-from-end (char string) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
75 "Return the position of last occurrence of CHAR in STRING. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
76 If CHAR is not present in STRING then return nil. The function is |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
77 used in lieu of `search' in the CL package." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
78 (loop for index from (1- (length string)) downto 0 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
79 when (equal (aref string index) char) return index |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
80 finally return nil)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
81 |
67681 | 82 ;; Additional header fields that might someday be added: |
83 ;; "Sender: " "Reply-to: " | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
84 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
85 |
67681 | 86 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
87 ;;; Scan Line Formats |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
88 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
89 (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
90 "This regular expression extracts the message number. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
91 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
92 It must match from the beginning of the line. Note that the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
93 message number must be placed in a parenthesized expression as in |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
94 the default of \"^ *\\\\([0-9]+\\\\)\".") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
95 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
96 (defvar mh-scan-msg-overflow-regexp "^[?0-9][0-9]" |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
97 "This regular expression matches overflowed message numbers.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
98 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
99 (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
100 "This regular expression finds the message number width in a scan format. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
101 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
102 Note that the message number must be placed in a parenthesized |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
103 expression as in the default of \"%\\\\([0-9]*\\\\)(msg)\". This |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
104 variable is only consulted if `mh-scan-format-file' is set to |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
105 \"Use MH-E scan Format\".") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
106 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
107 (defvar mh-scan-msg-format-string "%d" |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
108 "This is a format string for width of the message number in a scan format. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
109 |
67760
9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
Bill Wohler <wohler@newt.com>
parents:
67758
diff
changeset
|
110 Use \"0%d\" for zero-filled message numbers. This variable is only |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
111 consulted if `mh-scan-format-file' is set to \"Use MH-E scan |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
112 Format\".") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
113 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
114 (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
115 "This regular expression matches a particular message. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
116 |
67760
9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
Bill Wohler <wohler@newt.com>
parents:
67758
diff
changeset
|
117 It is a format string; use \"%d\" to represent the location of the |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
118 message number within the expression as in the default of |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
119 \"^[^0-9]*%d[^0-9]\".") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
120 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
121 (defvar mh-cmd-note 4 |
66518
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
122 "Column for notations. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
123 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
124 This variable should be set with the function `mh-set-cmd-note'. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
125 This variable may be updated dynamically if |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
126 `mh-adaptive-cmd-note-flag' is on. |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
127 |
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
128 Note that columns in Emacs start with 0.") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
129 (make-variable-buffer-local 'mh-cmd-note) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
130 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
131 (defvar mh-note-seq ?% |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
132 "Messages in a user-defined sequence are marked by this character. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
133 |
67760
9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
Bill Wohler <wohler@newt.com>
parents:
67758
diff
changeset
|
134 Messages in the \"search\" sequence are marked by this character as |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
135 well.") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
136 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
137 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
138 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
139 (defvar mh-show-buffer-mode-line-buffer-id " {show-%s} %d" |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
140 "Format string to produce `mode-line-buffer-identification' for show buffers. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
141 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
142 First argument is folder name. Second is message number.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
143 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
144 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
145 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
146 (defvar mh-mail-header-separator "--------" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
147 "*Line used by MH to separate headers from text in messages being composed. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
148 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
149 This variable should not be used directly in programs. Programs |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
150 should use `mail-header-separator' instead. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
151 `mail-header-separator' is initialized to |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
152 `mh-mail-header-separator' in `mh-letter-mode'; in other |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
153 contexts, you may have to perform this initialization yourself. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
154 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
155 Do not make this a regular expression as it may be the argument |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
156 to `insert' and it is passed through `regexp-quote' before being |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
157 used by functions like `re-search-forward'.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
158 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
159 (defvar mh-signature-separator-regexp "^-- $" |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
160 "This regular expression matches the signature separator. |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
161 See `mh-signature-separator'.") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
162 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
163 (defvar mh-signature-separator "-- \n" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
164 "Text of a signature separator. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
165 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
166 A signature separator is used to separate the body of a message |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
167 from the signature. This can be used by user agents such as MH-E |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
168 to render the signature differently or to suppress the inclusion |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
169 of the signature in a reply. Use `mh-signature-separator-regexp' |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
170 when searching for a separator.") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
171 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
172 (defun mh-signature-separator-p () |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
173 "Return non-nil if buffer includes \"^-- $\"." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
174 (save-excursion |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
175 (goto-char (point-min)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
176 (re-search-forward mh-signature-separator-regexp nil t))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
177 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
178 ;; Variables for MIME display |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
179 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
180 ;; Structure to keep track of MIME handles on a per buffer basis. |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
181 (mh-defstruct (mh-buffer-data (:conc-name mh-mime-) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
182 (:constructor mh-make-buffer-data)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
183 (handles ()) ; List of MIME handles |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
184 (handles-cache (make-hash-table)) ; Cache to avoid multiple decodes of |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
185 ; nested messages |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
186 (parts-count 0) ; The button number is generated from |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
187 ; this number |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
188 (part-index-hash (make-hash-table))) ; Avoid incrementing the part number |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
189 ; for nested messages |
67681 | 190 |
191 ;; This has to be a macro, since we do: (setf (mh-buffer-data) ...) | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
192 (defmacro mh-buffer-data () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
193 "Convenience macro to get the MIME data structures of the current buffer." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
194 `(gethash (current-buffer) mh-globals-hash)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
195 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
196 (defvar mh-globals-hash (make-hash-table) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
197 "Keeps track of MIME data on a per buffer basis.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
198 |
66354
cf99ce27df54
* mh-comp.el (mh-letter-menu): Rename
Bill Wohler <wohler@newt.com>
parents:
66128
diff
changeset
|
199 (defvar mh-pgp-support-flag (not (not (locate-library "mml2015"))) |
cf99ce27df54
* mh-comp.el (mh-letter-menu): Rename
Bill Wohler <wohler@newt.com>
parents:
66128
diff
changeset
|
200 "Non-nil means PGP support is available.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
201 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
202 (defvar mh-mm-inline-media-tests |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
203 `(("image/jpeg" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
204 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
205 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
206 (mm-valid-and-fit-image-p 'jpeg handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
207 ("image/png" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
208 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
209 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
210 (mm-valid-and-fit-image-p 'png handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
211 ("image/gif" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
212 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
213 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
214 (mm-valid-and-fit-image-p 'gif handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
215 ("image/tiff" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
216 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
217 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
218 (mm-valid-and-fit-image-p 'tiff handle)) ) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
219 ("image/xbm" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
220 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
221 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
222 (mm-valid-and-fit-image-p 'xbm handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
223 ("image/x-xbitmap" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
224 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
225 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
226 (mm-valid-and-fit-image-p 'xbm handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
227 ("image/xpm" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
228 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
229 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
230 (mm-valid-and-fit-image-p 'xpm handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
231 ("image/x-pixmap" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
232 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
233 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
234 (mm-valid-and-fit-image-p 'xpm handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
235 ("image/bmp" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
236 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
237 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
238 (mm-valid-and-fit-image-p 'bmp handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
239 ("image/x-portable-bitmap" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
240 mm-inline-image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
241 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
242 (mm-valid-and-fit-image-p 'pbm handle))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
243 ("text/plain" mm-inline-text identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
244 ("text/enriched" mm-inline-text identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
245 ("text/richtext" mm-inline-text identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
246 ("text/x-patch" mm-display-patch-inline |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
247 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
248 (locate-library "diff-mode"))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
249 ("application/emacs-lisp" mm-display-elisp-inline identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
250 ("application/x-emacs-lisp" mm-display-elisp-inline identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
251 ("text/html" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
252 ,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
253 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
254 (or (and (boundp 'mm-inline-text-html-renderer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
255 mm-inline-text-html-renderer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
256 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
257 ("text/x-vcard" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
258 mm-inline-text-vcard |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
259 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
260 (or (featurep 'vcard) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
261 (locate-library "vcard")))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
262 ("message/delivery-status" mm-inline-text identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
263 ("message/rfc822" mh-mm-inline-message identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
264 ;;("message/partial" mm-inline-partial identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
265 ;;("message/external-body" mm-inline-external-body identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
266 ("text/.*" mm-inline-text identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
267 ("audio/wav" mm-inline-audio |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
268 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
269 (and (or (featurep 'nas-sound) (featurep 'native-sound)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
270 (device-sound-enabled-p)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
271 ("audio/au" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
272 mm-inline-audio |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
273 (lambda (handle) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
274 (and (or (featurep 'nas-sound) (featurep 'native-sound)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
275 (device-sound-enabled-p)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
276 ("application/pgp-signature" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
277 ("application/x-pkcs7-signature" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
278 ("application/pkcs7-signature" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
279 ("application/x-pkcs7-mime" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
280 ("application/pkcs7-mime" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
281 ("multipart/alternative" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
282 ("multipart/mixed" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
283 ("multipart/related" ignore identity) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
284 ;; Disable audio and image |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
285 ("audio/.*" ignore ignore) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
286 ("image/.*" ignore ignore) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
287 ;; Default to displaying as text |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
288 (".*" mm-inline-text mm-readable-p)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
289 "Alist of media types/tests saying whether types can be displayed inline.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
290 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
291 ;; Copy of `goto-address-mail-regexp' |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
292 (defvar mh-address-mail-regexp |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
293 "[-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
294 "A regular expression probably matching an e-mail address.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
295 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
296 ;; From goto-addr.el, which we don't want to force-load on users. |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
297 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
298 (defun mh-goto-address-find-address-at-point () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
299 "Find e-mail address around or before point. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
300 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
301 Then search backwards to beginning of line for the start of an |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
302 e-mail address. If no e-mail address found, return nil." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
303 (re-search-backward "[^-_A-z0-9.@]" (line-beginning-position) 'lim) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
304 (if (or (looking-at mh-address-mail-regexp) ; already at start |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
305 (and (re-search-forward mh-address-mail-regexp |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
306 (line-end-position) 'lim) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
307 (goto-char (match-beginning 0)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
308 (match-string-no-properties 0))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
309 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
310 (defun mh-mail-header-end () |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
311 "Substitute for `mail-header-end' that doesn't widen the buffer. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
312 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
313 In MH-E we frequently need to find the end of headers in nested |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
314 messages, where the buffer has been narrowed. This function works |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
315 in this situation." |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
316 (save-excursion |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
317 ;; XXX: The following replaces a call to rfc822-goto-eoh. Occasionally, |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
318 ;; mail headers that MH-E has to read contains lines of the form: |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
319 ;; From xxx@yyy Mon May 10 11:48:07 2004 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
320 ;; In this situation, rfc822-goto-eoh doesn't go to the end of the |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
321 ;; header. The replacement allows From_ lines in the mail header. |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
322 (goto-char (point-min)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
323 (loop for p = (re-search-forward |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
324 "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
325 do (cond ((null p) (return)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
326 (t (goto-char (match-beginning 0)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
327 (unless (looking-at "From ") (return)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
328 (goto-char p)))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
329 (point))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
330 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
331 (defun mh-in-header-p () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
332 "Return non-nil if the point is in the header of a draft message." |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
333 (< (point) (mh-mail-header-end))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
334 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
335 (defun mh-header-field-beginning () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
336 "Move to the beginning of the current header field. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
337 Handles RFC 822 continuation lines." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
338 (beginning-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
339 (while (looking-at "^[ \t]") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
340 (forward-line -1))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
341 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
342 (defun mh-header-field-end () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
343 "Move to the end of the current header field. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
344 Handles RFC 822 continuation lines." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
345 (forward-line 1) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
346 (while (looking-at "^[ \t]") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
347 (forward-line 1)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
348 (backward-char 1)) ;to end of previous line |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
349 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
350 (defun mh-letter-header-font-lock (limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
351 "Return the entire mail header to font-lock. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
352 Argument LIMIT limits search." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
353 (if (= (point) limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
354 nil |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
355 (let* ((mail-header-end (save-match-data (mh-mail-header-end))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
356 (lesser-limit (if (< mail-header-end limit) mail-header-end limit))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
357 (when (mh-in-header-p) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
358 (set-match-data (list 1 lesser-limit)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
359 (goto-char lesser-limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
360 t)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
361 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
362 (defun mh-header-field-font-lock (field limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
363 "Return the value of a header field FIELD to font-lock. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
364 Argument LIMIT limits search." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
365 (if (= (point) limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
366 nil |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
367 (let* ((mail-header-end (mh-mail-header-end)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
368 (lesser-limit (if (< mail-header-end limit) mail-header-end limit)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
369 (case-fold-search t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
370 (when (and (< (point) mail-header-end) ;Only within header |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
371 (re-search-forward (format "^%s" field) lesser-limit t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
372 (let ((match-one-b (match-beginning 0)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
373 (match-one-e (match-end 0))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
374 (mh-header-field-end) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
375 (if (> (point) limit) ;Don't search for end beyond limit |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
376 (goto-char limit)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
377 (set-match-data (list match-one-b match-one-e |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
378 (1+ match-one-e) (point))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
379 t))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
380 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
381 (defun mh-header-to-font-lock (limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
382 "Return the value of a header field To to font-lock. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
383 Argument LIMIT limits search." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
384 (mh-header-field-font-lock "To:" limit)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
385 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
386 (defun mh-header-cc-font-lock (limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
387 "Return the value of a header field cc to font-lock. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
388 Argument LIMIT limits search." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
389 (mh-header-field-font-lock "cc:" limit)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
390 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
391 (defun mh-header-subject-font-lock (limit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
392 "Return the value of a header field Subject to font-lock. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
393 Argument LIMIT limits search." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
394 (mh-header-field-font-lock "Subject:" limit)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
395 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
396 (eval-and-compile |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
397 ;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite' |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
398 (defvar mh-show-font-lock-keywords |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
399 '(("^\\(From:\\|Sender:\\)\\(.*\\)" |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
400 (1 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
401 (2 'mh-show-from)) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
402 (mh-header-to-font-lock |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
403 (0 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
404 (1 'mh-show-to)) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
405 (mh-header-cc-font-lock |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
406 (0 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
407 (1 'mh-show-cc)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
408 ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
409 (1 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
410 (2 'mh-show-from)) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
411 (mh-header-subject-font-lock |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
412 (0 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
413 (1 'mh-show-subject)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
414 ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
415 (1 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
416 (2 'mh-show-cc)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
417 ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
418 (1 'default) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
419 (2 'mh-show-date)) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
420 (mh-letter-header-font-lock |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
421 (0 'mh-show-header append t))) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
422 "Additional expressions to highlight in MH-Show buffers.")) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
423 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
424 (defvar mh-show-font-lock-keywords-with-cite |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
425 (eval-when-compile |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
426 (let* ((cite-chars "[>|}]") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
427 (cite-prefix "A-Za-z") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
428 (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
429 (append |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
430 mh-show-font-lock-keywords |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
431 (list |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
432 ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
433 `(,cite-chars |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
434 (,(concat "\\=[ \t]*" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
435 "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
436 "\\(" cite-chars "[ \t]*\\)\\)+" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
437 "\\(.*\\)") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
438 (beginning-of-line) (end-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
439 (2 font-lock-constant-face nil t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
440 (4 font-lock-comment-face nil t))))))) |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
441 "Additional expressions to highlight in MH-Show buffers.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
442 |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
443 (defvar mh-letter-font-lock-keywords |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
444 `(,@mh-show-font-lock-keywords-with-cite |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
445 (mh-font-lock-field-data |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
446 (1 'mh-letter-header-field prepend t))) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
447 "Additional expressions to highlight in MH-Letter buffers.") |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
448 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
449 (defun mh-show-font-lock-fontify-region (beg end loudly) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
450 "Limit font-lock in `mh-show-mode' to the header. |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
451 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
452 Used when the option `mh-highlight-citation-style' is set to |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
453 \"Gnus\", leaving the body to be dealt with by Gnus highlighting. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
454 The region between BEG and END is given over to be fontified and |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
455 LOUDLY controls if a user sees a message about the fontification |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
456 operation." |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
457 (let ((header-end (mh-mail-header-end))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
458 (cond |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
459 ((and (< beg header-end)(< end header-end)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
460 (font-lock-default-fontify-region beg end loudly)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
461 ((and (< beg header-end)(>= end header-end)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
462 (font-lock-default-fontify-region beg header-end loudly)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
463 (t |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
464 nil)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
465 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
466 ;; Needed to help shush the byte-compiler. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
467 (if mh-xemacs-flag |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
468 (eval-and-compile |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
469 (require 'gnus) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
470 (require 'gnus-art) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
471 (require 'gnus-cite))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
472 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
473 (defun mh-gnus-article-highlight-citation () |
66354
cf99ce27df54
* mh-comp.el (mh-letter-menu): Rename
Bill Wohler <wohler@newt.com>
parents:
66128
diff
changeset
|
474 "Highlight cited text in current buffer using Gnus." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
475 (interactive) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
476 ;; Requiring gnus-cite should have been sufficient. However for Emacs21.1, |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
477 ;; recursive-load-depth-limit is only 10, so an error occurs. Also it may be |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
478 ;; better to have an autoload at top-level (though that won't work because |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
479 ;; of recursive-load-depth-limit). That gets rid of a compiler warning as |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
480 ;; well. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
481 (unless mh-xemacs-flag |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
482 (require 'gnus-art) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
483 (require 'gnus-cite)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
484 ;; Don't allow Gnus to create buttons while highlighting, maybe this is bad |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
485 ;; style? |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
486 (flet ((gnus-article-add-button (&rest args) nil)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
487 (let* ((modified (buffer-modified-p)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
488 (gnus-article-buffer (buffer-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
489 (gnus-cite-face-list `(,@(cdr gnus-cite-face-list) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
490 ,(car gnus-cite-face-list)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
491 (gnus-article-highlight-citation t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
492 (set-buffer-modified-p modified)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
493 |
67681 | 494 |
495 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
496 ;;; Internal bookkeeping variables: |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
497 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
498 (defvar mh-user-path nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
499 "Cached value of the \"Path:\" MH profile component. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
500 User's mail folder directory.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
501 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
502 (defvar mh-draft-folder nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
503 "Cached value of the \"Draft-Folder:\" MH profile component. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
504 Name of folder containing draft messages. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
505 Nil means do not use a draft folder.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
506 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
507 (defvar mh-unseen-seq nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
508 "Cached value of the \"Unseen-Sequence:\" MH profile component. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
509 Name of the Unseen sequence.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
510 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
511 (defvar mh-previous-seq nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
512 "Cached value of the \"Previous-Sequence:\" MH profile component. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
513 Name of the Previous sequence.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
514 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
515 (defvar mh-inbox nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
516 "Cached value of the \"Inbox:\" MH profile component. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
517 Set to \"+inbox\" if no such component. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
518 Name of the Inbox folder.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
519 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
520 ;; The names of ephemeral buffers have a " *mh-" prefix (so that they are |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
521 ;; hidden and can be programmatically removed in mh-quit), and the variable |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
522 ;; names have the form mh-temp-.*-buffer. |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
523 (defconst mh-temp-buffer " *mh-temp*") ;scratch |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
524 (defconst mh-temp-fetch-buffer " *mh-fetch*") ;wget/curl/fetch output |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
525 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
526 ;; The names of MH-E buffers that are not ephemeral and can be used by the |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
527 ;; user (and deleted by the user when no longer needed) have a "*MH-E " prefix |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
528 ;; (so they can be programmatically removed in mh-quit), and the variable |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
529 ;; names have the form mh-.*-buffer. |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
530 (defconst mh-aliases-buffer "*MH-E Aliases*") ;alias lookups |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
531 (defconst mh-folders-buffer "*MH-E Folders*") ;folder list |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
532 (defconst mh-help-buffer "*MH-E Help*") ;quick help |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
533 (defconst mh-info-buffer "*MH-E Info*") ;version information buffer |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
534 (defconst mh-log-buffer "*MH-E Log*") ;output of MH commands and so on |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
535 (defconst mh-mail-delivery-buffer "*MH-E Mail Delivery*") ;mail delivery log |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
536 (defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
537 (defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
538 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
539 (defvar mh-log-buffer-lines 100 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
540 "Number of lines to keep in `mh-log-buffer'.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
541 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
542 (defvar mh-previous-window-config nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
543 "Window configuration before MH-E command.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
544 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
545 (defvar mh-page-to-next-msg-flag nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
546 "Non-nil means next SPC or whatever goes to next undeleted message.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
547 |
67681 | 548 |
549 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
550 ;;; Internal variables local to a folder. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
551 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
552 (defvar mh-current-folder nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
553 "Name of current folder, a string.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
554 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
555 (defvar mh-show-buffer nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
556 "Buffer that displays message for this folder.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
557 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
558 (defvar mh-folder-filename nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
559 "Full path of directory for this folder.") |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49578
diff
changeset
|
560 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
561 (defvar mh-msg-count nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
562 "Number of msgs in buffer.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
563 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
564 (defvar mh-showing-mode nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
565 "If non-nil, show the message in a separate window.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
566 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
567 (defvar mh-show-mode-map (make-sparse-keymap) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
568 "Keymap used by the show buffer.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
569 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
570 (defvar mh-show-folder-buffer nil |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
571 "Keeps track of folder whose message is being displayed.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
572 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
573 (defvar mh-logo-cache nil) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
574 |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
575 (defun mh-logo-display () |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
576 "Modify mode line to display MH-E logo." |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
577 (mh-do-in-gnu-emacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
578 (add-text-properties |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
579 0 2 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
580 `(display ,(or mh-logo-cache |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
581 (setq mh-logo-cache |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
582 (mh-funcall-if-exists |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
583 find-image '((:type xpm :ascent center |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
584 :file "mh-logo.xpm")))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
585 (car mode-line-buffer-identification))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
586 (mh-do-in-xemacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
587 (setq modeline-buffer-identification |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
588 (list |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
589 (if mh-modeline-glyph |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
590 (cons modeline-buffer-id-left-extent mh-modeline-glyph) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
591 (cons modeline-buffer-id-left-extent "XEmacs%N:")) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
592 (cons modeline-buffer-id-right-extent " %17b"))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
593 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
594 (defun mh-showing-mode (&optional arg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
595 "Change whether messages should be displayed. |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
596 |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
597 With ARG, display messages iff ARG is positive." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
598 (setq mh-showing-mode |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
599 (if (null arg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
600 (not mh-showing-mode) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
601 (> (prefix-numeric-value arg) 0)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
602 |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
603 (defvar mh-seq-list nil |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
604 "Alist of this folder's sequences. |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
605 Elements have the form (SEQUENCE . MESSAGES).") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
606 |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
607 (defvar mh-seen-list nil |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
608 "List of displayed messages to be removed from the \"Unseen\" sequence.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
609 |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
610 (defvar mh-showing-with-headers nil |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
611 "If non-nil, MH-Show buffer contains message with all header fields. |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
612 If nil, MH-Show buffer contains message processed normally.") |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
613 |
67681 | 614 |
615 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
616 ;;; MH-E macros |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
617 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
618 (defmacro with-mh-folder-updating (save-modification-flag &rest body) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
619 "Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG) &body BODY). |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
620 Execute BODY, which can modify the folder buffer without having to |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
621 worry about file locking or the read-only flag, and return its result. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
622 If SAVE-MODIFICATION-FLAG is non-nil, the buffer's modification flag |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
623 is unchanged, otherwise it is cleared." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
624 (setq save-modification-flag (car save-modification-flag)) ; CL style |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
625 `(prog1 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
626 (let ((mh-folder-updating-mod-flag (buffer-modified-p)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
627 (buffer-read-only nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
628 (buffer-file-name nil)) ;don't let the buffer get locked |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
629 (prog1 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
630 (progn |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
631 ,@body) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
632 (mh-set-folder-modified-p mh-folder-updating-mod-flag))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
633 ,@(if (not save-modification-flag) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
634 '((mh-set-folder-modified-p nil))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
635 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
636 (put 'with-mh-folder-updating 'lisp-indent-hook 'defun) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
637 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
638 (defmacro mh-in-show-buffer (show-buffer &rest body) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
639 "Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY). |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
640 Display buffer SHOW-BUFFER in other window and execute BODY in it. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
641 Stronger than `save-excursion', weaker than `save-window-excursion'." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
642 (setq show-buffer (car show-buffer)) ; CL style |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
643 `(let ((mh-in-show-buffer-saved-window (selected-window))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
644 (switch-to-buffer-other-window ,show-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
645 (if mh-bury-show-buffer-flag (bury-buffer (current-buffer))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
646 (unwind-protect |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
647 (progn |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
648 ,@body) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
649 (select-window mh-in-show-buffer-saved-window)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
650 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
651 (put 'mh-in-show-buffer 'lisp-indent-hook 'defun) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
652 |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
653 (defmacro mh-do-at-event-location (event &rest body) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
654 "Switch to the location of EVENT and execute BODY. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
655 After BODY has been executed return to original window. The |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
656 modification flag of the buffer in the event window is |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
657 preserved." |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
658 (let ((event-window (make-symbol "event-window")) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
659 (event-position (make-symbol "event-position")) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
660 (original-window (make-symbol "original-window")) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
661 (original-position (make-symbol "original-position")) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
662 (modified-flag (make-symbol "modified-flag"))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
663 `(save-excursion |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
664 (let* ((,event-window |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
665 (or (mh-funcall-if-exists posn-window (event-start ,event)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
666 (mh-funcall-if-exists event-window ,event))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
667 (,event-position |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
668 (or (mh-funcall-if-exists posn-point (event-start ,event)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
669 (mh-funcall-if-exists event-closest-point ,event))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
670 (,original-window (selected-window)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
671 (,original-position (progn |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
672 (set-buffer (window-buffer ,event-window)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
673 (set-marker (make-marker) (point)))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
674 (,modified-flag (buffer-modified-p)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
675 (buffer-read-only nil)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
676 (unwind-protect (progn |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
677 (select-window ,event-window) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
678 (goto-char ,event-position) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
679 ,@body) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
680 (set-buffer-modified-p ,modified-flag) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
681 (goto-char ,original-position) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
682 (set-marker ,original-position nil) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
683 (select-window ,original-window)))))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
684 |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
685 (put 'mh-do-at-event-location 'lisp-indent-hook 'defun) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
686 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
687 (defmacro mh-make-seq (name msgs) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
688 "Create sequence NAME with the given MSGS." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
689 (list 'cons name msgs)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
690 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
691 (defmacro mh-seq-name (sequence) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
692 "Extract sequence name from the given SEQUENCE." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
693 (list 'car sequence)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
694 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
695 (defmacro mh-seq-msgs (sequence) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
696 "Extract messages from the given SEQUENCE." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
697 (list 'cdr sequence)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
698 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
699 (defun mh-recenter (arg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
700 "Like recenter but with three improvements: |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
701 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
702 - At the end of the buffer it tries to show fewer empty lines. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
703 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
704 - operates only if the current buffer is in the selected window. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
705 (Commands like `save-some-buffers' can make this false.) |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
706 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
707 - nil ARG means recenter as if prefix argument had been given." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
708 (cond ((not (eq (get-buffer-window (current-buffer)) (selected-window))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
709 nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
710 ((= (point-max) (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
711 (forward-line (- (/ (window-height) 2) 2)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
712 (point))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
713 (let ((lines-from-end 2)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
714 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
715 (while (> (point-max) (progn (forward-line) (point))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
716 (incf lines-from-end))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
717 (recenter (- lines-from-end)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
718 ;; '(4) is the same as C-u prefix argument. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
719 (t (recenter (or arg '(4)))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
720 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
721 (defun mh-start-of-uncleaned-message () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
722 "Position uninteresting headers off the top of the window." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
723 (let ((case-fold-search t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
724 (re-search-forward |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
725 "^To:\\|^Cc:\\|^From:\\|^Subject:\\|^Date:" nil t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
726 (beginning-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
727 (mh-recenter 0))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
728 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
729 (defun mh-invalidate-show-buffer () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
730 "Invalidate the show buffer so we must update it to use it." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
731 (if (get-buffer mh-show-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
732 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
733 (set-buffer mh-show-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
734 (mh-unvisit-file)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
735 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
736 (defun mh-unvisit-file () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
737 "Separate current buffer from the message file it was visiting." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
738 (or (not (buffer-modified-p)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
739 (null buffer-file-name) ;we've been here before |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
740 (yes-or-no-p (format "Message %s modified; flush changes? " |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
741 (file-name-nondirectory buffer-file-name))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
742 (error "Flushing changes not confirmed")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
743 (clear-visited-file-modtime) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
744 (unlock-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
745 (setq buffer-file-name nil)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49578
diff
changeset
|
746 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
747 (defun mh-get-msg-num (error-if-no-message) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
748 "Return the message number of the displayed message. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
749 If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
750 the cursor is not pointing to a message." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
751 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
752 (beginning-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
753 (cond ((looking-at mh-scan-msg-number-regexp) |
62847
aa8c2e12ee24
Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents:
62767
diff
changeset
|
754 (string-to-number (buffer-substring (match-beginning 1) |
aa8c2e12ee24
Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents:
62767
diff
changeset
|
755 (match-end 1)))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
756 (error-if-no-message |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
757 (error "Cursor not pointing to message")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
758 (t nil)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
759 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
760 (defun mh-folder-name-p (name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
761 "Return non-nil if NAME is the name of a folder. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
762 A name (a string or symbol) can be a folder name if it begins |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
763 with \"+\"." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
764 (if (symbolp name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
765 (eq (aref (symbol-name name) 0) ?+) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
766 (and (> (length name) 0) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
767 (eq (aref name 0) ?+)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
768 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
769 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
770 (defun mh-expand-file-name (filename &optional default) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
771 "Expand FILENAME like `expand-file-name', but also handle MH folder names. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
772 Any filename that starts with '+' is treated as a folder name. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
773 See `expand-file-name' for description of DEFAULT." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
774 (if (mh-folder-name-p filename) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
775 (expand-file-name (substring filename 1) mh-user-path) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
776 (expand-file-name filename default))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
777 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
778 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
779 (defun mh-msg-filename (msg &optional folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
780 "Return the file name of MSG in FOLDER (default current folder)." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
781 (expand-file-name (int-to-string msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
782 (if folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
783 (mh-expand-file-name folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
784 mh-folder-filename))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
785 |
67681 | 786 ;; Infrastructure to generate show-buffer functions from folder functions |
787 ;; XEmacs does not have deactivate-mark? What is the equivalent of | |
788 ;; transient-mark-mode for XEmacs? Should we be restoring the mark in the | |
789 ;; folder buffer after the operation has been carried out. | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
790 (defmacro mh-defun-show-buffer (function original-function |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
791 &optional dont-return) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
792 "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
793 If the buffer we start in is still visible and DONT-RETURN is nil |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
794 then switch to it after that." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
795 `(defun ,function () |
67760
9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
Bill Wohler <wohler@newt.com>
parents:
67758
diff
changeset
|
796 ,(format "Calls %s from the message's folder.\n%s\nSee \"%s\" for more info.\n" |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
797 original-function |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
798 (if dont-return "" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
799 "When function completes, returns to the show buffer if it is |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
800 still visible.\n") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
801 original-function) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
802 (interactive) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
803 (when (buffer-live-p (get-buffer mh-show-folder-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
804 (let ((config (current-window-configuration)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
805 (folder-buffer mh-show-folder-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
806 (normal-exit nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
807 ,@(if dont-return () '((cur-buffer-name (buffer-name))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
808 (pop-to-buffer mh-show-folder-buffer nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
809 (unless (equal (buffer-name |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
810 (window-buffer (frame-first-window (selected-frame)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
811 folder-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
812 (delete-other-windows)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
813 (mh-goto-cur-msg t) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
814 (mh-funcall-if-exists deactivate-mark) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
815 (unwind-protect |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
816 (prog1 (call-interactively (function ,original-function)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
817 (setq normal-exit t)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
818 (mh-funcall-if-exists deactivate-mark) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
819 (when (eq major-mode 'mh-folder-mode) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
820 (mh-funcall-if-exists hl-line-highlight)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
821 (cond ((not normal-exit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
822 (set-window-configuration config)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
823 ,(if dont-return |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
824 `(t (setq mh-previous-window-config config)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
825 `((and (get-buffer cur-buffer-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
826 (window-live-p (get-buffer-window |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
827 (get-buffer cur-buffer-name)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
828 (pop-to-buffer (get-buffer cur-buffer-name) nil))))))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
829 |
67681 | 830 ;; Generate interactive functions for the show buffer from the corresponding |
831 ;; folder functions. | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
832 (mh-defun-show-buffer mh-show-previous-undeleted-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
833 mh-previous-undeleted-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
834 (mh-defun-show-buffer mh-show-next-undeleted-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
835 mh-next-undeleted-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
836 (mh-defun-show-buffer mh-show-quit mh-quit) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
837 (mh-defun-show-buffer mh-show-delete-msg mh-delete-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
838 (mh-defun-show-buffer mh-show-refile-msg mh-refile-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
839 (mh-defun-show-buffer mh-show-undo mh-undo) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
840 (mh-defun-show-buffer mh-show-execute-commands mh-execute-commands) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
841 (mh-defun-show-buffer mh-show-reply mh-reply t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
842 (mh-defun-show-buffer mh-show-redistribute mh-redistribute) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
843 (mh-defun-show-buffer mh-show-forward mh-forward t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
844 (mh-defun-show-buffer mh-show-header-display mh-header-display) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
845 (mh-defun-show-buffer mh-show-refile-or-write-again |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
846 mh-refile-or-write-again) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
847 (mh-defun-show-buffer mh-show-show mh-show) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
848 (mh-defun-show-buffer mh-show-write-message-to-file |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
849 mh-write-msg-to-file) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
850 (mh-defun-show-buffer mh-show-extract-rejected-mail |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
851 mh-extract-rejected-mail t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
852 (mh-defun-show-buffer mh-show-delete-msg-no-motion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
853 mh-delete-msg-no-motion) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
854 (mh-defun-show-buffer mh-show-first-msg mh-first-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
855 (mh-defun-show-buffer mh-show-last-msg mh-last-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
856 (mh-defun-show-buffer mh-show-copy-msg mh-copy-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
857 (mh-defun-show-buffer mh-show-edit-again mh-edit-again t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
858 (mh-defun-show-buffer mh-show-goto-msg mh-goto-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
859 (mh-defun-show-buffer mh-show-inc-folder mh-inc-folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
860 (mh-defun-show-buffer mh-show-delete-subject-or-thread |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
861 mh-delete-subject-or-thread) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
862 (mh-defun-show-buffer mh-show-delete-subject mh-delete-subject) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
863 (mh-defun-show-buffer mh-show-print-msg mh-print-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
864 (mh-defun-show-buffer mh-show-send mh-send t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
865 (mh-defun-show-buffer mh-show-toggle-showing mh-toggle-showing t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
866 (mh-defun-show-buffer mh-show-pipe-msg mh-pipe-msg t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
867 (mh-defun-show-buffer mh-show-sort-folder mh-sort-folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
868 (mh-defun-show-buffer mh-show-visit-folder mh-visit-folder t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
869 (mh-defun-show-buffer mh-show-rescan-folder mh-rescan-folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
870 (mh-defun-show-buffer mh-show-pack-folder mh-pack-folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
871 (mh-defun-show-buffer mh-show-kill-folder mh-kill-folder t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
872 (mh-defun-show-buffer mh-show-list-folders mh-list-folders t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
873 (mh-defun-show-buffer mh-show-search-folder mh-search-folder t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
874 (mh-defun-show-buffer mh-show-undo-folder mh-undo-folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
875 (mh-defun-show-buffer mh-show-delete-msg-from-seq |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
876 mh-delete-msg-from-seq) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
877 (mh-defun-show-buffer mh-show-delete-seq mh-delete-seq) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
878 (mh-defun-show-buffer mh-show-list-sequences mh-list-sequences) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
879 (mh-defun-show-buffer mh-show-narrow-to-seq mh-narrow-to-seq) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
880 (mh-defun-show-buffer mh-show-put-msg-in-seq mh-put-msg-in-seq) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
881 (mh-defun-show-buffer mh-show-msg-is-in-seq mh-msg-is-in-seq) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
882 (mh-defun-show-buffer mh-show-widen mh-widen) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
883 (mh-defun-show-buffer mh-show-narrow-to-subject mh-narrow-to-subject) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
884 (mh-defun-show-buffer mh-show-narrow-to-from mh-narrow-to-from) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
885 (mh-defun-show-buffer mh-show-narrow-to-cc mh-narrow-to-cc) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
886 (mh-defun-show-buffer mh-show-narrow-to-range mh-narrow-to-range) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
887 (mh-defun-show-buffer mh-show-narrow-to-to mh-narrow-to-to) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
888 (mh-defun-show-buffer mh-show-store-msg mh-store-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
889 (mh-defun-show-buffer mh-show-page-digest mh-page-digest) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
890 (mh-defun-show-buffer mh-show-page-digest-backwards |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
891 mh-page-digest-backwards) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
892 (mh-defun-show-buffer mh-show-burst-digest mh-burst-digest) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
893 (mh-defun-show-buffer mh-show-page-msg mh-page-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
894 (mh-defun-show-buffer mh-show-previous-page mh-previous-page) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
895 (mh-defun-show-buffer mh-show-modify mh-modify t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
896 (mh-defun-show-buffer mh-show-next-button mh-next-button) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
897 (mh-defun-show-buffer mh-show-prev-button mh-prev-button) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
898 (mh-defun-show-buffer mh-show-toggle-mime-part mh-folder-toggle-mime-part) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
899 (mh-defun-show-buffer mh-show-save-mime-part mh-folder-save-mime-part) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
900 (mh-defun-show-buffer mh-show-inline-mime-part mh-folder-inline-mime-part) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
901 (mh-defun-show-buffer mh-show-toggle-threads mh-toggle-threads) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
902 (mh-defun-show-buffer mh-show-thread-delete mh-thread-delete) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
903 (mh-defun-show-buffer mh-show-thread-refile mh-thread-refile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
904 (mh-defun-show-buffer mh-show-update-sequences mh-update-sequences) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
905 (mh-defun-show-buffer mh-show-next-unread-msg mh-next-unread-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
906 (mh-defun-show-buffer mh-show-previous-unread-msg mh-previous-unread-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
907 (mh-defun-show-buffer mh-show-thread-ancestor mh-thread-ancestor) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
908 (mh-defun-show-buffer mh-show-thread-next-sibling mh-thread-next-sibling) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
909 (mh-defun-show-buffer mh-show-thread-previous-sibling |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
910 mh-thread-previous-sibling) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
911 (mh-defun-show-buffer mh-show-index-visit-folder mh-index-visit-folder t) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
912 (mh-defun-show-buffer mh-show-toggle-tick mh-toggle-tick) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
913 (mh-defun-show-buffer mh-show-narrow-to-tick mh-narrow-to-tick) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
914 (mh-defun-show-buffer mh-show-junk-blacklist mh-junk-blacklist) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
915 (mh-defun-show-buffer mh-show-junk-whitelist mh-junk-whitelist) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
916 (mh-defun-show-buffer mh-show-index-new-messages mh-index-new-messages) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
917 (mh-defun-show-buffer mh-show-index-ticked-messages mh-index-ticked-messages) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
918 (mh-defun-show-buffer mh-show-index-sequenced-messages |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
919 mh-index-sequenced-messages) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
920 (mh-defun-show-buffer mh-show-catchup mh-catchup) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
921 (mh-defun-show-buffer mh-show-ps-print-toggle-color mh-ps-print-toggle-color) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
922 (mh-defun-show-buffer mh-show-ps-print-toggle-faces mh-ps-print-toggle-faces) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
923 (mh-defun-show-buffer mh-show-ps-print-msg-file mh-ps-print-msg-file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
924 (mh-defun-show-buffer mh-show-ps-print-msg mh-ps-print-msg) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
925 (mh-defun-show-buffer mh-show-toggle-mime-buttons mh-toggle-mime-buttons) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
926 (mh-defun-show-buffer mh-show-display-with-external-viewer |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
927 mh-display-with-external-viewer) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
928 |
67681 | 929 |
930 | |
931 ;;; Build mh-show-mode keymaps | |
932 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
933 (gnus-define-keys mh-show-mode-map |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
934 " " mh-show-page-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
935 "!" mh-show-refile-or-write-again |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
936 "'" mh-show-toggle-tick |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
937 "," mh-show-header-display |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
938 "." mh-show-show |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
939 ">" mh-show-write-message-to-file |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
940 "?" mh-help |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
941 "E" mh-show-extract-rejected-mail |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
942 "M" mh-show-modify |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
943 "\177" mh-show-previous-page |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
944 "\C-d" mh-show-delete-msg-no-motion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
945 "\t" mh-show-next-button |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
946 [backtab] mh-show-prev-button |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
947 "\M-\t" mh-show-prev-button |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
948 "\ed" mh-show-redistribute |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
949 "^" mh-show-refile-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
950 "c" mh-show-copy-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
951 "d" mh-show-delete-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
952 "e" mh-show-edit-again |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
953 "f" mh-show-forward |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
954 "g" mh-show-goto-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
955 "i" mh-show-inc-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
956 "k" mh-show-delete-subject-or-thread |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
957 "m" mh-show-send |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
958 "n" mh-show-next-undeleted-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
959 "\M-n" mh-show-next-unread-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
960 "o" mh-show-refile-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
961 "p" mh-show-previous-undeleted-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
962 "\M-p" mh-show-previous-unread-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
963 "q" mh-show-quit |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
964 "r" mh-show-reply |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
965 "s" mh-show-send |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
966 "t" mh-show-toggle-showing |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
967 "u" mh-show-undo |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
968 "x" mh-show-execute-commands |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
969 "v" mh-show-index-visit-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
970 "|" mh-show-pipe-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
971 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
972 (gnus-define-keys (mh-show-folder-map "F" mh-show-mode-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
973 "?" mh-prefix-help |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
974 "'" mh-index-ticked-messages |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
975 "S" mh-show-sort-folder |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
976 "c" mh-show-catchup |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
977 "f" mh-show-visit-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
978 "i" mh-index-search |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
979 "k" mh-show-kill-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
980 "l" mh-show-list-folders |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
981 "n" mh-index-new-messages |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
982 "o" mh-show-visit-folder |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
983 "q" mh-show-index-sequenced-messages |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
984 "r" mh-show-rescan-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
985 "s" mh-show-search-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
986 "t" mh-show-toggle-threads |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
987 "u" mh-show-undo-folder |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
988 "v" mh-show-visit-folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
989 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
990 (gnus-define-keys (mh-show-sequence-map "S" mh-show-mode-map) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
991 "'" mh-show-narrow-to-tick |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
992 "?" mh-prefix-help |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
993 "d" mh-show-delete-msg-from-seq |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
994 "k" mh-show-delete-seq |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
995 "l" mh-show-list-sequences |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
996 "n" mh-show-narrow-to-seq |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
997 "p" mh-show-put-msg-in-seq |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
998 "s" mh-show-msg-is-in-seq |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
999 "w" mh-show-widen) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1000 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1001 (define-key mh-show-mode-map "I" mh-inc-spool-map) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1002 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1003 (gnus-define-keys (mh-show-junk-map "J" mh-show-mode-map) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1004 "?" mh-prefix-help |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1005 "b" mh-show-junk-blacklist |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1006 "w" mh-show-junk-whitelist) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1007 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1008 (gnus-define-keys (mh-show-ps-print-map "P" mh-show-mode-map) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1009 "?" mh-prefix-help |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1010 "C" mh-show-ps-print-toggle-color |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1011 "F" mh-show-ps-print-toggle-faces |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1012 "f" mh-show-ps-print-msg-file |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1013 "l" mh-show-print-msg |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1014 "p" mh-show-ps-print-msg) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1015 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1016 (gnus-define-keys (mh-show-thread-map "T" mh-show-mode-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1017 "?" mh-prefix-help |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1018 "u" mh-show-thread-ancestor |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1019 "p" mh-show-thread-previous-sibling |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1020 "n" mh-show-thread-next-sibling |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1021 "t" mh-show-toggle-threads |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1022 "d" mh-show-thread-delete |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1023 "o" mh-show-thread-refile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1024 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1025 (gnus-define-keys (mh-show-limit-map "/" mh-show-mode-map) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1026 "'" mh-show-narrow-to-tick |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1027 "?" mh-prefix-help |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1028 "c" mh-show-narrow-to-cc |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1029 "f" mh-show-narrow-to-from |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1030 "r" mh-show-narrow-to-range |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1031 "s" mh-show-narrow-to-subject |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1032 "t" mh-show-narrow-to-to |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1033 "w" mh-show-widen) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1034 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1035 (gnus-define-keys (mh-show-extract-map "X" mh-show-mode-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1036 "?" mh-prefix-help |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1037 "s" mh-show-store-msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1038 "u" mh-show-store-msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1039 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1040 ;; Untested... |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1041 (gnus-define-keys (mh-show-digest-map "D" mh-show-mode-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1042 "?" mh-prefix-help |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1043 " " mh-show-page-digest |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1044 "\177" mh-show-page-digest-backwards |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1045 "b" mh-show-burst-digest) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1046 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1047 (gnus-define-keys (mh-show-mime-map "K" mh-show-mode-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1048 "?" mh-prefix-help |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1049 "a" mh-mime-save-parts |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1050 "e" mh-show-display-with-external-viewer |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1051 "v" mh-show-toggle-mime-part |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1052 "o" mh-show-save-mime-part |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1053 "i" mh-show-inline-mime-part |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1054 "t" mh-show-toggle-mime-buttons |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1055 "\t" mh-show-next-button |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1056 [backtab] mh-show-prev-button |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1057 "\M-\t" mh-show-prev-button) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1058 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1059 (easy-menu-define |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1060 mh-show-sequence-menu mh-show-mode-map "Menu for MH-E folder-sequence." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1061 '("Sequence" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1062 ["Add Message to Sequence..." mh-show-put-msg-in-seq t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1063 ["List Sequences for Message" mh-show-msg-is-in-seq t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1064 ["Delete Message from Sequence..." mh-show-delete-msg-from-seq t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1065 ["List Sequences in Folder..." mh-show-list-sequences t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1066 ["Delete Sequence..." mh-show-delete-seq t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1067 ["Narrow to Sequence..." mh-show-narrow-to-seq t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1068 ["Widen from Sequence" mh-show-widen t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1069 "--" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1070 ["Narrow to Subject Sequence" mh-show-narrow-to-subject t] |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1071 ["Narrow to Tick Sequence" mh-show-narrow-to-tick |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1072 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1073 (set-buffer mh-show-folder-buffer) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1074 (and mh-tick-seq (mh-seq-msgs (mh-find-seq mh-tick-seq))))] |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1075 ["Delete Rest of Same Subject" mh-show-delete-subject t] |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1076 ["Toggle Tick Mark" mh-show-toggle-tick t] |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1077 "--" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1078 ["Push State Out to MH" mh-show-update-sequences t])) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1079 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1080 (easy-menu-define |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1081 mh-show-message-menu mh-show-mode-map "Menu for MH-E folder-message." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1082 '("Message" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1083 ["Show Message" mh-show-show t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1084 ["Show Message with Header" mh-show-header-display t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1085 ["Next Message" mh-show-next-undeleted-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1086 ["Previous Message" mh-show-previous-undeleted-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1087 ["Go to First Message" mh-show-first-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1088 ["Go to Last Message" mh-show-last-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1089 ["Go to Message by Number..." mh-show-goto-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1090 ["Modify Message" mh-show-modify t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1091 ["Delete Message" mh-show-delete-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1092 ["Refile Message" mh-show-refile-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1093 ["Undo Delete/Refile" mh-show-undo t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1094 ["Process Delete/Refile" mh-show-execute-commands t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1095 "--" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1096 ["Compose a New Message" mh-send t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1097 ["Reply to Message..." mh-show-reply t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1098 ["Forward Message..." mh-show-forward t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1099 ["Redistribute Message..." mh-show-redistribute t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1100 ["Edit Message Again" mh-show-edit-again t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1101 ["Re-edit a Bounced Message" mh-show-extract-rejected-mail t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1102 "--" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1103 ["Copy Message to Folder..." mh-show-copy-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1104 ["Print Message" mh-show-print-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1105 ["Write Message to File..." mh-show-write-msg-to-file t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1106 ["Pipe Message to Command..." mh-show-pipe-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1107 ["Unpack Uuencoded Message..." mh-show-store-msg t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1108 ["Burst Digest Message" mh-show-burst-digest t])) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1109 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1110 (easy-menu-define |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1111 mh-show-folder-menu mh-show-mode-map "Menu for MH-E folder." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1112 '("Folder" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1113 ["Incorporate New Mail" mh-show-inc-folder t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1114 ["Toggle Show/Folder" mh-show-toggle-showing t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1115 ["Execute Delete/Refile" mh-show-execute-commands t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1116 ["Rescan Folder" mh-show-rescan-folder t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1117 ["Thread Folder" mh-show-toggle-threads t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1118 ["Pack Folder" mh-show-pack-folder t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1119 ["Sort Folder" mh-show-sort-folder t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1120 "--" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1121 ["List Folders" mh-show-list-folders t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1122 ["Visit a Folder..." mh-show-visit-folder t] |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1123 ["View New Messages" mh-show-index-new-messages t] |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1124 ["Search a Folder..." mh-show-search-folder t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1125 ["Indexed Search..." mh-index-search t] |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1126 "--" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1127 ["Quit MH-E" mh-quit t])) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1128 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1129 |
67681 | 1130 ;; Ensure new buffers won't get this mode if default-major-mode is nil. |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1131 (put 'mh-show-mode 'mode-class 'special) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1132 |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
1133 ;; Shush compiler. |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1134 (eval-when-compile |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
1135 (defvar font-lock-auto-fontify) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
1136 (defvar font-lock-defaults) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1137 (defvar tool-bar-map)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1138 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1139 (define-derived-mode mh-show-mode text-mode "MH-Show" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1140 "Major mode for showing messages in MH-E.\\<mh-show-mode-map> |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1141 |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1142 The hook `mh-show-mode-hook' is called upon entry to this mode. |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1143 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1144 See also `mh-folder-mode'. |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1145 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1146 \\{mh-show-mode-map}" |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1147 (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1148 (setq paragraph-start (default-value 'paragraph-start)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1149 (mh-show-unquote-From) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1150 (mh-show-xface) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1151 (mh-show-addr) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1152 (setq buffer-invisibility-spec '((vanish . t) t)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1153 (set (make-local-variable 'line-move-ignore-invisible) t) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1154 (make-local-variable 'font-lock-defaults) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1155 ;;(set (make-local-variable 'font-lock-support-mode) nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1156 (cond |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1157 ((equal mh-highlight-citation-style 'font-lock) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1158 (setq font-lock-defaults '(mh-show-font-lock-keywords-with-cite t))) |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1159 ((equal mh-highlight-citation-style 'gnus) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1160 (setq font-lock-defaults '((mh-show-font-lock-keywords) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1161 t nil nil nil |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1162 (font-lock-fontify-region-function |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1163 . mh-show-font-lock-fontify-region))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1164 (mh-gnus-article-highlight-citation)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1165 (t |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1166 (setq font-lock-defaults '(mh-show-font-lock-keywords t)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1167 (if (and mh-xemacs-flag |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1168 font-lock-auto-fontify) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1169 (turn-on-font-lock)) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1170 (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map) |
67656
76690fbcd56a
* mh-customize.el (mh-toolbar): Rename to mh-tool-bar.
Bill Wohler <wohler@newt.com>
parents:
67247
diff
changeset
|
1171 (mh-funcall-if-exists mh-tool-bar-init :show) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1172 (when mh-decode-mime-flag |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1173 (mh-make-local-hook 'kill-buffer-hook) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1174 (add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1175 (easy-menu-add mh-show-sequence-menu) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1176 (easy-menu-add mh-show-message-menu) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1177 (easy-menu-add mh-show-folder-menu) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1178 (make-local-variable 'mh-show-folder-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1179 (buffer-disable-undo) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1180 (setq buffer-read-only t) |
62767
d5b706998a2b
(mh-show-mode): Remove spurious run-hooks.
Lute Kamstra <lute@gnu.org>
parents:
62465
diff
changeset
|
1181 (use-local-map mh-show-mode-map)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1182 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1183 (defun mh-show-addr () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1184 "Use `goto-address'." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1185 (when mh-show-use-goto-addr-flag |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1186 (if (not (featurep 'goto-addr)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1187 (load "goto-addr" t t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1188 (if (fboundp 'goto-address) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1189 (goto-address)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1190 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1191 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1192 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1193 ;; X-Face and Face display |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1194 (defvar mh-show-xface-function |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1195 (cond ((and mh-xemacs-flag (locate-library "x-face") (not (featurep 'xface))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1196 (load "x-face" t t) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1197 #'mh-face-display-function) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1198 ((>= emacs-major-version 21) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1199 #'mh-face-display-function) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1200 (t #'ignore)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1201 "Determine at run time what function should be called to display X-Face.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1202 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1203 (defvar mh-uncompface-executable |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1204 (and (fboundp 'executable-find) (executable-find "uncompface"))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1205 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1206 (defun mh-face-to-png (data) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1207 "Convert base64 encoded DATA to png image." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1208 (with-temp-buffer |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1209 (insert data) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1210 (ignore-errors (base64-decode-region (point-min) (point-max))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1211 (buffer-string))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1212 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1213 (defun mh-uncompface (data) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1214 "Run DATA through `uncompface' to generate bitmap." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1215 (with-temp-buffer |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1216 (insert data) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1217 (when (and mh-uncompface-executable |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1218 (equal (call-process-region (point-min) (point-max) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1219 mh-uncompface-executable t '(t nil)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1220 0)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1221 (mh-icontopbm) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1222 (buffer-string)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1223 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1224 (defun mh-icontopbm () |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1225 "Elisp substitute for `icontopbm'." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1226 (goto-char (point-min)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1227 (let ((end (point-max))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1228 (while (re-search-forward "0x\\(..\\)\\(..\\)," nil t) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1229 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1230 (goto-char (point-max)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1231 (insert (string-to-number (match-string 1) 16)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1232 (insert (string-to-number (match-string 2) 16)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1233 (delete-region (point-min) end) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1234 (goto-char (point-min)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1235 (insert "P4\n48 48\n"))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1236 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1237 (mh-do-in-xemacs (defvar default-enable-multibyte-characters)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1238 |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1239 (defmacro mh-face-foreground-compat (face &optional frame inherit) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1240 "Return the foreground color name of FACE, or nil if unspecified. |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1241 See documentation for `face-foreground' for a description of the |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1242 arguments FACE, FRAME, and INHERIT. |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1243 |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1244 Calls `face-foreground' correctly in older environments. Versions |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1245 of Emacs prior to version 22 lacked an INHERIT argument which |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1246 when t tells `face-foreground' to consider an inherited value for |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1247 the foreground if the face does not define one itself." |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1248 (if (>= emacs-major-version 22) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1249 `(face-foreground ,face ,frame ,inherit) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1250 `(face-foreground ,face ,frame))) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1251 |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1252 (defmacro mh-face-background-compat (face &optional frame inherit) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1253 "Return the background color name of face, or nil if unspecified. |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1254 See documentation for `back-foreground' for a description of the |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1255 arguments FACE, FRAME, and INHERIT. |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1256 |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1257 Calls `face-background' correctly in older environments. Versions |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1258 of Emacs prior to version 22 lacked an INHERIT argument which |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1259 when t tells `face-background' to consider an inherited value for |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1260 the background if the face does not define one itself." |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1261 (if (>= emacs-major-version 22) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1262 `(face-background ,face ,frame ,inherit) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1263 `(face-background ,face ,frame))) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1264 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1265 (defun mh-face-display-function () |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1266 "Display a Face, X-Face, or X-Image-URL header field. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1267 If more than one of these are present, then the first one found |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1268 in this order is used." |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1269 (save-restriction |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1270 (goto-char (point-min)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1271 (re-search-forward "\n\n" (point-max) t) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1272 (narrow-to-region (point-min) (point)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1273 (let* ((case-fold-search t) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1274 (default-enable-multibyte-characters nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1275 (face (message-fetch-field "face" t)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1276 (x-face (message-fetch-field "x-face" t)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1277 (url (message-fetch-field "x-image-url" t)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1278 raw type) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1279 (cond (face (setq raw (mh-face-to-png face) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1280 type 'png)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1281 (x-face (setq raw (mh-uncompface x-face) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1282 type 'pbm)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1283 (url (setq type 'url)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1284 (t (multiple-value-setq (type raw) (mh-picon-get-image)))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1285 (when type |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1286 (goto-char (point-min)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1287 (when (re-search-forward "^from:" (point-max) t) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1288 ;; GNU Emacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1289 (mh-do-in-gnu-emacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1290 (if (eq type 'url) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1291 (mh-x-image-url-display url) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1292 (mh-funcall-if-exists |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1293 insert-image (create-image |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1294 raw type t |
67969
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1295 :foreground |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1296 (mh-face-foreground-compat 'mh-show-xface nil t) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1297 :background |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1298 (mh-face-background-compat 'mh-show-xface nil t)) |
3ca8b2234237
* mh-customize.el: Sync docstrings with manual for faces and sort them
Bill Wohler <wohler@newt.com>
parents:
67857
diff
changeset
|
1299 " "))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1300 ;; XEmacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1301 (mh-do-in-xemacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1302 (cond |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1303 ((eq type 'url) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1304 (mh-x-image-url-display url)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1305 ((eq type 'png) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1306 (when (featurep 'png) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1307 (set-extent-begin-glyph |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1308 (make-extent (point) (point)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1309 (make-glyph (vector 'png ':data (mh-face-to-png face)))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1310 ;; Try internal xface support if available... |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1311 ((and (eq type 'pbm) (featurep 'xface)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1312 (set-glyph-face |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1313 (set-extent-begin-glyph |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1314 (make-extent (point) (point)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1315 (make-glyph (vector 'xface ':data (concat "X-Face: " x-face)))) |
63531
60261c7a1b56
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-428
Miles Bader <miles@gnu.org>
parents:
62847
diff
changeset
|
1316 'mh-show-xface)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1317 ;; Otherwise try external support with x-face... |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1318 ((and (eq type 'pbm) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1319 (fboundp 'x-face-xmas-wl-display-x-face) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1320 (fboundp 'executable-find) (executable-find "uncompface")) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1321 (mh-funcall-if-exists x-face-xmas-wl-display-x-face)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1322 ;; Picon display |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1323 ((and raw (member type '(xpm xbm gif))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1324 (when (featurep type) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1325 (set-extent-begin-glyph |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1326 (make-extent (point) (point)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1327 (make-glyph (vector type ':data raw)))))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1328 (when raw (insert " ")))))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1329 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1330 (defun mh-show-xface () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1331 "Display X-Face." |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1332 (when (and window-system mh-show-use-xface-flag |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1333 (or mh-decode-mime-flag mh-mhl-format-file |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1334 mh-clean-message-header-flag)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1335 (funcall mh-show-xface-function))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1336 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1337 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1338 |
67681 | 1339 ;;; Picon display |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1340 |
67681 | 1341 ;; XXX: This should be customizable. As a side-effect of setting this |
1342 ;; variable, arrange to reset mh-picon-existing-directory-list to 'unset. | |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1343 (defvar mh-picon-directory-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1344 '("~/.picons" "~/.picons/users" "~/.picons/usenix" "~/.picons/news" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1345 "~/.picons/domains" "~/.picons/misc" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1346 "/usr/share/picons/" "/usr/share/picons/users" "/usr/share/picons/usenix" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1347 "/usr/share/picons/news" "/usr/share/picons/domains" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1348 "/usr/share/picons/misc") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1349 "List of directories where picons reside. |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1350 The directories are searched for in the order they appear in the list.") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1351 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1352 (defvar mh-picon-existing-directory-list 'unset |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1353 "List of directories to search in.") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1354 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1355 (defvar mh-picon-cache (make-hash-table :test #'equal)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1356 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1357 (defvar mh-picon-image-types |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1358 (loop for type in '(xpm xbm gif) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1359 when (or (mh-do-in-gnu-emacs |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1360 (ignore-errors |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1361 (mh-funcall-if-exists image-type-available-p type))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1362 (mh-do-in-xemacs (featurep type))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1363 collect type)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1364 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1365 (defun mh-picon-set-directory-list () |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1366 "Update `mh-picon-existing-directory-list' if needed." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1367 (when (eq mh-picon-existing-directory-list 'unset) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1368 (setq mh-picon-existing-directory-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1369 (loop for x in mh-picon-directory-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1370 when (file-directory-p x) collect x)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1371 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1372 (defun* mh-picon-get-image () |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1373 "Find the best possible match and return contents." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1374 (mh-picon-set-directory-list) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1375 (save-restriction |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1376 (let* ((from-field (ignore-errors (car (message-tokenize-header |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1377 (mh-get-header-field "from:"))))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1378 (from (car (ignore-errors |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1379 (mh-funcall-if-exists ietf-drums-parse-address |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1380 from-field)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1381 (host (and from |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1382 (string-match "\\([^+]*\\)\\(+.*\\)?@\\(.*\\)" from) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1383 (downcase (match-string 3 from)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1384 (user (and host (downcase (match-string 1 from)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1385 (canonical-address (format "%s@%s" user host)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1386 (cached-value (gethash canonical-address mh-picon-cache)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1387 (host-list (and host (delete "" (split-string host "\\.")))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1388 (match nil)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1389 (cond (cached-value (return-from mh-picon-get-image cached-value)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1390 ((not host-list) (return-from mh-picon-get-image nil))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1391 (setq match |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1392 (block 'loop |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1393 ;; u@h search |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1394 (loop for dir in mh-picon-existing-directory-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1395 do (loop for type in mh-picon-image-types |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1396 ;; [path]user@host |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1397 for file1 = (format "%s/%s.%s" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1398 dir canonical-address type) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1399 when (file-exists-p file1) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1400 do (return-from 'loop file1) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1401 ;; [path]user |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1402 for file2 = (format "%s/%s.%s" dir user type) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1403 when (file-exists-p file2) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1404 do (return-from 'loop file2) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1405 ;; [path]host |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1406 for file3 = (format "%s/%s.%s" dir host type) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1407 when (file-exists-p file3) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1408 do (return-from 'loop file3))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1409 ;; facedb search |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1410 ;; Search order for user@foo.net: |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1411 ;; [path]net/foo/user |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1412 ;; [path]net/foo/user/face |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1413 ;; [path]net/user |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1414 ;; [path]net/user/face |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1415 ;; [path]net/foo/unknown |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1416 ;; [path]net/foo/unknown/face |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1417 ;; [path]net/unknown |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1418 ;; [path]net/unknown/face |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1419 (loop for u in (list user "unknown") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1420 do (loop for dir in mh-picon-existing-directory-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1421 do (loop for x on host-list by #'cdr |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1422 for y = (mh-picon-generate-path x u dir) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1423 do (loop for type in mh-picon-image-types |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1424 for z1 = (format "%s.%s" y type) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1425 when (file-exists-p z1) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1426 do (return-from 'loop z1) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1427 for z2 = (format "%s/face.%s" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1428 y type) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1429 when (file-exists-p z2) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1430 do (return-from 'loop z2))))))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1431 (setf (gethash canonical-address mh-picon-cache) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1432 (mh-picon-file-contents match))))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1433 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1434 (defun mh-picon-file-contents (file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1435 "Return details about FILE. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1436 A list of consisting of a symbol for the type of the file and the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1437 file contents as a string is returned. If FILE is nil, then both |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1438 elements of the list are nil." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1439 (if (stringp file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1440 (with-temp-buffer |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1441 (let ((type (and (string-match ".*\\.\\(...\\)$" file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1442 (intern (match-string 1 file))))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1443 (insert-file-contents-literally file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1444 (values type (buffer-string)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1445 (values nil nil))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1446 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1447 (defun mh-picon-generate-path (host-list user directory) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1448 "Generate the image file path. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1449 HOST-LIST is the parsed host address of the email address, USER |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1450 the username and DIRECTORY is the directory relative to which the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1451 path is generated." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1452 (loop with acc = "" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1453 for elem in host-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1454 do (setq acc (format "%s/%s" elem acc)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1455 finally return (format "%s/%s%s" directory acc user))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1456 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1457 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1458 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1459 ;; X-Image-URL display |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1460 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1461 (defvar mh-x-image-cache-directory nil |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1462 "Directory where X-Image-URL images are cached.") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1463 (defvar mh-x-image-scaling-function |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1464 (cond ((executable-find "convert") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1465 'mh-x-image-scale-with-convert) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1466 ((and (executable-find "anytopnm") (executable-find "pnmscale") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1467 (executable-find "pnmtopng")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1468 'mh-x-image-scale-with-pnm) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1469 (t 'ignore)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1470 "Function to use to scale image to proper size.") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1471 (defvar mh-wget-executable nil) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1472 (defvar mh-wget-choice |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1473 (or (and (setq mh-wget-executable (executable-find "wget")) 'wget) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1474 (and (setq mh-wget-executable (executable-find "fetch")) 'fetch) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1475 (and (setq mh-wget-executable (executable-find "curl")) 'curl))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1476 (defvar mh-wget-option |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1477 (cdr (assoc mh-wget-choice '((curl . "-o") (fetch . "-o") (wget . "-O"))))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1478 (defvar mh-x-image-temp-file nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1479 (defvar mh-x-image-url nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1480 (defvar mh-x-image-marker nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1481 (defvar mh-x-image-url-cache-file nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1482 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1483 ;; Functions to scale image to proper size |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1484 (defun mh-x-image-scale-with-pnm (input output) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1485 "Scale image in INPUT file and write to OUTPUT file using pnm tools." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1486 (let ((res (shell-command-to-string |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1487 (format "anytopnm < %s | pnmscale -xysize 96 48 | pnmtopng > %s" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1488 input output)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1489 (unless (equal res "") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1490 (delete-file output)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1491 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1492 (defun mh-x-image-scale-with-convert (input output) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1493 "Scale image in INPUT file and write to OUTPUT file using ImageMagick." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1494 (call-process "convert" nil nil nil "-geometry" "96x48" input output)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1495 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1496 (defun mh-x-image-url-cache-canonicalize (url) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1497 "Canonicalize URL. |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1498 Replace the ?/ character with a ?! character and append .png." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1499 (format "%s/%s.png" mh-x-image-cache-directory |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1500 (with-temp-buffer |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1501 (insert url) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1502 (mh-replace-string "/" "!") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1503 (buffer-string)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1504 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1505 (defun mh-x-image-set-download-state (file data) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1506 "Setup a symbolic link from FILE to DATA." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1507 (if data |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1508 (make-symbolic-link (symbol-name data) file t) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1509 (delete-file file))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1510 |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1511 (defun mh-x-image-get-download-state (file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1512 "Check the state of FILE by following any symbolic links." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1513 (unless (file-exists-p mh-x-image-cache-directory) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1514 (call-process "mkdir" nil nil nil mh-x-image-cache-directory)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1515 (cond ((file-symlink-p file) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1516 (intern (file-name-nondirectory (file-chase-links file)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1517 ((not (file-exists-p file)) nil) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1518 (t 'ok))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1519 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1520 (defun mh-x-image-url-fetch-image (url cache-file marker sentinel) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1521 "Fetch and display the image specified by URL. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1522 After the image is fetched, it is stored in CACHE-FILE. It will |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1523 be displayed in a buffer and position specified by MARKER. The |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1524 actual display is carried out by the SENTINEL function." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1525 (if mh-wget-executable |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1526 (let ((buffer (get-buffer-create (generate-new-buffer-name |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1527 mh-temp-fetch-buffer))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1528 (filename (or (mh-funcall-if-exists make-temp-file "mhe-fetch") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1529 (expand-file-name (make-temp-name "~/mhe-fetch"))))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1530 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1531 (set-buffer buffer) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1532 (set (make-local-variable 'mh-x-image-url-cache-file) cache-file) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1533 (set (make-local-variable 'mh-x-image-marker) marker) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1534 (set (make-local-variable 'mh-x-image-temp-file) filename)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1535 (set-process-sentinel |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1536 (start-process "*mh-x-image-url-fetch*" buffer |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1537 mh-wget-executable mh-wget-option filename url) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1538 sentinel)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1539 ;; Temporary failure |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1540 (mh-x-image-set-download-state cache-file 'try-again))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1541 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1542 (defun mh-x-image-display (image marker) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1543 "Display IMAGE at MARKER." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1544 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1545 (set-buffer (marker-buffer marker)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1546 (let ((buffer-read-only nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1547 (default-enable-multibyte-characters nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1548 (buffer-modified-flag (buffer-modified-p))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1549 (unwind-protect |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1550 (when (and (file-readable-p image) (not (file-symlink-p image)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1551 (eq marker mh-x-image-marker)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1552 (goto-char marker) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1553 (mh-do-in-gnu-emacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1554 (mh-funcall-if-exists insert-image (create-image image 'png))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1555 (mh-do-in-xemacs |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1556 (when (featurep 'png) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1557 (set-extent-begin-glyph |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1558 (make-extent (point) (point)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1559 (make-glyph |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1560 (vector 'png ':data (with-temp-buffer |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1561 (insert-file-contents-literally image) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1562 (buffer-string)))))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1563 (set-buffer-modified-p buffer-modified-flag))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1564 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1565 (defun mh-x-image-scale-and-display (process change) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1566 "When the wget PROCESS terminates scale and display image. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1567 The argument CHANGE is ignored." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1568 (when (eq (process-status process) 'exit) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1569 (let (marker temp-file cache-filename wget-buffer) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1570 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1571 (set-buffer (setq wget-buffer (process-buffer process))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1572 (setq marker mh-x-image-marker |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1573 cache-filename mh-x-image-url-cache-file |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1574 temp-file mh-x-image-temp-file)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1575 (cond |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1576 ;; Check if we have `convert' |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1577 ((eq mh-x-image-scaling-function 'ignore) |
68013
bbc0e52abce5
* mh-alias.el (mh-alias-add-alias): Grand message and error string
Bill Wohler <wohler@newt.com>
parents:
67988
diff
changeset
|
1578 (message "The \"convert\" program is needed to display X-Image-URL") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1579 (mh-x-image-set-download-state cache-filename 'try-again)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1580 ;; Scale fetched image |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1581 ((and (funcall mh-x-image-scaling-function temp-file cache-filename) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1582 nil)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1583 ;; Attempt to display image if we have it |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1584 ((file-exists-p cache-filename) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1585 (mh-x-image-display cache-filename marker)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1586 ;; We didn't find the image. Should we try to display it the next time? |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1587 (t (mh-x-image-set-download-state cache-filename 'try-again))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1588 (ignore-errors |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1589 (set-marker marker nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1590 (delete-process process) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1591 (kill-buffer wget-buffer) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1592 (delete-file temp-file))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1593 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1594 (defun mh-x-image-url-sane-p (url) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1595 "Check if URL is something sensible." |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1596 (let ((len (length url))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1597 (cond ((< len 5) nil) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1598 ((not (equal (substring url 0 5) "http:")) nil) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1599 ((> len 100) nil) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1600 (t t)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1601 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1602 (defun mh-x-image-url-display (url) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1603 "Display image from location URL. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1604 If the URL isn't present in the cache then it is fetched with wget." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1605 (let* ((cache-filename (mh-x-image-url-cache-canonicalize url)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1606 (state (mh-x-image-get-download-state cache-filename)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1607 (marker (set-marker (make-marker) (point)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1608 (set (make-local-variable 'mh-x-image-marker) marker) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1609 (cond ((not (mh-x-image-url-sane-p url))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1610 ((eq state 'ok) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1611 (mh-x-image-display cache-filename marker)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1612 ((or (not mh-wget-executable) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1613 (eq mh-x-image-scaling-function 'ignore))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1614 ((eq state 'never)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1615 ((not mh-fetch-x-image-url) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1616 (set-marker marker nil)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1617 ((eq state 'try-again) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1618 (mh-x-image-set-download-state cache-filename nil) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1619 (mh-x-image-url-fetch-image url cache-filename marker |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1620 'mh-x-image-scale-and-display)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1621 ((and (eq mh-fetch-x-image-url 'ask) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1622 (not (y-or-n-p (format "Fetch %s? " url)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1623 (mh-x-image-set-download-state cache-filename 'never)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1624 ((eq state nil) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1625 (mh-x-image-url-fetch-image url cache-filename marker |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1626 'mh-x-image-scale-and-display))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1627 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1628 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1629 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1630 (defun mh-maybe-show (&optional msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1631 "Display message at cursor, but only if in show mode. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1632 If optional arg MSG is non-nil, display that message instead." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1633 (if mh-showing-mode (mh-show msg))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1634 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1635 (defun mh-show (&optional message redisplay-flag) |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1636 "Display message\\<mh-folder-mode-map>. |
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1637 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1638 If the message under the cursor is already displayed, this command |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1639 scrolls to the beginning of the message. MH-E normally hides a lot of |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1640 the superfluous header fields that mailers add to a message, but if |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1641 you wish to see all of them, use the command \\[mh-header-display]. |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1642 |
67988
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1643 Two hooks can be used to control how messages are displayed. The |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1644 first hook, `mh-show-mode-hook', is called early on in the |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1645 process of the message display. It is usually used to perform |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1646 some action on the message's content. The second hook, |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1647 `mh-show-hook', is the last thing called after messages are |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1648 displayed. It's used to affect the behavior of MH-E in general or |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1649 when `mh-show-mode-hook' is too early. |
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1650 |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1651 From a program, optional argument MESSAGE can be used to display an |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1652 alternative message. The optional argument REDISPLAY-FLAG forces the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1653 redisplay of the message even if the show buffer was already |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1654 displaying the correct message. |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1655 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1656 See the \"mh-show\" customization group for a litany of options that |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1657 control what displayed messages look like." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1658 (interactive (list nil t)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1659 (when (or redisplay-flag |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1660 (and mh-showing-with-headers |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1661 (or mh-mhl-format-file mh-clean-message-header-flag))) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1662 (mh-invalidate-show-buffer)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1663 (mh-show-msg message)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1664 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1665 (defun mh-show-mouse (event) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1666 "Move point to mouse EVENT and show message." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1667 (interactive "e") |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1668 (mouse-set-point event) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1669 (mh-show)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1670 |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1671 (defun mh-summary-height () |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1672 "Return ideal value for the variable `mh-summary-height'. |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1673 The current frame height is taken into consideration." |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1674 (or (and (fboundp 'frame-height) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1675 (> (frame-height) 24) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1676 (min 10 (/ (frame-height) 6))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1677 4)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1678 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1679 (defun mh-show-msg (msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1680 "Show MSG. |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1681 |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1682 The hook `mh-show-hook' is called after the message has been |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1683 displayed." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1684 (if (not msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1685 (setq msg (mh-get-msg-num t))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1686 (mh-showing-mode t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1687 (setq mh-page-to-next-msg-flag nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1688 (let ((folder mh-current-folder) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1689 (folders (list mh-current-folder)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1690 (clean-message-header mh-clean-message-header-flag) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1691 (show-window (get-buffer-window mh-show-buffer)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1692 (display-mime-buttons-flag mh-display-buttons-for-inline-parts-flag)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1693 (if (not (eq (next-window (minibuffer-window)) (selected-window))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1694 (delete-other-windows)) ; force ourself to the top window |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1695 (mh-in-show-buffer (mh-show-buffer) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1696 (setq mh-display-buttons-for-inline-parts-flag display-mime-buttons-flag) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1697 (if (and show-window |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1698 (equal (mh-msg-filename msg folder) buffer-file-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1699 (progn ;just back up to start |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1700 (goto-char (point-min)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1701 (if (not clean-message-header) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1702 (mh-start-of-uncleaned-message))) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1703 (mh-display-msg msg folder))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1704 (if (not (= (1+ (window-height)) (frame-height))) ;not horizontally split |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1705 (shrink-window (- (window-height) (or mh-summary-height |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1706 (mh-summary-height))))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1707 (mh-recenter nil) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1708 ;; The following line is a nop which forces update of the scan line so |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1709 ;; that font-lock will update it (if needed)... |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1710 (mh-notate nil nil mh-cmd-note) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1711 (if (not (memq msg mh-seen-list)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1712 (setq mh-seen-list (cons msg mh-seen-list))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1713 (when mh-update-sequences-after-mh-show-flag |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1714 (mh-update-sequences) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1715 (when mh-index-data |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1716 (setq folders |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1717 (append (mh-index-delete-from-sequence mh-unseen-seq (list msg)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1718 folders))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1719 (when (mh-speed-flists-active-p) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1720 (apply #'mh-speed-flists t folders))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1721 (run-hooks 'mh-show-hook))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1722 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1723 (defun mh-modify (&optional message) |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1724 "Edit message. |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1725 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1726 There are times when you need to edit a message. For example, you |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1727 may need to fix a broken Content-Type header field. You can do |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1728 this with this command. It displays the raw message in an |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1729 editable buffer. When you are done editing, save and kill the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1730 buffer as you would any other. |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1731 |
67988
7882fc7df359
* mh-alias.el (mh-alias-grab-from-field): Remove leading * from
Bill Wohler <wohler@newt.com>
parents:
67969
diff
changeset
|
1732 From a program, edit MESSAGE; nil means edit current message." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1733 (interactive) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1734 (let* ((message (or message (mh-get-msg-num t))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1735 (msg-filename (mh-msg-filename message)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1736 edit-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1737 (when (not (file-exists-p msg-filename)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1738 (error "Message %d does not exist" message)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1739 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1740 ;; Invalidate the show buffer if it is showing the same message that is |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1741 ;; to be edited. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1742 (when (and (buffer-live-p (get-buffer mh-show-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1743 (equal (save-excursion (set-buffer mh-show-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1744 buffer-file-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1745 msg-filename)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1746 (mh-invalidate-show-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1747 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1748 ;; Edit message |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1749 (find-file msg-filename) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1750 (setq edit-buffer (current-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1751 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1752 ;; Set buffer properties |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1753 (mh-letter-mode) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1754 (use-local-map text-mode-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1755 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1756 ;; Just show the edit buffer... |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1757 (delete-other-windows) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1758 (switch-to-buffer edit-buffer))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1759 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1760 (defun mh-show-unquote-From () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1761 "Decode >From at beginning of lines for `mh-show-mode'." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1762 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1763 (let ((modified (buffer-modified-p)) |
62847
aa8c2e12ee24
Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents:
62767
diff
changeset
|
1764 (case-fold-search nil) |
aa8c2e12ee24
Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents:
62767
diff
changeset
|
1765 (buffer-read-only nil)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1766 (goto-char (mh-mail-header-end)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1767 (while (re-search-forward "^>From" nil t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1768 (replace-match "From")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1769 (set-buffer-modified-p modified)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1770 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1771 (defun mh-msg-folder (folder-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1772 "Return the name of the buffer for FOLDER-NAME." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1773 folder-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1774 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1775 (defun mh-display-msg (msg-num folder-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1776 "Display MSG-NUM of FOLDER-NAME. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1777 Sets the current buffer to the show buffer." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1778 (let ((folder (mh-msg-folder folder-name))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1779 (set-buffer folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1780 ;; When Gnus uses external displayers it has to keep handles longer. So |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1781 ;; we will delete these handles when mh-quit is called on the folder. It |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1782 ;; would be nicer if there are weak pointers in emacs lisp, then we could |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1783 ;; get the garbage collector to do this for us. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1784 (unless (mh-buffer-data) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1785 (setf (mh-buffer-data) (mh-make-buffer-data))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1786 ;; Bind variables in folder buffer in case they are local |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1787 (let ((formfile mh-mhl-format-file) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1788 (clean-message-header mh-clean-message-header-flag) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1789 (invisible-headers mh-invisible-header-fields-compiled) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1790 (visible-headers nil) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1791 (msg-filename (mh-msg-filename msg-num folder-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1792 (show-buffer mh-show-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1793 (mm-inline-media-tests mh-mm-inline-media-tests)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1794 (if (not (file-exists-p msg-filename)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1795 (error "Message %d does not exist" msg-num)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1796 (if (and (> mh-show-maximum-size 0) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1797 (> (elt (file-attributes msg-filename) 7) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1798 mh-show-maximum-size) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1799 (not (y-or-n-p |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1800 (format |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1801 "Message %d (%d bytes) exceeds %d bytes. Display it? " |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1802 msg-num (elt (file-attributes msg-filename) 7) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1803 mh-show-maximum-size)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1804 (error "Message %d not displayed" msg-num)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1805 (set-buffer show-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1806 (cond ((not (equal msg-filename buffer-file-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1807 (mh-unvisit-file) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1808 (setq buffer-read-only nil) |
66128
debb27ca9375
* mh-init.el (mh-image-load-path): Remove use of pushnew since it
Satyaki Das <satyaki@theforce.stanford.edu>
parents:
66087
diff
changeset
|
1809 ;; Cleanup old mime handles |
debb27ca9375
* mh-init.el (mh-image-load-path): Remove use of pushnew since it
Satyaki Das <satyaki@theforce.stanford.edu>
parents:
66087
diff
changeset
|
1810 (mh-mime-cleanup) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1811 (erase-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1812 ;; Changing contents, so this hook needs to be reinitialized. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1813 ;; pgp.el uses this. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1814 (if (boundp 'write-contents-hooks) ;Emacs 19 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1815 (kill-local-variable 'write-contents-hooks)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1816 (if formfile |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1817 (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1818 (if (stringp formfile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1819 (list "-form" formfile)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1820 msg-filename) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
1821 (insert-file-contents-literally msg-filename)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1822 ;; Use mm to display buffer |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1823 (when (and mh-decode-mime-flag (not formfile)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1824 (mh-add-missing-mime-version-header) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1825 (setf (mh-buffer-data) (mh-make-buffer-data)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1826 (mh-mime-display)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1827 (mh-show-mode) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1828 ;; Header cleanup |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1829 (goto-char (point-min)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1830 (cond (clean-message-header |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1831 (mh-clean-msg-header (point-min) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1832 invisible-headers |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1833 visible-headers) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1834 (goto-char (point-min))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1835 (t |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1836 (mh-start-of-uncleaned-message))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1837 (mh-decode-message-header) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1838 ;; the parts of visiting we want to do (no locking) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1839 (or (eq buffer-undo-list t) ;don't save undo info for prev msgs |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1840 (setq buffer-undo-list nil)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1841 (set-buffer-auto-saved) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1842 ;; the parts of set-visited-file-name we want to do (no locking) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1843 (setq buffer-file-name msg-filename) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1844 (setq buffer-backed-up nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1845 (auto-save-mode 1) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1846 (set-mark nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1847 (unwind-protect |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1848 (when (and mh-decode-mime-flag (not formfile)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1849 (setq buffer-read-only nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1850 (mh-display-smileys) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1851 (mh-display-emphasis)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1852 (setq buffer-read-only t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1853 (set-buffer-modified-p nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1854 (setq mh-show-folder-buffer folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1855 (setq mode-line-buffer-identification |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1856 (list (format mh-show-buffer-mode-line-buffer-id |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1857 folder-name msg-num))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
1858 (mh-logo-display) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1859 (set-buffer folder) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1860 (setq mh-showing-with-headers nil)))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1861 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1862 (defun mh-clean-msg-header (start invisible-headers visible-headers) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1863 "Flush extraneous lines in message header. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1864 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1865 Header is cleaned from START to the end of the message header. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1866 INVISIBLE-HEADERS contains a regular expression specifying lines |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1867 to delete from the header. VISIBLE-HEADERS contains a regular |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1868 expression specifying the lines to display. INVISIBLE-HEADERS is |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1869 ignored if VISIBLE-HEADERS is non-nil." |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1870 ;; XXX Note that MH-E no longer supports the `mh-visible-headers' |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1871 ;; variable, so this function could be trimmed of this feature too." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1872 (let ((case-fold-search t) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
1873 (buffer-read-only nil)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1874 (save-restriction |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1875 (goto-char start) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1876 (if (search-forward "\n\n" nil 'move) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1877 (backward-char 1)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1878 (narrow-to-region start (point)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1879 (goto-char (point-min)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1880 (if visible-headers |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1881 (while (< (point) (point-max)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1882 (cond ((looking-at visible-headers) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1883 (forward-line 1) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1884 (while (looking-at "[ \t]") (forward-line 1))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1885 (t |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1886 (mh-delete-line 1) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1887 (while (looking-at "[ \t]") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1888 (mh-delete-line 1))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1889 (while (re-search-forward invisible-headers nil t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1890 (beginning-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1891 (mh-delete-line 1) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1892 (while (looking-at "[ \t]") |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1893 (mh-delete-line 1))))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1894 (let ((mh-compose-skipped-header-fields ())) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1895 (mh-letter-hide-all-skipped-fields)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1896 (unlock-buffer))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1897 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1898 (defun mh-delete-line (lines) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1899 "Delete the next LINES lines." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1900 (delete-region (point) (progn (forward-line lines) (point)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1901 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1902 (defun mh-notate (msg notation offset) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1903 "Mark MSG with the character NOTATION at position OFFSET. |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1904 Null MSG means the message at cursor. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
1905 If NOTATION is nil then no change in the buffer occurs." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1906 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1907 (if (or (null msg) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1908 (mh-goto-msg msg t t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1909 (with-mh-folder-updating (t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1910 (beginning-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1911 (forward-char offset) |
66518
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
1912 (let* ((change-stack-flag |
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
1913 (and (equal offset |
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
1914 (+ mh-cmd-note mh-scan-field-destination-offset)) |
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
1915 (not (eq notation mh-note-seq)))) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1916 (msg (and change-stack-flag (or msg (mh-get-msg-num nil)))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1917 (stack (and msg (gethash msg mh-sequence-notation-history))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1918 (notation (or notation (char-after)))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1919 (if stack |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1920 ;; The presence of the stack tells us that we don't need to |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1921 ;; notate the message, since the notation would be replaced |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1922 ;; by a sequence notation. So we will just put the notation |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1923 ;; at the bottom of the stack. If the sequence is deleted, |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1924 ;; the correct notation will be shown. |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1925 (setf (gethash msg mh-sequence-notation-history) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1926 (reverse (cons notation (cdr (reverse stack))))) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1927 ;; Since we don't have any sequence notations in the way, just |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1928 ;; notate the scan line. |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1929 (delete-char 1) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1930 (insert notation)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1931 (when change-stack-flag |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
1932 (mh-thread-update-scan-line-map msg notation offset))))))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1933 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1934 (defun mh-goto-msg (number &optional no-error-if-no-message dont-show) |
67246
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1935 "Go to a message\\<mh-folder-mode-map>. |
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1936 |
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1937 You can enter the message NUMBER either before or after typing |
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1938 \\[mh-goto-msg]. In the latter case, Emacs prompts you. |
bce5c0d2041c
* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead
Bill Wohler <wohler@newt.com>
parents:
66518
diff
changeset
|
1939 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1940 In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1941 means return nil instead of signaling an error if message does not |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1942 exist\; in this case, the cursor is positioned near where the message |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1943 would have been. Non-nil third argument DONT-SHOW means not to show |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1944 the message." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1945 (interactive "NGo to message: ") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1946 (setq number (prefix-numeric-value number)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1947 (let ((point (point)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1948 (return-value t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1949 (goto-char (point-min)) |
66477
117f8e71b37a
* mh-customize.el (mh-adaptive-cmd-note-flag)
Bill Wohler <wohler@newt.com>
parents:
66354
diff
changeset
|
1950 (unless (re-search-forward (format mh-scan-msg-search-regexp number) nil t) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1951 (goto-char point) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1952 (unless no-error-if-no-message |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1953 (error "No message %d" number)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1954 (setq return-value nil)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1955 (beginning-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1956 (or dont-show (not return-value) (mh-maybe-show number)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1957 return-value)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1958 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1959 (defun mh-get-profile-field (field) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1960 "Find and return the value of FIELD in the current buffer. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1961 Returns nil if the field is not in the buffer." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1962 (let ((case-fold-search t)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1963 (goto-char (point-min)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1964 (cond ((not (re-search-forward (format "^%s" field) nil t)) nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1965 ((looking-at "[\t ]*$") nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1966 (t |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1967 (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1968 (let ((start (match-beginning 1))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1969 (end-of-line) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1970 (buffer-substring start (point))))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1971 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1972 (defvar mh-find-path-run nil |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1973 "Non-nil if `mh-find-path' has been run already.") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1974 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1975 (defun mh-find-path () |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1976 "Set variables from user's MH profile. |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1977 |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1978 This function sets `mh-user-path' from your \"Path:\" MH profile |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1979 component (but defaults to \"Mail\" if one isn't present), |
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1980 `mh-draft-folder' from \"Draft-Folder:\", `mh-unseen-seq' from |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1981 \"Unseen-Sequence:\", `mh-previous-seq' from |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1982 \"Previous-Sequence:\", and `mh-inbox' from \"Inbox:\" (defaults |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1983 to \"+inbox\"). |
67756
7ff92ad99326
* mh-alias.el (mh-alias-reload): Sync docstrings with manual.
Bill Wohler <wohler@newt.com>
parents:
67681
diff
changeset
|
1984 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1985 The hook `mh-find-path-hook' is run after these variables have |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1986 been set. This hook can be used the change the value of these |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1987 variables if you need to run with different values between MH and |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
1988 MH-E." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1989 (mh-variants) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1990 (unless mh-find-path-run |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
1991 (setq mh-find-path-run t) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1992 (save-excursion |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1993 ;; Be sure profile is fully expanded before switching buffers |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1994 (let ((profile (expand-file-name (or (getenv "MH") "~/.mh_profile")))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1995 (set-buffer (get-buffer-create mh-temp-buffer)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1996 (setq buffer-offer-save nil) ;for people who set default to t |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1997 (erase-buffer) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1998 (condition-case err |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
1999 (insert-file-contents profile) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2000 (file-error |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2001 (mh-install profile err))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2002 (setq mh-user-path (mh-get-profile-field "Path:")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2003 (if (not mh-user-path) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2004 (setq mh-user-path "Mail")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2005 (setq mh-user-path |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2006 (file-name-as-directory |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2007 (expand-file-name mh-user-path (expand-file-name "~")))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2008 (unless mh-x-image-cache-directory |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2009 (setq mh-x-image-cache-directory |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2010 (expand-file-name ".mhe-x-image-cache" mh-user-path))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2011 (setq mh-draft-folder (mh-get-profile-field "Draft-Folder:")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2012 (if mh-draft-folder |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2013 (progn |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2014 (if (not (mh-folder-name-p mh-draft-folder)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2015 (setq mh-draft-folder (format "+%s" mh-draft-folder))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2016 (if (not (file-exists-p (mh-expand-file-name mh-draft-folder))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2017 (error |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2018 "Draft folder \"%s\" not found. Create it and try again" |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2019 (mh-expand-file-name mh-draft-folder))))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2020 (setq mh-inbox (mh-get-profile-field "Inbox:")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2021 (cond ((not mh-inbox) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2022 (setq mh-inbox "+inbox")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2023 ((not (mh-folder-name-p mh-inbox)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2024 (setq mh-inbox (format "+%s" mh-inbox)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2025 (setq mh-unseen-seq (mh-get-profile-field "Unseen-Sequence:")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2026 (if mh-unseen-seq |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2027 (setq mh-unseen-seq (intern mh-unseen-seq)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2028 (setq mh-unseen-seq 'unseen)) ;old MH default? |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2029 (setq mh-previous-seq (mh-get-profile-field "Previous-Sequence:")) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2030 (if mh-previous-seq |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2031 (setq mh-previous-seq (intern mh-previous-seq))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2032 (run-hooks 'mh-find-path-hook) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2033 (mh-collect-folder-names))))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2034 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2035 (defun mh-file-command-p (file) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2036 "Return t if file FILE is the name of a executable regular file." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2037 (and (file-regular-p file) (file-executable-p file))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2038 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2039 (defvar mh-no-install nil) ;do not run install-mh |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2040 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2041 (defun mh-install (profile error-val) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2042 "Initialize the MH environment. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2043 This is called if we fail to read the PROFILE file. ERROR-VAL is |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2044 the error that made this call necessary." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2045 (if (or (getenv "MH") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2046 (file-exists-p profile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2047 mh-no-install) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2048 (signal (car error-val) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2049 (list (format "Cannot read MH profile \"%s\"" profile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2050 (car (cdr (cdr error-val)))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2051 ;; The "install-mh" command will output a short note which |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2052 ;; mh-exec-cmd will display to the user. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2053 ;; The MH 5 version of install-mh might try prompt the user |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2054 ;; for information, which would fail here. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2055 (mh-exec-cmd (expand-file-name "install-mh" mh-lib-progs) "-auto") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2056 ;; now try again to read the profile file |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2057 (erase-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2058 (condition-case err |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2059 (insert-file-contents profile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2060 (file-error |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2061 (signal (car err) ;re-signal with more specific msg |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2062 (list (format "Cannot read MH profile \"%s\"" profile) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2063 (car (cdr (cdr err)))))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2064 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2065 (defun mh-set-folder-modified-p (flag) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2066 "Mark current folder as modified or unmodified according to FLAG." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2067 (set-buffer-modified-p flag)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2068 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2069 (defun mh-find-seq (name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2070 "Return sequence NAME." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2071 (assoc name mh-seq-list)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2072 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2073 (defun mh-seq-to-msgs (seq) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2074 "Return a list of the messages in SEQ." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2075 (mh-seq-msgs (mh-find-seq seq))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2076 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2077 (defun mh-update-scan-format (fmt width) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2078 "Return a scan format with the (msg) width in the FMT replaced with WIDTH. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2079 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2080 The message number width portion of the format is discovered |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2081 using `mh-scan-msg-format-regexp'. Its replacement is controlled |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2082 with `mh-scan-msg-format-string'." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2083 (or (and |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2084 (string-match mh-scan-msg-format-regexp fmt) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2085 (let ((begin (match-beginning 1)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2086 (end (match-end 1))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2087 (concat (substring fmt 0 begin) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2088 (format mh-scan-msg-format-string width) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2089 (substring fmt end)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2090 fmt)) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49578
diff
changeset
|
2091 |
66518
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
2092 (defun mh-msg-num-width (folder) |
7cc22b3f2300
* mh-comp.el (mh-annotate-msg): Use new variable
Bill Wohler <wohler@newt.com>
parents:
66477
diff
changeset
|
2093 "Return the width of the largest message number in this FOLDER." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2094 (or mh-progs (mh-find-path)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2095 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2096 (width 0)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2097 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2098 (set-buffer tmp-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2099 (erase-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2100 (apply 'call-process |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2101 (expand-file-name mh-scan-prog mh-progs) nil '(t nil) nil |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2102 (list folder "last" "-format" "%(msg)")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2103 (goto-char (point-min)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2104 (if (re-search-forward mh-scan-msg-number-regexp nil 0 1) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2105 (setq width (length (buffer-substring |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2106 (match-beginning 1) (match-end 1)))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2107 width)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2108 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2109 (defun mh-add-msgs-to-seq (msgs seq &optional internal-flag dont-annotate-flag) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2110 "Add MSGS to SEQ. |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2111 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2112 Remove duplicates and keep sequence sorted. If optional |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2113 INTERNAL-FLAG is non-nil, do not mark the message in the scan |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2114 listing or inform MH of the addition. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2115 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2116 If DONT-ANNOTATE-FLAG is non-nil then the annotations in the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2117 folder buffer are not updated." |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2118 (let ((entry (mh-find-seq seq)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2119 (internal-seq-flag (mh-internal-seq seq))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2120 (if (and msgs (atom msgs)) (setq msgs (list msgs))) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2121 (if (null entry) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2122 (setq mh-seq-list |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2123 (cons (mh-make-seq seq (mh-canonicalize-sequence msgs)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2124 mh-seq-list)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2125 (if msgs (setcdr entry (mh-canonicalize-sequence |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2126 (append msgs (mh-seq-msgs entry)))))) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2127 (unless internal-flag |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2128 (mh-add-to-sequence seq msgs) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2129 (when (not dont-annotate-flag) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2130 (mh-iterate-on-range msg msgs |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2131 (unless (memq msg (cdr entry)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2132 (mh-add-sequence-notation msg internal-seq-flag))))))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2133 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2134 (defun mh-canonicalize-sequence (msgs) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2135 "Sort MSGS in decreasing order and remove duplicates." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2136 (let* ((sorted-msgs (sort (copy-sequence msgs) '>)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2137 (head sorted-msgs)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2138 (while (cdr head) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2139 (if (= (car head) (cadr head)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2140 (setcdr head (cddr head)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2141 (setq head (cdr head)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2142 sorted-msgs)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2143 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2144 (defvar mh-sub-folders-cache (make-hash-table :test #'equal)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2145 (defvar mh-current-folder-name nil) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2146 (defvar mh-flists-partial-line "") |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2147 (defvar mh-flists-process nil) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2148 |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2149 ;; Initialize mh-sub-folders-cache... |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2150 (defun mh-collect-folder-names () |
67760
9c3504ae6060
Follow MH-E Developers Guide conventions. Use `' quotes for Help
Bill Wohler <wohler@newt.com>
parents:
67758
diff
changeset
|
2151 "Collect folder names by running \"flists\"." |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2152 (unless mh-flists-process |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2153 (setq mh-flists-process |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2154 (mh-exec-cmd-daemon "folders" 'mh-collect-folder-names-filter |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2155 "-recurse" "-fast")))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2156 |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2157 (defun mh-collect-folder-names-filter (process output) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2158 "Read folder names. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2159 PROCESS is the flists process that was run to collect folder |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2160 names and the function is called when OUTPUT is available." |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2161 (let ((position 0) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2162 (prevailing-match-data (match-data)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2163 line-end folder) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2164 (unwind-protect |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2165 (while (setq line-end (string-match "\n" output position)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2166 (setq folder (format "+%s%s" |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2167 mh-flists-partial-line |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2168 (substring output position line-end))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2169 (setq mh-flists-partial-line "") |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2170 (unless (equal (aref folder 1) ?.) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2171 (mh-populate-sub-folders-cache folder)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2172 (setq position (1+ line-end))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2173 (set-match-data prevailing-match-data)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2174 (setq mh-flists-partial-line (substring output position)))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2175 |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2176 (defun mh-populate-sub-folders-cache (folder) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2177 "Tell `mh-sub-folders-cache' about FOLDER." |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2178 (let* ((last-slash (mh-search-from-end ?/ folder)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2179 (child1 (substring folder (1+ (or last-slash 0)))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2180 (parent (and last-slash (substring folder 0 last-slash))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2181 (parent-slash (and parent (mh-search-from-end ?/ parent))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2182 (child2 (and parent (substring parent (1+ (or parent-slash 0))))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2183 (grand-parent (and parent-slash (substring parent 0 parent-slash))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2184 (cache-entry (gethash parent mh-sub-folders-cache))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2185 (unless (loop for x in cache-entry when (equal (car x) child1) return t |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2186 finally return nil) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2187 (push (list child1) cache-entry) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2188 (setf (gethash parent mh-sub-folders-cache) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2189 (sort cache-entry (lambda (x y) (string< (car x) (car y))))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2190 (when parent |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2191 (loop for x in (gethash grand-parent mh-sub-folders-cache) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2192 when (equal (car x) child2) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2193 do (progn (setf (cdr x) t) (return))))))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2194 |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2195 (defun mh-normalize-folder-name (folder &optional empty-string-okay |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2196 dont-remove-trailing-slash) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2197 "Normalizes FOLDER name. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2198 |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2199 Makes sure that two '/' characters never occur next to each |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2200 other. Also all occurrences of \"..\" and \".\" are suitably |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2201 processed. So \"+inbox/../news\" will be normalized to \"+news\". |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2202 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2203 If optional argument EMPTY-STRING-OKAY is nil then a '+' is added |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2204 at the front if FOLDER lacks one. If non-nil and FOLDER is the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2205 empty string then nothing is added. |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2206 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2207 If optional argument DONT-REMOVE-TRAILING-SLASH is non-nil then a |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2208 trailing '/' if present is retained (if present), otherwise it is |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2209 removed." |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2210 (when (stringp folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2211 ;; Replace two or more consecutive '/' characters with a single '/' |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2212 (while (string-match "//" folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2213 (setq folder (replace-match "/" nil t folder))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2214 (let* ((length (length folder)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2215 (trailing-slash-present (and (> length 0) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2216 (equal (aref folder (1- length)) ?/))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2217 (leading-slash-present (and (> length 0) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2218 (equal (aref folder 0) ?/)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2219 (when (and (> length 0) (equal (aref folder 0) ?@) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2220 (stringp mh-current-folder-name)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2221 (setq folder (format "%s/%s/" mh-current-folder-name |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2222 (substring folder 1)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2223 ;; XXX: Purge empty strings from the list that split-string returns. In |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2224 ;; XEmacs, (split-string "+foo/" "/") returns ("+foo" "") while in GNU |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2225 ;; Emacs it returns ("+foo"). In the code it is assumed that the |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2226 ;; components list has no empty strings. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2227 (let ((components (delete "" (split-string folder "/"))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2228 (result ())) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2229 ;; Remove .. and . from the pathname. |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2230 (dolist (component components) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2231 (cond ((and (equal component "..") result) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2232 (pop result)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2233 ((equal component "..")) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2234 ((equal component ".")) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2235 (t (push component result)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2236 (setq folder "") |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2237 (dolist (component result) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2238 (setq folder (concat component "/" folder))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2239 ;; Remove trailing '/' if needed. |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2240 (unless (and trailing-slash-present dont-remove-trailing-slash) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2241 (when (not (equal folder "")) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2242 (setq folder (substring folder 0 (1- (length folder)))))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2243 (when leading-slash-present |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2244 (setq folder (concat "/" folder))))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2245 (cond ((and empty-string-okay (equal folder ""))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2246 ((equal folder "") (setq folder "+")) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2247 ((not (equal (aref folder 0) ?+)) (setq folder (concat "+" folder))))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2248 folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2249 |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2250 (defun mh-sub-folders (folder &optional add-trailing-slash-flag) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2251 "Find the subfolders of FOLDER. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2252 The function avoids running folders unnecessarily by caching the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2253 results of the actual folders call. |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2254 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2255 If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2256 slash is added to each of the sub-folder names that may have |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2257 nested folders within them." |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2258 (let* ((folder (mh-normalize-folder-name folder)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2259 (match (gethash folder mh-sub-folders-cache 'no-result)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2260 (sub-folders (cond ((eq match 'no-result) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2261 (setf (gethash folder mh-sub-folders-cache) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2262 (mh-sub-folders-actual folder))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2263 (t match)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2264 (if add-trailing-slash-flag |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2265 (mapcar #'(lambda (x) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2266 (if (cdr x) (cons (concat (car x) "/") (cdr x)) x)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2267 sub-folders) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2268 sub-folders))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2269 |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2270 (defun mh-sub-folders-actual (folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2271 "Execute the command folders to return the sub-folders of FOLDER. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2272 Filters out the folder names that start with \".\" so that |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2273 directories that aren't usually mail folders are hidden." |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2274 (let ((arg-list `(,(expand-file-name "folders" mh-progs) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2275 nil (t nil) nil "-noheader" "-norecurse" "-nototal" |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2276 ,@(if (stringp folder) (list folder) ()))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2277 (results ()) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2278 (current-folder (concat |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2279 (with-temp-buffer |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2280 (call-process (expand-file-name "folder" mh-progs) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2281 nil '(t nil) nil "-fast") |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2282 (buffer-substring (point-min) (1- (point-max)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2283 "+"))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2284 (with-temp-buffer |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2285 (apply #'call-process arg-list) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2286 (goto-char (point-min)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2287 (while (not (and (eolp) (bolp))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2288 (goto-char (line-end-position)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2289 (let ((start-pos (line-beginning-position)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2290 (has-pos (search-backward " has " (line-beginning-position) t))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2291 (when (integerp has-pos) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2292 (while (equal (char-after has-pos) ? ) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2293 (decf has-pos)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2294 (incf has-pos) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2295 (while (equal (char-after start-pos) ? ) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2296 (incf start-pos)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2297 (let* ((name (buffer-substring start-pos has-pos)) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2298 (first-char (aref name 0)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2299 (last-char (aref name (1- (length name))))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2300 (unless (member first-char '(?. ?# ?,)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2301 (when (and (equal last-char ?+) (equal name current-folder)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2302 (setq name (substring name 0 (1- (length name))))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2303 (push |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2304 (cons name |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2305 (search-forward "(others)" (line-end-position) t)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2306 results)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2307 (forward-line 1)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2308 (setq results (nreverse results)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2309 (when (stringp folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2310 (setq results (cdr results)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2311 (let ((folder-name-len (length (format "%s/" (substring folder 1))))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2312 (setq results (mapcar (lambda (f) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2313 (cons (substring (car f) folder-name-len) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2314 (cdr f))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2315 results)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2316 results)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2317 |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2318 (defun mh-remove-from-sub-folders-cache (folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2319 "Remove FOLDER and its parent from `mh-sub-folders-cache'. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2320 FOLDER should be unconditionally removed from the cache. Also the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2321 last ancestor of FOLDER present in the cache must be removed as |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2322 well. |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2323 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2324 To see why this is needed assume we have a folder +foo which has |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2325 a single sub-folder qux. Now we create the folder +foo/bar/baz. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2326 Here we will need to invalidate the cached sub-folders of +foo, |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2327 otherwise completion on +foo won't tell us about the option |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2328 +foo/bar!" |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2329 (remhash folder mh-sub-folders-cache) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2330 (block ancestor-found |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2331 (let ((parent folder) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2332 (one-ancestor-found nil) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2333 last-slash) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2334 (while (setq last-slash (mh-search-from-end ?/ parent)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2335 (setq parent (substring parent 0 last-slash)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2336 (unless (eq (gethash parent mh-sub-folders-cache 'none) 'none) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2337 (remhash parent mh-sub-folders-cache) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2338 (if one-ancestor-found |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2339 (return-from ancestor-found) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2340 (setq one-ancestor-found t)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2341 (remhash nil mh-sub-folders-cache)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2342 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2343 (defvar mh-folder-hist nil) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2344 |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2345 ;; Shush compiler. |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2346 (eval-when-compile |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2347 (defvar mh-speed-folder-map) |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2348 (defvar mh-speed-flists-cache)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2349 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2350 (defvar mh-allow-root-folder-flag nil |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2351 "Non-nil means \"+\" is an acceptable folder name. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2352 This variable is used to communicate with |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2353 `mh-folder-completion-function'. That function can have exactly |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2354 three arguments so we bind this variable to t or nil. |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2355 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2356 This variable should never be set.") |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2357 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2358 (defvar mh-folder-completion-map (copy-keymap minibuffer-local-completion-map)) |
67852
5b7ceef33307
(mh-process-daemon): Don't change buffer in proc-filter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67760
diff
changeset
|
2359 (define-key mh-folder-completion-map " " 'minibuffer-complete) ;Why??? |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2360 |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2361 (defvar mh-speed-flists-inhibit-flag nil) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2362 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2363 (defun mh-speed-flists-active-p () |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2364 "Check if speedbar is running with message counts enabled." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2365 (and (featurep 'mh-speed) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2366 (not mh-speed-flists-inhibit-flag) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2367 (> (hash-table-count mh-speed-flists-cache) 0))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2368 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2369 (defun mh-folder-completion-function (name predicate flag) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2370 "Programmable completion for folder names. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2371 NAME is the partial folder name that has been input. PREDICATE if |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2372 non-nil is a function that is used to filter the possible choices |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2373 and FLAG determines whether the completion is over." |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2374 (let* ((orig-name name) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2375 (name (mh-normalize-folder-name name nil t)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2376 (last-slash (mh-search-from-end ?/ name)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2377 (last-complete (if last-slash (substring name 0 last-slash) nil)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2378 (remainder (cond (last-complete (substring name (1+ last-slash))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2379 ((and (> (length name) 0) (equal (aref name 0) ?+)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2380 (substring name 1)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2381 (t "")))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2382 (cond ((eq flag nil) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2383 (let ((try-res (try-completion |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2384 name |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2385 (mapcar (lambda (x) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2386 (cons (if (not last-complete) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2387 (concat "+" (car x)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2388 (concat last-complete "/" (car x))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2389 (cdr x))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2390 (mh-sub-folders last-complete t)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2391 predicate))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2392 (cond ((eq try-res nil) nil) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2393 ((and (eq try-res t) (equal name orig-name)) t) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2394 ((eq try-res t) name) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2395 (t try-res)))) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2396 ((eq flag t) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2397 (all-completions |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2398 remainder (mh-sub-folders last-complete t) predicate)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2399 ((eq flag 'lambda) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2400 (let ((path (concat mh-user-path |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2401 (substring (mh-normalize-folder-name name) 1)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2402 (cond (mh-allow-root-folder-flag (file-exists-p path)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2403 ((equal path mh-user-path) nil) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2404 (t (file-exists-p path)))))))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2405 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2406 (defun mh-folder-completing-read (prompt default allow-root-folder-flag) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2407 "Read folder name with PROMPT and default result DEFAULT. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2408 If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2409 a folder name corresponding to `mh-user-path'." |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2410 (mh-normalize-folder-name |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2411 (let ((minibuffer-completing-file-name t) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2412 (completion-root-regexp "^[+/]") |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2413 (minibuffer-local-completion-map mh-folder-completion-map) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2414 (mh-allow-root-folder-flag allow-root-folder-flag)) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2415 (completing-read prompt 'mh-folder-completion-function nil nil nil |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2416 'mh-folder-hist default)) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2417 t)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2418 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2419 (defun mh-prompt-for-folder (prompt default can-create |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2420 &optional default-string allow-root-folder-flag) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2421 "Prompt for a folder name with PROMPT. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2422 Returns the folder's name as a string. DEFAULT is used if the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2423 folder exists and the user types return. If the CAN-CREATE flag |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2424 is t, then a folder is created if it doesn't already exist. If |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2425 optional argument DEFAULT-STRING is non-nil, use it in the prompt |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2426 instead of DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is non-nil then the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2427 function will accept the folder +, which means all folders when |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2428 used in searching." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2429 (if (null default) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2430 (setq default "")) |
65681
4312387e37c8
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
64085
diff
changeset
|
2431 (let* ((default-string (cond (default-string (format " (default %s)" default-string)) |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2432 ((equal "" default) "") |
65681
4312387e37c8
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
64085
diff
changeset
|
2433 (t (format " (default %s)" default)))) |
4312387e37c8
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
64085
diff
changeset
|
2434 (prompt (format "%s folder%s: " prompt default-string)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2435 (mh-current-folder-name mh-current-folder) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2436 read-name folder-name) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2437 (while (and (setq read-name (mh-folder-completing-read |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2438 prompt default allow-root-folder-flag)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2439 (equal read-name "") |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2440 (equal default ""))) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2441 (cond ((or (equal read-name "") |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2442 (and (equal read-name "+") (not allow-root-folder-flag))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2443 (setq read-name default)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2444 ((not (mh-folder-name-p read-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2445 (setq read-name (format "+%s" read-name)))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2446 (if (or (not read-name) (equal "" read-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2447 (error "No folder specified")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2448 (setq folder-name read-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2449 (cond ((and (> (length folder-name) 0) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2450 (eq (aref folder-name (1- (length folder-name))) ?/)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2451 (setq folder-name (substring folder-name 0 -1)))) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2452 (let* ((last-slash (mh-search-from-end ?/ folder-name)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2453 (parent (and last-slash (substring folder-name 0 last-slash))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2454 (child (if last-slash |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2455 (substring folder-name (1+ last-slash)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2456 (substring folder-name 1)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2457 (unless (member child |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2458 (mapcar #'car (gethash parent mh-sub-folders-cache))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2459 (mh-remove-from-sub-folders-cache folder-name))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2460 (let ((new-file-flag |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2461 (not (file-exists-p (mh-expand-file-name folder-name))))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2462 (cond ((and new-file-flag |
67857
226904e7d40b
(mh-prompt-for-folder): Use can-create argument to suppress creation
Bill Wohler <wohler@newt.com>
parents:
67852
diff
changeset
|
2463 can-create |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2464 (y-or-n-p |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2465 (format "Folder %s does not exist. Create it? " |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2466 folder-name))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2467 (message "Creating %s" folder-name) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2468 (mh-exec-cmd-error nil "folder" folder-name) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2469 (mh-remove-from-sub-folders-cache folder-name) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2470 (when (boundp 'mh-speed-folder-map) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2471 (mh-speed-add-folder folder-name)) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2472 (message "Creating %s...done" folder-name)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2473 (new-file-flag |
67857
226904e7d40b
(mh-prompt-for-folder): Use can-create argument to suppress creation
Bill Wohler <wohler@newt.com>
parents:
67852
diff
changeset
|
2474 (error "Folder %s does not exist" folder-name)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2475 ((not (file-directory-p (mh-expand-file-name folder-name))) |
68013
bbc0e52abce5
* mh-alias.el (mh-alias-add-alias): Grand message and error string
Bill Wohler <wohler@newt.com>
parents:
67988
diff
changeset
|
2476 (error "%s is not a directory" |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2477 (mh-expand-file-name folder-name))))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2478 folder-name)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2479 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2480 (defun mh-truncate-log-buffer () |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2481 "If `mh-log-buffer' is too big then truncate it. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2482 If the number of lines in `mh-log-buffer' exceeds |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2483 `mh-log-buffer-lines' then keep only the last |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2484 `mh-log-buffer-lines'. As a side effect the point is set to the |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2485 end of the log buffer. |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2486 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2487 The function returns the size of the final size of the log buffer." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2488 (with-current-buffer (get-buffer-create mh-log-buffer) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2489 (goto-char (point-max)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2490 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2491 (when (equal (forward-line (- mh-log-buffer-lines)) 0) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2492 (delete-region (point-min) (point)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2493 (unless (or (bobp) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2494 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2495 (and (equal (forward-line -1) 0) (equal (char-after) ?)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2496 (insert "\n\n")) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2497 (buffer-size))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2498 |
67681 | 2499 |
2500 | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2501 ;;; Issue commands to MH. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2502 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2503 (defun mh-exec-cmd (command &rest args) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2504 "Execute mh-command COMMAND with ARGS. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2505 The side effects are what is desired. Any output is assumed to be |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2506 an error and is shown to the user. The output is not read or |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2507 parsed by MH-E." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2508 (save-excursion |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2509 (set-buffer (get-buffer-create mh-log-buffer)) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2510 (let* ((initial-size (mh-truncate-log-buffer)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2511 (start (point)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2512 (args (mh-list-to-string args))) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2513 (apply 'call-process (expand-file-name command mh-progs) nil t nil args) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2514 (when (> (buffer-size) initial-size) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2515 (save-excursion |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2516 (goto-char start) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2517 (insert "Errors when executing: " command) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2518 (loop for arg in args do (insert " " arg)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2519 (insert "\n")) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2520 (save-window-excursion |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2521 (switch-to-buffer-other-window mh-log-buffer) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2522 (sit-for 5)))))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2523 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2524 (defun mh-exec-cmd-error (env command &rest args) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2525 "In environment ENV, execute mh-command COMMAND with ARGS. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2526 ENV is nil or a string of space-separated \"var=value\" elements. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2527 Signals an error if process does not complete successfully." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2528 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2529 (set-buffer (get-buffer-create mh-temp-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2530 (erase-buffer) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2531 (let ((process-environment process-environment)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2532 ;; XXX: We should purge the list that split-string returns of empty |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2533 ;; strings. This can happen in XEmacs if leading or trailing spaces |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2534 ;; are present. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2535 (dolist (elem (if (stringp env) (split-string env " ") ())) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2536 (push elem process-environment)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2537 (mh-handle-process-error |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2538 command (apply #'call-process (expand-file-name command mh-progs) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2539 nil t nil (mh-list-to-string args)))))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2540 |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2541 (defun mh-exec-cmd-daemon (command filter &rest args) |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2542 "Execute MH command COMMAND in the background. |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2543 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2544 If FILTER is non-nil then it is used to process the output |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2545 otherwise the default filter `mh-process-daemon' is used. See |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2546 `set-process-filter' for more details of FILTER. |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2547 |
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2548 ARGS are passed to COMMAND as command line arguments." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2549 (save-excursion |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2550 (set-buffer (get-buffer-create mh-log-buffer)) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2551 (mh-truncate-log-buffer)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2552 (let* ((process-connection-type nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2553 (process (apply 'start-process |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2554 command nil |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2555 (expand-file-name command mh-progs) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2556 (mh-list-to-string args)))) |
56406
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2557 (set-process-filter process (or filter 'mh-process-daemon)) |
d36b00b98db0
Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
52401
diff
changeset
|
2558 process)) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2559 |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2560 (defun mh-exec-cmd-env-daemon (env command filter &rest args) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2561 "In ennvironment ENV, execute mh-command COMMAND in the background. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2562 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2563 ENV is nil or a string of space-separated \"var=value\" elements. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2564 Signals an error if process does not complete successfully. |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2565 |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2566 If FILTER is non-nil then it is used to process the output |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2567 otherwise the default filter `mh-process-daemon' is used. See |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2568 `set-process-filter' for more details of FILTER. |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2569 |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2570 ARGS are passed to COMMAND as command line arguments." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2571 (let ((process-environment process-environment)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2572 (dolist (elem (if (stringp env) (split-string env " ") ())) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2573 (push elem process-environment)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2574 (apply #'mh-exec-cmd-daemon command filter args))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2575 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2576 (defun mh-process-daemon (process output) |
49578
b35587af8747
Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents:
49459
diff
changeset
|
2577 "PROCESS daemon that puts OUTPUT into a temporary buffer. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2578 Any output from the process is displayed in an asynchronous |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2579 pop-up window." |
67852
5b7ceef33307
(mh-process-daemon): Don't change buffer in proc-filter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67760
diff
changeset
|
2580 (with-current-buffer (get-buffer-create mh-log-buffer) |
5b7ceef33307
(mh-process-daemon): Don't change buffer in proc-filter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67760
diff
changeset
|
2581 (insert-before-markers output) |
5b7ceef33307
(mh-process-daemon): Don't change buffer in proc-filter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
67760
diff
changeset
|
2582 (display-buffer mh-log-buffer))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2583 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2584 (defun mh-exec-cmd-quiet (raise-error command &rest args) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2585 "Signal RAISE-ERROR if COMMAND with ARGS fails. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2586 Execute MH command COMMAND with ARGS. ARGS is a list of strings. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2587 Return at start of mh-temp buffer, where output can be parsed and |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2588 used. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2589 Returns value of `call-process', which is 0 for success, unless |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2590 RAISE-ERROR is non-nil, in which case an error is signaled if |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2591 `call-process' returns non-0." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2592 (set-buffer (get-buffer-create mh-temp-buffer)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2593 (erase-buffer) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2594 (let ((value |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2595 (apply 'call-process |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2596 (expand-file-name command mh-progs) nil t nil |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2597 args))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2598 (goto-char (point-min)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2599 (if raise-error |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2600 (mh-handle-process-error command value) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2601 value))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2602 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2603 (defun mh-profile-component (component) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2604 "Return COMPONENT value from mhparam, or nil if unset." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2605 (save-excursion |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2606 (mh-exec-cmd-quiet nil "mhparam" "-components" component) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2607 (mh-get-profile-field (concat component ":")))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2608 |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2609 (eval-when-compile (defvar mark-active)) ;shush compiler |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2610 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2611 (defun mh-exchange-point-and-mark-preserving-active-mark () |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2612 "Put the mark where point is now, and point where the mark is now. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2613 This command works even when the mark is not active, and |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2614 preserves whether the mark is active or not." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2615 (interactive nil) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2616 (let ((is-active (and (boundp 'mark-active) mark-active))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2617 (let ((omark (mark t))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2618 (if (null omark) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2619 (error "No mark set in this buffer")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2620 (set-mark (point)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2621 (goto-char omark) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2622 (if (boundp 'mark-active) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2623 (setq mark-active is-active)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2624 nil))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2625 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2626 (defun mh-exec-cmd-output (command display &rest args) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2627 "Execute MH command COMMAND with DISPLAY flag and ARGS. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2628 Put the output into buffer after point. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2629 Set mark after inserted text. |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2630 Output is expected to be shown to user, not parsed by MH-E." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2631 (push-mark (point) t) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2632 (apply 'call-process |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2633 (expand-file-name command mh-progs) nil t display |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2634 (mh-list-to-string args)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2635 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2636 ;; The following is used instead of 'exchange-point-and-mark because the |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2637 ;; latter activates the current region (between point and mark), which |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2638 ;; turns on highlighting. So prior to this bug fix, doing "inc" would |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2639 ;; highlight a region containing the new messages, which is undesirable. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2640 ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4. |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2641 (mh-exchange-point-and-mark-preserving-active-mark)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2642 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2643 (defun mh-exec-lib-cmd-output (command &rest args) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2644 "Execute MH library command COMMAND with ARGS. |
67758
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2645 Put the output into buffer after point. |
6b063593fdad
Follow Emacs coding conventions. Use default setting of
Bill Wohler <wohler@newt.com>
parents:
67756
diff
changeset
|
2646 Set mark after inserted text." |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2647 (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2648 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2649 (defun mh-handle-process-error (command status) |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2650 "Raise error if COMMAND returned non-zero STATUS, otherwise return STATUS." |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2651 (if (equal status 0) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2652 status |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2653 (goto-char (point-min)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2654 (insert (if (integerp status) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2655 (format "%s: exit code %d\n" command status) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2656 (format "%s: %s\n" command status))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2657 (save-excursion |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2658 (let ((error-message (buffer-substring (point-min) (point-max)))) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2659 (set-buffer (get-buffer-create mh-log-buffer)) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2660 (mh-truncate-log-buffer) |
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2661 (insert error-message))) |
68013
bbc0e52abce5
* mh-alias.el (mh-alias-add-alias): Grand message and error string
Bill Wohler <wohler@newt.com>
parents:
67988
diff
changeset
|
2662 (error "%s failed, check buffer %s for error message" |
50702
7dd3d5eae9c7
Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
49598
diff
changeset
|
2663 command mh-log-buffer))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2664 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2665 (defun mh-list-to-string (l) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2666 "Flatten the list L and make every element of the new list into a string." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2667 (nreverse (mh-list-to-string-1 l))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2668 |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2669 (defun mh-list-to-string-1 (l) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2670 "Flatten the list L and make every element of the new list into a string." |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2671 (let ((new-list nil)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2672 (while l |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2673 (cond ((null (car l))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2674 ((symbolp (car l)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2675 (setq new-list (cons (symbol-name (car l)) new-list))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2676 ((numberp (car l)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2677 (setq new-list (cons (int-to-string (car l)) new-list))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2678 ((equal (car l) "")) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2679 ((stringp (car l)) (setq new-list (cons (car l) new-list))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2680 ((listp (car l)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2681 (setq new-list (nconc (mh-list-to-string-1 (car l)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2682 new-list))) |
68013
bbc0e52abce5
* mh-alias.el (mh-alias-add-alias): Grand message and error string
Bill Wohler <wohler@newt.com>
parents:
67988
diff
changeset
|
2683 (t (error "Bad element in `mh-list-to-string': %s" (car l)))) |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2684 (setq l (cdr l))) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2685 new-list)) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2686 |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2687 (defun mh-replace-string (old new) |
68096
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2688 "Replace all occurrences of OLD with NEW in the current buffer. |
57c4e7929f99
* mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string
Bill Wohler <wohler@newt.com>
parents:
68013
diff
changeset
|
2689 Ignores case when searching for OLD." |
56673
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2690 (goto-char (point-min)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2691 (let ((case-fold-search t)) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2692 (while (search-forward old nil t) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2693 (replace-match new t t)))) |
e9a6cbc8ca5e
Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
56406
diff
changeset
|
2694 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2695 (provide 'mh-utils) |
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2696 |
67681 | 2697 ;; Local Variables: |
2698 ;; indent-tabs-mode: nil | |
2699 ;; sentence-end-double-space: nil | |
2700 ;; End: | |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2701 |
67681 | 2702 ;; arch-tag: 1af39fdf-f66f-4b06-9b48-18a7656c8e36 |
49459
06b77df47802
* mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff
changeset
|
2703 ;;; mh-utils.el ends here |