Mercurial > emacs
annotate lisp/mail/mh-utils.el @ 48985:dae8bb57e633
(find-file-noselect-1): Kill local value of `cursor-type'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 Dec 2002 21:23:58 +0000 |
parents | 8aaba207e44b |
children | 30c4902b654d |
rev | line source |
---|---|
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1 ;;; mh-utils.el --- MH-E code needed for both sending and reading |
6365 | 2 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
3 ;; Copyright (C) 1993, 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
4 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
5 ;; Author: Bill Wohler <wohler@newt.com> |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
6 ;; Maintainer: Bill Wohler <wohler@newt.com> |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
7 ;; Keywords: mail |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
8 ;; See: mh-e.el |
6365 | 9 |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37178
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
6365 | 11 |
11333 | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
6365 | 13 ;; it under the terms of the GNU General Public License as published by |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
11333 | 17 ;; GNU Emacs is distributed in the hope that it will be useful, |
6365 | 18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
14169 | 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
25 ;; Boston, MA 02111-1307, USA. | |
6365 | 26 |
27 ;;; Commentary: | |
28 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
29 ;; Internal support for MH-E package. |
6365 | 30 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
31 ;;; Change Log: |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
32 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
33 ;; $Id: mh-utils.el,v 1.177 2002/11/22 20:00:47 satyaki Exp $ |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
34 |
6365 | 35 ;;; Code: |
36 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
37 (require 'cl) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
38 (require 'gnus-util) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
39 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
40 ;; Shush the byte-compiler |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
41 (defvar font-lock-auto-fontify) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
42 (defvar font-lock-defaults) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
43 (defvar mark-active) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
44 (defvar tool-bar-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
45 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
46 (load "mm-decode" t t) ; Non-fatal dependency |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
47 (load "mm-view" t t) ; Non-fatal dependency |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
48 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
49 (load "executable" t t) ; Non-fatal dependency on |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
50 ; executable-find |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
51 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
52 ;;; Autoload mh-seq |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
53 (autoload 'mh-add-to-sequence "mh-seq") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
54 (autoload 'mh-notate-seq "mh-seq") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
55 (autoload 'mh-read-seq-default "mh-seq") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
56 (autoload 'mh-map-to-seq-msgs "mh-seq") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
57 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
58 ;;; Autoload mh-e |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
59 (autoload 'mh-goto-cur-msg "mh-e") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
60 (autoload 'mh-update-sequences "mh-e") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
61 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
62 ;;; Autoload mh-mime |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
63 (autoload 'mh-add-missing-mime-version-header "mh-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
64 (autoload 'mh-mime-cleanup "mh-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
65 (autoload 'mh-buffer-data "mh-mime" nil nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
66 (autoload 'mh-make-buffer-data "mh-mime" nil nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
67 (autoload 'mh-mime-display "mh-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
68 (autoload 'mh-display-smileys "mh-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
69 (autoload 'mh-display-emphasis "mh-mime") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
70 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
71 ;;; Autoload mh-index |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
72 (autoload 'mh-index-search "mh-index" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
73 "Perform an indexed search in an MH mail folder. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
74 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
75 FOLDER is searched with SEARCH-REGEXP and the results are presented in an MH-E |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
76 folder. If FOLDER is \"+\" then mail in all folders are searched. Optional |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
77 prefix argument NEW-BUFFER-FLAG decides whether the results are presented in a |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
78 new buffer. This allows multiple search results to coexist. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
79 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
80 Four indexing programs are supported; if none of these are present, then grep |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
81 is used. This function picks the first program that is available on your |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
82 system. If you would prefer to use a different program, set the customization |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
83 variable `mh-index-program' accordingly. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
84 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
85 The documentation for the following functions describes how to generate the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
86 index for each program: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
87 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
88 - `mh-swish++-execute-search' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
89 - `mh-swish-execute-search' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
90 - `mh-namazu-execute-search' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
91 - `mh-glimpse-execute-search'" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
92 t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
93 ;;; These are here since their docstrings are needed before loading mh-index. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
94 (autoload 'mh-swish++-execute-search "mh-index" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
95 "Execute swish++ and read the results. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
96 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
97 In the examples below, replace /home/user/Mail with the path to your MH |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
98 directory. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
99 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
100 First create the directory /home/user/Mail/.swish++. Then create the file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
101 /home/user/Mail/.swish++/swish++.conf with the following contents: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
102 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
103 IncludeMeta Bcc Cc Comments Content-Description From Keywords |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
104 IncludeMeta Newsgroups Resent-To Subject To |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
105 IncludeFile Mail [0-9]* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
106 IndexFile /home/user/Mail/.swish++/swish++.index |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
107 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
108 Use the following command line to generate the swish index. Run this |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
109 daily from cron: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
110 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
111 index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
112 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
113 On some systems (Debian GNU/Linux, for example), use index++ instead of index. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
114 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
115 FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
116 t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
117 (autoload 'mh-swish-execute-search "mh-index" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
118 "Execute swish-e and read the results. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
119 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
120 In the examples below, replace /home/user/Mail with the path to your MH |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
121 directory. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
122 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
123 First create the directory /home/user/Mail/.swish. Then create the file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
124 /home/user/Mail/.swish/config with the following contents: |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
125 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
126 IndexDir /home/user/Mail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
127 IndexFile /home/user/Mail/.swish/index |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
128 IndexName \"Mail Index\" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
129 IndexDescription \"Mail Index\" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
130 IndexPointer \"http://nowhere\" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
131 IndexAdmin \"nobody\" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
132 #MetaNames automatic |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
133 IndexReport 3 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
134 FollowSymLinks no |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
135 UseStemming no |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
136 IgnoreTotalWordCountWhenRanking yes |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
137 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
138 BeginCharacters abcdefghijklmnopqrstuvwxyz |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
139 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
140 IgnoreLimit 50 1000 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
141 IndexComments 0 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
142 FileRules pathname contains /home/user/Mail/.swish |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
143 FileRules filename is index |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
144 FileRules filename is \..* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
145 FileRules filename is #.* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
146 FileRules filename is ,.* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
147 FileRules filename is .*~ |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
148 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
149 If there are any directories you would like to ignore, append lines like the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
150 following to config: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
151 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
152 FileRules pathname contains /home/user/Mail/scripts |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
153 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
154 Use the following command line to generate the swish index. Run this |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
155 daily from cron: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
156 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
157 swish-e -c /home/user/Mail/.swish/config |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
158 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
159 FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
160 t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
161 (autoload 'mh-namazu-execute-search "mh-index" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
162 "Execute namazu and read the results. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
163 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
164 In the examples below, replace /home/user/Mail with the path to your MH |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
165 directory. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
166 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
167 First create the directory /home/user/Mail/.namazu. Then create the file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
168 /home/user/Mail/.namazu/mknmzrc with the following contents: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
169 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
170 package conf; # Don't remove this line! |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
171 $ADDRESS = 'user@localhost'; |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
172 $ALLOW_FILE = \"[0-9]*\"; |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
173 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
174 Use the following command line to generate the namazu index. Run this |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
175 daily from cron: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
176 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
177 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
178 /home/user/Mail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
179 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
180 FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
181 t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
182 (autoload 'mh-glimpse-execute-search "mh-index" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
183 "Execute glimpse and read the results. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
184 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
185 In the examples below, replace /home/user/Mail with the path to your MH |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
186 directory. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
187 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
188 First create the directory /home/user/Mail/.glimpse. Then create the file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
189 /home/user/Mail/.glimpse/.glimpse_exclude with the following contents: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
190 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
191 */.* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
192 */#* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
193 */,* |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
194 */*~ |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
195 ^/home/user/Mail/.glimpse |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
196 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
197 If there are any directories you would like to ignore, append lines like the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
198 following to .glimpse_exclude: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
199 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
200 ^/home/user/Mail/scripts |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
201 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
202 Use the following command line to generate the glimpse index. Run this |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
203 daily from cron: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
204 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
205 glimpseindex -H /home/user/Mail/.glimpse /home/user/Mail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
206 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
207 FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
208 t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
209 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
210 ;;; Autoload mh-speed |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
211 (autoload 'mh-speed-add-folder "mh-speed") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
212 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
213 ;;; Autoload mh-comp |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
214 (autoload 'mh-reply "mh-comp" nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
215 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
216 ;;; Other Autoloads |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
217 (autoload 'gnus-article-highlight-citation "gnus-cite") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
218 (autoload 'mail-header-end "sendmail") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
219 (autoload 'Info-goto-node "info") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
220 (autoload 'font-lock-default-fontify-region "font-lock") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
221 (unless (fboundp 'make-hash-table) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
222 (autoload 'make-hash-table "cl")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
223 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
224 ;; Is this XEmacs-land? |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
225 (defvar mh-xemacs-flag (featurep 'xemacs) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
226 "Non-nil means the current Emacs is XEmacs.") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
227 |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
228 ;;; Set for local environment: |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
229 ;;; mh-progs and mh-lib used to be set in paths.el, which tried to |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
230 ;;; figure out at build time which of several possible directories MH |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
231 ;;; was installed into. But if you installed MH after building Emacs, |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
232 ;;; this would almost certainly be wrong, so now we do it at run time. |
6365 | 233 |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
234 (defvar mh-progs nil |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
235 "Directory containing MH commands, such as inc, repl, and rmm.") |
6365 | 236 |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
237 (defvar mh-lib nil |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
238 "Directory containing the MH library. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
239 This directory contains, among other things, the components file.") |
24420 | 240 |
241 (defvar mh-lib-progs nil | |
242 "Directory containing MH helper programs. | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
243 This directory contains, among other things, the mhl program.") |
24420 | 244 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
245 (defvar mh-nmh-flag nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
246 "Non-nil means nmh is installed on this system instead of MH.") |
6365 | 247 |
11331 | 248 ;;;###autoload |
249 (put 'mh-progs 'risky-local-variable t) | |
250 ;;;###autoload | |
251 (put 'mh-lib 'risky-local-variable t) | |
24420 | 252 ;;;###autoload |
253 (put 'mh-lib-progs 'risky-local-variable t) | |
254 ;;;###autoload | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
255 (put 'mh-nmh-flag 'risky-local-variable t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
256 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
257 ;;; Macro to generate correct code for different emacs variants |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
258 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
259 (defmacro mh-mark-active-p (check-transient-mark-mode-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
260 "A macro that expands into appropriate code in XEmacs and nil in GNU Emacs. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
261 In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
262 variable `transient-mark-mode' is active." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
263 (cond (mh-xemacs-flag ;XEmacs |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
264 `(and (boundp 'zmacs-regions) zmacs-regions (region-active-p))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
265 ((not check-transient-mark-mode-flag) ;GNU Emacs |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
266 `(and (boundp 'mark-active) mark-active)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
267 (t ;GNU Emacs |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
268 `(and (boundp 'transient-mark-mode) transient-mark-mode |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
269 (boundp 'mark-active) mark-active)))) |
11331 | 270 |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
271 ;;; User preferences: |
6365 | 272 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
273 (defgroup mh-buffer nil |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
274 "Layout of MH-E buffers" |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
275 :prefix "mh-" |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
276 :group 'mh) |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
277 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
278 (defcustom mh-tool-bar-reply-3-buttons-flag nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
279 "*Non-nil means use three buttons for reply commands in tool-bar. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
280 If you have room on your tool-bar because you are using a large font, you |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
281 may set this variable to expand the single reply button into three buttons |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
282 that won't lead to minibuffer prompt about who to reply to." |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
283 :type 'boolean |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
284 :group 'mh) |
6365 | 285 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
286 (defcustom mh-tool-bar-search-function 'mh-search-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
287 "*Function called by the tool-bar search button. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
288 See `mh-search-folder' and `mh-index-search' for details." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
289 :type '(choice (const mh-search-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
290 (const mh-index-search) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
291 (function :tag "Other function")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
292 :group 'mh) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
293 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
294 (defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
295 "*Non-nil means that Gnus is used to show MIME attachments with Gnus." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
296 :type 'boolean |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
297 :group 'mh-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
298 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
299 (defcustom mh-auto-folder-collect-flag t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
300 "*Non-nil means immediate collect folder names in the background. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
301 If t, MH-E should start a background process to collect the names of all |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
302 folders as soon as MH-E is first used." |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
303 :type 'boolean |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
304 :group 'mh) |
6365 | 305 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
306 (defcustom mh-recursive-folders-flag nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
307 "*Non-nil means that commands which operate on folders do so recursively." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
308 :type 'boolean |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
309 :group 'mh) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
310 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
311 (defcustom mh-adaptive-cmd-note-flag t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
312 "*Non-nil means that the message number width is determined dynamically. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
313 This is done once when a folder is first opened by running scan on the last |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
314 message of the folder. The message number for the last message is extracted |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
315 and its width calculated. This width is used when calling `mh-set-cmd-note'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
316 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
317 If you prefer fixed-width message numbers, set this variable to nil and call |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
318 `mh-set-cmd-note' with the width specified by the scan format in |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
319 `mh-scan-format-file'. For example, the default width is 4, so you would use |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
320 \"(mh-set-cmd-note 4)\" if `mh-scan-format-file' were nil." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
321 :type 'boolean |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
322 :group 'mh) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
323 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
324 (defcustom mh-clean-message-header-flag t |
6365 | 325 "*Non-nil means clean headers of messages that are displayed or inserted. |
326 The variables `mh-visible-headers' and `mh-invisible-headers' control what | |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
327 is removed." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
328 :type 'boolean |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
329 :group 'mh-buffer) |
6365 | 330 |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
331 (defcustom mh-visible-headers nil |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
332 "*Contains a regexp specifying the headers to keep when cleaning. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
333 Only used if `mh-clean-message-header-flag' is non-nil. Setting this variable |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
334 overrides `mh-invisible-headers'." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
335 :type '(choice (const nil) regexp) |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
336 :group 'mh-buffer) |
6365 | 337 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
338 (defcustom mh-show-use-xface-flag (and window-system |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
339 (not (null (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
340 (mh-xemacs-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
341 (locate-library "x-face")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
342 ((>= emacs-major-version 21) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
343 (locate-library "x-face-e21")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
344 (t ;Emacs20 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
345 nil)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
346 (not (null (and (fboundp 'executable-find) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
347 (executable-find |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
348 "uncompface"))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
349 "*Non-nil means display faces in `mh-show-mode' with external x-face package. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
350 It is available from ftp://ftp.jpl.org/pub/elisp/. Download it and put its |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
351 files in the Emacs `load-path' and MH-E will invoke it automatically for you if |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
352 this variable is non-nil. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
353 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
354 The `uncompface' binary is also required to be in the execute PATH. It can |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
355 be obtained from: ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
356 :type 'boolean |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
357 :group 'mh-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
358 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
359 (defcustom mh-show-maximum-size 0 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
360 "*Maximum size of message (in bytes) to display automatically. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
361 Provides an opportunity to skip over large messages which may be slow to load. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
362 Use a value of 0 to display all messages automatically regardless of size." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
363 :type 'integer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
364 :group 'mh-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
365 |
6365 | 366 (defvar mh-invisible-headers |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
367 (concat |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
368 "^" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
369 (let ((max-specpdl-size 1000)) ;workaround for insufficient default |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
370 (regexp-opt |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
371 (append |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
372 (if (not mh-show-use-xface-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
373 '("X-Face: ")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
374 '( ;; RFC 822 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
375 "Received: " "Message-Id: " "Return-Path: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
376 ;; RFC 2045 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
377 "Mime-Version" "Content-" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
378 ;; sendmail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
379 "X-Authentication-Warning: " "X-MIME-Autoconverted: " "From " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
380 "Status: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
381 ;; X400 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
382 "X400-" "P1-Message-Id: " "Original-Encoded-Information-Types: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
383 "P1-Recipient: " "P1-Content-Type: " "Ua-Content-Id: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
384 ;; MH |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
385 "Resent" "Prev-Resent" "Forwarded: " "Replied: " "Delivery-Date: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
386 "In-Reply-To: " "Remailed-" "Via: " "Mail-from: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
387 ;; gnus |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
388 "X-Gnus-Mail-Source: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
389 ;; MS Outlook |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
390 "X-Priority: " "X-Msmail-" "X-MimeOLE: " "X-Apparently-From: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
391 "Importance: " "Sensitivity: " "X-MS-TNEF-Correlator: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
392 ;; Juno |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
393 "X-Juno-" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
394 ;; Hotmail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
395 "X-OriginalArrivalTime: " "X-Originating-IP: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
396 ;; Netscape/Mozilla |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
397 "X-Accept-Language: " "X-Mozilla-Status: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
398 ;; NTMail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
399 "X-Info: " "X-VSMLoop: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
400 ;; News |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
401 "NNTP-" "X-News: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
402 ;; Mailman mailing list manager |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
403 "List-" "X-Beenthere: " "X-Mailman-Version: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
404 ;; Egroups/yahoogroups mailing list manager |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
405 "X-eGroups-" "X-Apparently-To: " "Mailing-List: " "Delivered-To: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
406 ;; SourceForge mailing list manager |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
407 "X-Original-Date: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
408 ;; Unknown mailing list managers |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
409 "X-Mailing-List: " "X-Loop: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
410 "List-Subscribe: " "List-Unsubscribe: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
411 "X-List-Subscribe: " "X-List-Unsubscribe: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
412 "X-Listserver: " "List-" "X-List-Host: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
413 ;; Sieve filtering |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
414 "X-Sieve: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
415 ;; Spam |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
416 "X-Spam-Status: " "X-Spam-Level: " "X-Spam-Score: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
417 "X-SpamBouncer: " "X-SBClass: " "X-SBRule: " "X-SBNote: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
418 "X-SBPass: " "X-Folder: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
419 "X-Habeas-SWE-1: " "X-Habeas-SWE-2: " "X-Habeas-SWE-3: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
420 "X-Habeas-SWE-4: " "X-Habeas-SWE-5: " "X-Habeas-SWE-6: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
421 "X-Habeas-SWE-7: " "X-Habeas-SWE-8: " "X-Habeas-SWE-9: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
422 ;; Worldtalk gateways |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
423 "X-Wss-Id: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
424 ;; User added |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
425 "X-Qotd-" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
426 ;; Miscellaneous |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
427 "X-Sender: " "X-Ack: " "Errors-To: " "Precedence: " "X-Message-Id" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
428 "X-From-Line" "X-Cron-Env: " "Delivery: " "X-Delivered" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
429 "X-Received: " "X-Vms-To: " "Xref: " "X-Request-" "X-UIDL: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
430 "X-Orcl-Content-Type: " "X-Server-Uuid: " "X-Envelope-Sender: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
431 "X-Envelope-To: " "Encoding: " "Old-Return-Path: " "Path: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
432 "References: " "Lines: " "Autoforwarded: " "Bestservhost: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
433 "X-pgp: " "X-Accept-Language: " "Priority: " "User-Agent: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
434 "X-MIMETrack: " "X-Abuse-Info: " "X-Complaints-To: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
435 "X-No-Archive: " "X-Original-Complaints-To: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
436 "X-Original-Trace: " "X-Received-Date: " "X-Server-Date: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
437 "X-Trace: " "X-UserInfo1: " "X-submission-address: " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
438 "X-Scanned-By")) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
439 t))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
440 "*Regexp matching lines in a message header that are not to be shown. |
6365 | 441 If `mh-visible-headers' is non-nil, it is used instead to specify what |
442 to keep.") | |
443 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
444 ;;; Additional header fields that might someday be added: |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
445 ;;; "Sender: " "Reply-to: " |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
446 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
447 (defcustom mh-bury-show-buffer-flag t |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
448 "*Non-nil means that the displayed show buffer for a folder is buried." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
449 :type 'boolean |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
450 :group 'mh-buffer) |
6365 | 451 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
452 (defcustom mh-summary-height (or (and (fboundp 'frame-height) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
453 (> (frame-height) 24) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
454 (min 10 (/ (frame-height) 6))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
455 4) |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
456 "*Number of lines in MH-Folder window (including the mode line)." |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
457 :type 'integer |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
458 :group 'mh-buffer) |
6365 | 459 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
460 ;; Use goto-addr if it was already loaded (which probably sets this |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
461 ;; variable to t), or if this variable is otherwise set to t. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
462 (defcustom mh-show-use-goto-addr-flag (and (boundp 'goto-address-highlight-p) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
463 goto-address-highlight-p) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
464 "*Non-nil means URLs and e-mail addresses are highlighted using goto-addr while in `mh-show-mode'." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
465 :type 'boolean |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
466 :group 'mh-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
467 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
468 (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" |
6365 | 469 "Regexp to find the number of a message in a scan line. |
470 The message's number must be surrounded with \\( \\)") | |
471 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
472 (defvar mh-scan-msg-overflow-regexp "^\\?[0-9]" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
473 "Regexp to find a scan line in which the message number overflowed. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
474 The message's number is left truncated in this case.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
475 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
476 (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
477 "Regexp to find message number width in an scan format. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
478 The message number width must be surrounded with \\( \\).") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
479 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
480 (defvar mh-scan-msg-format-string "%d" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
481 "Format string for width of the message number in a scan format. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
482 Use `0%d' for zero-filled message numbers.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
483 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
484 (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" |
6365 | 485 "Format string containing a regexp matching the scan listing for a message. |
486 The desired message's number will be an argument to format.") | |
487 | |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
488 (defcustom mhl-formfile nil |
6365 | 489 "*Name of format file to be used by mhl to show and print messages. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
490 A value of t means use the default format file. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
491 nil means don't use mhl to format messages when showing; mhl is still used, |
6365 | 492 with the default format file, to format messages when printing them. |
493 The format used should specify a non-zero value for overflowoffset so | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
494 the message continues to conform to RFC 822 and MH-E can parse the headers." |
17426
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
495 :type '(choice (const nil) (const t) string) |
5c5fa38a1c79
Add defgroup; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17243
diff
changeset
|
496 :group 'mh) |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
497 (put 'mhl-formfile 'info-file "mh-e") |
6365 | 498 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
499 (defvar mh-decode-quoted-printable-have-mimedecode |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
500 (not (null (and (fboundp 'executable-find)(executable-find "mimedecode")))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
501 "Whether the mimedecode command is installed on the system. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
502 This sets the default value of variable `mh-decode-quoted-printable-flag' to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
503 determine whether quoted-printable MIME parts are decoded by the mimedecode |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
504 command when viewed in `mh-show'. The source code for mimedecode can be |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
505 obtained from http://www.freesoft.org/CIE/FAQ/mimedeco.c") |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
506 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
507 (defcustom mh-decode-quoted-printable-flag |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
508 mh-decode-quoted-printable-have-mimedecode |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
509 "Non-nil means decode quoted-printable MIME part using mimedecode. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
510 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
511 Determine whether to decode quoted-printable MIME parts in `mh-show' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
512 using mimedecode. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
513 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
514 Quoted printable content is translated to 8-bit characters in `mh-show' by |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
515 the gnus' mm-decode library if it is available. Otherwise (and for certain |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
516 cases mm-decode can't handle) this can be done using the 'mimedecode' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
517 command. Setting this variable indicates to use 'mimedecode' when |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
518 mm-decode is not available or as a helper to it. The source code for |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
519 mimedecode can usually be obtained from |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
520 http://www.freesoft.org/CIE/FAQ/mimedeco.c" |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
521 :type 'boolean |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
522 :group 'mh-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
523 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
524 (defcustom mh-update-sequences-after-mh-show-flag t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
525 "*Non-nil means `mh-update-sequence' is called from `mh-show-mode'. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
526 If set, `mh-update-sequence' is run every time a message is shown, telling |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
527 MH or nmh that this is your current message. It's useful, for example, to |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
528 display MIME content using \"M-! mhshow RET\"" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
529 :type 'boolean |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
530 :group 'mh-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
531 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
532 (defcustom mh-highlight-citation-p 'gnus |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
533 "How to highlight citations in show buffers. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
534 The gnus method uses a different color for each indentation." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
535 :type '(choice (const :tag "Use gnus" gnus) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
536 (const :tag "Use font-lock" font-lock) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
537 (const :tag "Don't fontify" nil)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
538 :group 'mh-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
539 |
11331 | 540 (defvar mh-default-folder-for-message-function nil |
541 "Function to select a default folder for refiling or Fcc. | |
542 If set to a function, that function is called with no arguments by | |
543 `\\[mh-refile-msg]' and `\\[mh-to-fcc]' to get a default when | |
544 prompting the user for a folder. The function is called from within a | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
545 `save-excursion', with point at the start of the message. It should |
11331 | 546 return the folder to offer as the refile or Fcc folder, as a string |
547 with a leading `+' sign. It can also return an empty string to use no | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
548 default, or nil to calculate the default the usual way. |
11331 | 549 NOTE: This variable is not an ordinary hook; |
550 It may not be a list of functions.") | |
6365 | 551 |
11331 | 552 (defvar mh-show-buffer-mode-line-buffer-id "{show-%s} %d" |
553 "Format string to produce `mode-line-buffer-identification' for show buffers. | |
554 First argument is folder name. Second is message number.") | |
6365 | 555 |
556 (defvar mh-cmd-note 4 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
557 "Column to insert notation. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
558 Use `mh-set-cmd-note' to modify it. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
559 This value may be dynamically updated if `mh-adaptive-cmd-note-flag' is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
560 non-nil and `mh-scan-format-file' is t. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
561 Note that the first column is column number 0.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
562 (make-variable-buffer-local 'mh-cmd-note) |
6365 | 563 |
11331 | 564 (defvar mh-note-seq "%" |
565 "String whose first character is used to notate messages in a sequence.") | |
566 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
567 (defvar mh-mail-header-separator "--------" |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
568 "*Line used by MH to separate headers from text in messages being composed. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
569 This variable should not be used directly in programs. Programs should use |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
570 `mail-header-separator' instead. `mail-header-separator' is initialized to |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
571 `mh-mail-header-separator' in `mh-letter-mode'; in other contexts, you may |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
572 have to perform this initialization yourself. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
573 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
574 Do not make this a regexp as it may be the argument to `insert' and it is |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
575 passed through `regexp-quote' before being used by functions like |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
576 `re-search-forward'.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
577 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
578 ;;; Hooks |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
579 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
580 (defcustom mh-find-path-hook nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
581 "Invoked by `mh-find-path' after reading the user's MH profile." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
582 :type 'hook |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
583 :group 'mh-hook) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
584 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
585 (defcustom mh-show-hook nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
586 "Invoked after \\<mh-folder-mode-map>`\\[mh-show]' shows a message." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
587 :type 'hook |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
588 :group 'mh-hook) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
589 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
590 (defcustom mh-show-mode-hook nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
591 "Invoked upon entry to `mh-show-mode'." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
592 :type 'hook |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
593 :group 'mh-hook) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
594 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
595 ;; Variables for MIME display |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
596 (defvar mh-globals-hash (make-hash-table) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
597 "Keeps track of MIME data on a per buffer basis.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
598 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
599 (defvar mh-gnus-pgp-support-flag (not (not (locate-library "mml2015"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
600 "Non-nil means installed Gnus has PGP support.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
601 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
602 (defvar mh-mm-inline-media-tests |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
603 `(("image/jpeg" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
604 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
605 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
606 (mm-valid-and-fit-image-p 'jpeg handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
607 ("image/png" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
608 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
609 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
610 (mm-valid-and-fit-image-p 'png handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
611 ("image/gif" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
612 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
613 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
614 (mm-valid-and-fit-image-p 'gif handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
615 ("image/tiff" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
616 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
617 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
618 (mm-valid-and-fit-image-p 'tiff handle)) ) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
619 ("image/xbm" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
620 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
621 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
622 (mm-valid-and-fit-image-p 'xbm handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
623 ("image/x-xbitmap" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
624 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
625 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
626 (mm-valid-and-fit-image-p 'xbm handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
627 ("image/xpm" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
628 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
629 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
630 (mm-valid-and-fit-image-p 'xpm handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
631 ("image/x-pixmap" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
632 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
633 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
634 (mm-valid-and-fit-image-p 'xpm handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
635 ("image/bmp" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
636 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
637 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
638 (mm-valid-and-fit-image-p 'bmp handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
639 ("image/x-portable-bitmap" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
640 mm-inline-image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
641 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
642 (mm-valid-and-fit-image-p 'pbm handle))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
643 ("text/plain" mm-inline-text identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
644 ("text/enriched" mm-inline-text identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
645 ("text/richtext" mm-inline-text identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
646 ("text/x-patch" mm-display-patch-inline |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
647 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
648 (locate-library "diff-mode"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
649 ("application/emacs-lisp" mm-display-elisp-inline identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
650 ("application/x-emacs-lisp" mm-display-elisp-inline identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
651 ("text/html" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
652 ,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
653 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
654 (or (and (boundp 'mm-inline-text-html-renderer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
655 mm-inline-text-html-renderer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
656 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
657 ("text/x-vcard" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
658 mm-inline-text-vcard |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
659 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
660 (or (featurep 'vcard) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
661 (locate-library "vcard")))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
662 ("message/delivery-status" mm-inline-text identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
663 ("message/rfc822" mh-mm-inline-message identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
664 ;("message/partial" mm-inline-partial identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
665 ;("message/external-body" mm-inline-external-body identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
666 ("text/.*" mm-inline-text identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
667 ("audio/wav" mm-inline-audio |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
668 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
669 (and (or (featurep 'nas-sound) (featurep 'native-sound)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
670 (device-sound-enabled-p)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
671 ("audio/au" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
672 mm-inline-audio |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
673 (lambda (handle) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
674 (and (or (featurep 'nas-sound) (featurep 'native-sound)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
675 (device-sound-enabled-p)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
676 ("application/pgp-signature" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
677 ("application/x-pkcs7-signature" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
678 ("application/pkcs7-signature" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
679 ("application/x-pkcs7-mime" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
680 ("application/pkcs7-mime" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
681 ("multipart/alternative" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
682 ("multipart/mixed" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
683 ("multipart/related" ignore identity) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
684 ;; Disable audio and image |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
685 ("audio/.*" ignore ignore) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
686 ("image/.*" ignore ignore) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
687 ;; Default to displaying as text |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
688 (".*" mm-inline-text mm-readable-p)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
689 "Alist of media types/tests saying whether types can be displayed inline.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
690 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
691 ;; Needed by mh-comp.el and mh-mime.el |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
692 (defvar mh-mhn-compose-insert-flag nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
693 "Non-nil means MIME insertion was done. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
694 Triggers an automatic call to `mh-edit-mhn' in `mh-send-letter'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
695 This variable is buffer-local.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
696 (make-variable-buffer-local 'mh-mhn-compose-insert-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
697 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
698 (defvar mh-mml-compose-insert-flag nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
699 "Non-nil means that a MIME insertion was done. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
700 This buffer-local variable is used to remember if a MIME insertion was done. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
701 Triggers an automatic call to `mh-mml-to-mime' in `mh-send-letter'.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
702 (make-variable-buffer-local 'mh-mml-compose-insert-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
703 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
704 (defun mh-in-header-p () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
705 "Return non-nil if the point is in the header of a draft message." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
706 (< (point) (mail-header-end))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
707 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
708 (defun mh-header-field-end () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
709 "Move to the end of the current header field. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
710 Handles RFC 822 continuation lines." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
711 (forward-line 1) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
712 (while (looking-at "^[ \t]") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
713 (forward-line 1)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
714 (backward-char 1)) ;to end of previous line |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
715 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
716 (defun mh-letter-header-font-lock (limit) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
717 "Return the entire mail header to font-lock. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
718 Argument LIMIT limits search." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
719 (if (= (point) limit) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
720 nil |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
721 (let* ((mail-header-end (save-match-data (mail-header-end))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
722 (lesser-limit (if (< mail-header-end limit) mail-header-end limit))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
723 (when (mh-in-header-p) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
724 (set-match-data (list 1 lesser-limit)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
725 (goto-char lesser-limit) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
726 t)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
727 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
728 (defun mh-header-field-font-lock (field limit) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
729 "Return the value of a header field FIELD to font-lock. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
730 Argument LIMIT limits search." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
731 (if (= (point) limit) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
732 nil |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
733 (let* ((mail-header-end (mail-header-end)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
734 (lesser-limit (if (< mail-header-end limit) mail-header-end limit)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
735 (case-fold-search t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
736 (when (and (< (point) mail-header-end) ;Only within header |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
737 (re-search-forward (format "^%s" field) lesser-limit t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
738 (let ((match-one-b (match-beginning 0)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
739 (match-one-e (match-end 0))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
740 (mh-header-field-end) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
741 (if (> (point) limit) ;Don't search for end beyond limit |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
742 (goto-char limit)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
743 (set-match-data (list match-one-b match-one-e |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
744 (1+ match-one-e) (point))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
745 t))))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
746 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
747 (defun mh-header-to-font-lock (limit) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
748 "Return the value of a header field To to font-lock. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
749 Argument LIMIT limits search." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
750 (mh-header-field-font-lock "To:" limit)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
751 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
752 (defun mh-header-cc-font-lock (limit) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
753 "Return the value of a header field cc to font-lock. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
754 Argument LIMIT limits search." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
755 (mh-header-field-font-lock "cc:" limit)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
756 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
757 (defun mh-header-subject-font-lock (limit) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
758 "Return the value of a header field Subject to font-lock. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
759 Argument LIMIT limits search." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
760 (mh-header-field-font-lock "Subject:" limit)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
761 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
762 (defvar mh-show-to-face 'mh-show-to-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
763 "Face for highlighting the To: header field.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
764 (if (boundp 'facemenu-unlisted-faces) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
765 (add-to-list 'facemenu-unlisted-faces "^mh-show")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
766 (defface mh-show-to-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
767 '((((class grayscale) (background light)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
768 (:foreground "DimGray" :underline t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
769 (((class grayscale) (background dark)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
770 (:foreground "LightGray" :underline t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
771 (((class color) (background light)) (:foreground "SaddleBrown")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
772 (((class color) (background dark)) (:foreground "burlywood")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
773 (t (:underline t))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
774 "Face for highlighting the To: header field." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
775 :group 'mh-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
776 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
777 (defvar mh-show-from-face 'mh-show-from-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
778 "Face for highlighting the From: header field.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
779 (defface mh-show-from-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
780 '((((class color) (background light)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
781 (:foreground "red3")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
782 (((class color) (background dark)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
783 (:foreground "cyan")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
784 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
785 (:bold t))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
786 "Face for highlighting the From: header field." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
787 :group 'mh-buffer) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
788 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
789 (defvar mh-folder-subject-face 'mh-folder-subject-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
790 "Face for highlighting subject text in MH-Folder buffers.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
791 (if (boundp 'facemenu-unlisted-faces) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
792 (add-to-list 'facemenu-unlisted-faces "^mh-folder")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
793 (defface mh-folder-subject-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
794 '((((class color) (background light)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
795 (:foreground "blue4")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
796 (((class color) (background dark)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
797 (:foreground "yellow")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
798 (t |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
799 (:bold t))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
800 "Face for highlighting subject text in MH-Folder buffers." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
801 :group 'mh) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
802 (defvar mh-show-subject-face 'mh-show-subject-face |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
803 "Face for highlighting the Subject header field.") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
804 (copy-face 'mh-folder-subject-face 'mh-show-subject-face) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
805 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
806 (defvar mh-show-cc-face 'mh-show-cc-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
807 "Face for highlighting cc header fields.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
808 (defface mh-show-cc-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
809 '((((type tty) (class color)) (:foreground "yellow" :weight light)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
810 (((class grayscale) (background light)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
811 (:foreground "Gray90" :bold t :italic t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
812 (((class grayscale) (background dark)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
813 (:foreground "DimGray" :bold t :italic t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
814 (((class color) (background light)) (:foreground "DarkGoldenrod")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
815 (((class color) (background dark)) (:foreground "LightGoldenrod")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
816 (t (:bold t :italic t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
817 "Face for highlighting cc header fields." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
818 :group 'mh-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
819 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
820 (defvar mh-show-date-face 'mh-show-date-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
821 "Face for highlighting the Date header field.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
822 (defface mh-show-date-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
823 '((((type tty) (class color)) (:foreground "green")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
824 (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
825 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
826 (((class color) (background light)) (:foreground "ForestGreen")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
827 (((class color) (background dark)) (:foreground "PaleGreen")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
828 (t (:bold t :underline t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
829 "Face for highlighting the Date header field." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
830 :group 'mh-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
831 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
832 (defvar mh-show-header-face 'mh-show-header-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
833 "Face used to deemphasize unspecified header fields.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
834 (defface mh-show-header-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
835 '((((type tty) (class color)) (:foreground "green")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
836 (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
837 (((class grayscale) (background dark)) (:foreground "LightGray" :italic t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
838 (((class color) (background light)) (:foreground "RosyBrown")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
839 (((class color) (background dark)) (:foreground "LightSalmon")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
840 (t (:italic t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
841 "Face used to deemphasize unspecified header fields." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
842 :group 'mh-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
843 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
844 (eval-and-compile |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
845 ;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite' |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
846 (defvar mh-show-font-lock-keywords |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
847 '(("^\\(From:\\|Sender:\\)\\(.*\\)" (1 'default) (2 mh-show-from-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
848 (mh-header-to-font-lock (0 'default) (1 mh-show-to-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
849 (mh-header-cc-font-lock (0 'default) (1 mh-show-cc-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
850 ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
851 (1 'default) (2 mh-show-from-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
852 (mh-header-subject-font-lock (0 'default) (1 mh-show-subject-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
853 ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
854 (1 'default) (2 mh-show-cc-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
855 ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
856 (1 'default) (2 mh-show-date-face)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
857 (mh-letter-header-font-lock (0 mh-show-header-face append t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
858 "Additional expressions to highlight in MH-show mode.")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
859 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
860 (defvar mh-show-font-lock-keywords-with-cite |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
861 (eval-when-compile |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
862 (let* ((cite-chars "[>|}]") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
863 (cite-prefix "A-Za-z") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
864 (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
865 (append |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
866 mh-show-font-lock-keywords |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
867 (list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
868 ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
869 `(,cite-chars |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
870 (,(concat "\\=[ \t]*" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
871 "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
872 "\\(" cite-chars "[ \t]*\\)\\)+" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
873 "\\(.*\\)") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
874 (beginning-of-line) (end-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
875 (2 font-lock-constant-face nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
876 (4 font-lock-comment-face nil t))))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
877 "Additional expressions to highlight in MH-show mode.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
878 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
879 (defun mh-show-font-lock-fontify-region (beg end loudly) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
880 "Limit font-lock in `mh-show-mode' to the header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
881 Used when `mh-highlight-citation-p' is set to gnus, leaving the body to be |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
882 dealt with by gnus highlighting. The region between BEG and END is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
883 given over to be fontified and LOUDLY controls if a user sees a |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
884 message about the fontification operation." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
885 (let ((header-end (mail-header-end))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
886 (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
887 ((and (< beg header-end)(< end header-end)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
888 (font-lock-default-fontify-region beg end loudly)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
889 ((and (< beg header-end)(>= end header-end)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
890 (font-lock-default-fontify-region beg header-end loudly)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
891 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
892 nil)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
893 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
894 ;; Needed to help shush the byte-compiler. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
895 (if mh-xemacs-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
896 (progn |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
897 (eval-and-compile |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
898 (require 'gnus) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
899 (require 'gnus-art) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
900 (require 'gnus-cite)))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
901 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
902 (defun mh-gnus-article-highlight-citation () |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
903 "Highlight cited text in current buffer using gnus." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
904 (interactive) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
905 ;; Requiring gnus-cite should have been sufficient. However for Emacs21.1, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
906 ;; recursive-load-depth-limit is only 10, so an error occurs. Also it may be |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
907 ;; better to have an autoload at top-level (though that won't work because |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
908 ;; of recursive-load-depth-limit). That gets rid of a compiler warning as |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
909 ;; well. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
910 (unless mh-xemacs-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
911 (require 'gnus-art) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
912 (require 'gnus-cite)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
913 ;; Don't allow Gnus to create buttons while highlighting, maybe this is bad |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
914 ;; style? |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
915 (flet ((gnus-article-add-button (&rest args) nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
916 (let* ((modified (buffer-modified-p)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
917 (gnus-article-buffer (buffer-name)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
918 (gnus-cite-face-list `(,@(cdr gnus-cite-face-list) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
919 ,(car gnus-cite-face-list)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
920 (gnus-article-highlight-citation t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
921 (set-buffer-modified-p modified)))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
922 |
11331 | 923 ;;; Internal bookkeeping variables: |
6365 | 924 |
11331 | 925 ;; The value of `mh-folder-list-change-hook' is called whenever |
926 ;; mh-folder-list variable is set. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
927 ;; List of folder names for completion. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
928 (defvar mh-folder-list nil) |
11331 | 929 |
930 ;; Cached value of the `Path:' component in the user's MH profile. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
931 ;; User's mail folder directory. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
932 (defvar mh-user-path nil) |
6365 | 933 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
934 ;; An mh-draft-folder of nil means do not use a draft folder. |
11331 | 935 ;; Cached value of the `Draft-Folder:' component in the user's MH profile. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
936 ;; Name of folder containing draft messages. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
937 (defvar mh-draft-folder nil) |
11331 | 938 |
939 ;; Cached value of the `Unseen-Sequence:' component in the user's MH profile. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
940 ;; Name of the Unseen sequence. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
941 (defvar mh-unseen-seq nil) |
6365 | 942 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
943 ;; Cached value of the `Previous-Sequence:' component in the user's MH |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
944 ;; profile. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
945 ;; Name of the Previous sequence. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
946 (defvar mh-previous-seq nil) |
6365 | 947 |
11331 | 948 ;; Cached value of the `Inbox:' component in the user's MH profile, |
949 ;; or "+inbox" if no such component. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
950 ;; Name of the Inbox folder. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
951 (defvar mh-inbox nil) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
952 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
953 ;; Name of MH-E scratch buffer. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
954 (defconst mh-temp-buffer " *mh-temp*") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
955 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
956 ;; Name of the MH-E folder list buffer. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
957 (defconst mh-temp-folders-buffer "*Folders*") |
6365 | 958 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
959 ;; Name of the MH-E sequences list buffer. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
960 (defconst mh-temp-sequences-buffer "*Sequences*") |
11331 | 961 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
962 ;; Window configuration before MH-E command. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
963 (defvar mh-previous-window-config nil) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
964 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
965 ;;Non-nil means next SPC or whatever goes to next undeleted message. |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
966 (defvar mh-page-to-next-msg-flag nil) |
11331 | 967 |
968 ;;; Internal variables local to a folder. | |
6365 | 969 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
970 ;; Name of current folder, a string. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
971 (defvar mh-current-folder nil) |
11331 | 972 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
973 ;; Buffer that displays message for this folder. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
974 (defvar mh-show-buffer nil) |
6365 | 975 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
976 ;; Full path of directory for this folder. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
977 (defvar mh-folder-filename nil) |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
978 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
979 ;;Number of msgs in buffer. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
980 (defvar mh-msg-count nil) |
11331 | 981 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
982 ;; If non-nil, show the message in a separate window. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
983 (defvar mh-showing-mode nil) |
6365 | 984 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
985 (defvar mh-show-mode-map (make-sparse-keymap) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
986 "Keymap used by the show buffer.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
987 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
988 (defvar mh-show-folder-buffer nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
989 "Keeps track of folder whose message is being displayed.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
990 |
11331 | 991 ;;; This holds a documentation string used by describe-mode. |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
992 (defun mh-showing-mode (&optional arg) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
993 "Change whether messages should be displayed. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
994 With arg, display messages iff ARG is positive." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
995 (setq mh-showing-mode |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
996 (if (null arg) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
997 (not mh-showing-mode) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
998 (> (prefix-numeric-value arg) 0)))) |
6365 | 999 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1000 ;; The sequences of this folder. An alist of (seq . msgs). |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1001 (defvar mh-seq-list nil) |
11331 | 1002 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1003 ;; List of displayed messages to be removed from the Unseen sequence. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1004 (defvar mh-seen-list nil) |
6365 | 1005 |
11331 | 1006 ;; If non-nil, show buffer contains message with all headers. |
1007 ;; If nil, show buffer contains message processed normally. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1008 ;; Showing message with headers or normally. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1009 (defvar mh-showing-with-headers nil) |
6365 | 1010 |
1011 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1012 ;;; MH-E macros |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1013 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1014 (defmacro with-mh-folder-updating (save-modification-flag &rest body) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1015 "Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG) &body BODY). |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1016 Execute BODY, which can modify the folder buffer without having to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1017 worry about file locking or the read-only flag, and return its result. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1018 If SAVE-MODIFICATION-FLAG is non-nil, the buffer's modification |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1019 flag is unchanged, otherwise it is cleared." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1020 (setq save-modification-flag (car save-modification-flag)) ; CL style |
26455 | 1021 `(prog1 |
1022 (let ((mh-folder-updating-mod-flag (buffer-modified-p)) | |
1023 (buffer-read-only nil) | |
1024 (buffer-file-name nil)) ;don't let the buffer get locked | |
1025 (prog1 | |
1026 (progn | |
1027 ,@body) | |
1028 (mh-set-folder-modified-p mh-folder-updating-mod-flag))) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1029 ,@(if (not save-modification-flag) |
26455 | 1030 '((mh-set-folder-modified-p nil))))) |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1031 |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1032 (put 'with-mh-folder-updating 'lisp-indent-hook 1) |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1033 |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1034 (defmacro mh-in-show-buffer (show-buffer &rest body) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1035 "Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY). |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1036 Display buffer SHOW-BUFFER in other window and execute BODY in it. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1037 Stronger than `save-excursion', weaker than `save-window-excursion'." |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1038 (setq show-buffer (car show-buffer)) ; CL style |
26455 | 1039 `(let ((mh-in-show-buffer-saved-window (selected-window))) |
1040 (switch-to-buffer-other-window ,show-buffer) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1041 (if mh-bury-show-buffer-flag (bury-buffer (current-buffer))) |
26455 | 1042 (unwind-protect |
1043 (progn | |
1044 ,@body) | |
1045 (select-window mh-in-show-buffer-saved-window)))) | |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1046 |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1047 (put 'mh-in-show-buffer 'lisp-indent-hook 1) |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1048 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1049 (defmacro mh-make-seq (name msgs) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1050 "Create sequence NAME with the given MSGS." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1051 (list 'cons name msgs)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1052 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1053 (defmacro mh-seq-name (sequence) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1054 "Extract sequence name from the given SEQUENCE." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1055 (list 'car sequence)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1056 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1057 (defmacro mh-seq-msgs (sequence) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1058 "Extract messages from the given SEQUENCE." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1059 (list 'cdr sequence)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1060 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1061 (defun mh-recenter (arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1062 "Like recenter but with three improvements: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1063 - At the end of the buffer it tries to show fewer empty lines. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1064 - operates only if the current buffer is in the selected window. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1065 (Commands like `save-some-buffers' can make this false.) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1066 - nil ARG means recenter as if prefix argument had been given." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1067 (cond ((not (eq (get-buffer-window (current-buffer)) (selected-window))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1068 nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1069 ((= (point-max) (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1070 (forward-line (- (/ (window-height) 2) 2)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1071 (point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1072 (let ((lines-from-end 2)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1073 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1074 (while (> (point-max) (progn (forward-line) (point))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1075 (incf lines-from-end))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1076 (recenter (- lines-from-end)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1077 ;; '(4) is the same as C-u prefix argument. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1078 (t (recenter (or arg '(4)))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1079 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1080 (defun mh-start-of-uncleaned-message () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1081 "Position uninteresting headers off the top of the window." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1082 (let ((case-fold-search t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1083 (re-search-forward |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1084 "^To:\\|^Cc:\\|^From:\\|^Subject:\\|^Date:" nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1085 (beginning-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1086 (mh-recenter 0))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1087 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1088 (defun mh-invalidate-show-buffer () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1089 "Invalidate the show buffer so we must update it to use it." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1090 (if (get-buffer mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1091 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1092 (set-buffer mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1093 (mh-unvisit-file)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1094 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1095 (defun mh-unvisit-file () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1096 "Separate current buffer from the message file it was visiting." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1097 (or (not (buffer-modified-p)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1098 (null buffer-file-name) ;we've been here before |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1099 (yes-or-no-p (format "Message %s modified; flush changes? " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1100 (file-name-nondirectory buffer-file-name))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1101 (error "Flushing changes not confirmed")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1102 (clear-visited-file-modtime) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1103 (unlock-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1104 (setq buffer-file-name nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1105 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1106 (defun mh-get-msg-num (error-if-no-message) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1107 "Return the message number of the displayed message. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1108 If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1109 not pointing to a message." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1110 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1111 (beginning-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1112 (cond ((looking-at mh-scan-msg-number-regexp) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1113 (string-to-int (buffer-substring (match-beginning 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1114 (match-end 1)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1115 (error-if-no-message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1116 (error "Cursor not pointing to message")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1117 (t nil)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1118 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1119 (defun mh-folder-name-p (name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1120 "Return non-nil if NAME is the name of a folder. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1121 A name (a string or symbol) can be a folder name if it begins with \"+\"." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1122 (if (symbolp name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1123 (eq (aref (symbol-name name) 0) ?+) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1124 (and (> (length name) 0) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1125 (eq (aref name 0) ?+)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1126 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1127 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1128 (defun mh-expand-file-name (filename &optional default) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1129 "Expand FILENAME like `expand-file-name', but also handle MH folder names. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1130 Any filename that starts with '+' is treated as a folder name. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1131 See `expand-file-name' for description of DEFAULT." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1132 (if (mh-folder-name-p filename) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1133 (expand-file-name (substring filename 1) mh-user-path) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1134 (expand-file-name filename default))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1135 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1136 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1137 (defun mh-msg-filename (msg &optional folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1138 "Return the file name of MSG in FOLDER (default current folder)." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1139 (expand-file-name (int-to-string msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1140 (if folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1141 (mh-expand-file-name folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1142 mh-folder-filename))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1143 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1144 ;;; Infrastructure to generate show-buffer functions from folder functions |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1145 ;;; XEmacs does not have deactivate-mark? What is the equivalent of |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1146 ;;; transient-mark-mode for XEmacs? Should we be restoring the mark in the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1147 ;;; folder buffer after the operation has been carried out. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1148 (defmacro mh-defun-show-buffer (function original-function |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1149 &optional dont-return) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1150 "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1151 If the buffer we start in is still visible and DONT-RETURN is nil then switch |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1152 to it after that." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1153 `(defun ,function () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1154 ,(format "Calls %s from the message's folder.\n%s\nSee `%s' for more info.\n" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1155 original-function |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1156 (if dont-return "" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1157 "When function completes, returns to the show buffer if it is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1158 still visible.\n") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1159 original-function) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1160 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1161 (when (buffer-live-p (get-buffer mh-show-folder-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1162 (let ((config (current-window-configuration)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1163 (folder-buffer mh-show-folder-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1164 (normal-exit nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1165 ,@(if dont-return () '((cur-buffer-name (buffer-name))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1166 (pop-to-buffer mh-show-folder-buffer nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1167 (unless (equal (buffer-name |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1168 (window-buffer (frame-first-window (selected-frame)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1169 folder-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1170 (delete-other-windows)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1171 (mh-goto-cur-msg t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1172 (and (fboundp 'deactivate-mark) (deactivate-mark)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1173 (unwind-protect |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1174 (prog1 (call-interactively (function ,original-function)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1175 (setq normal-exit t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1176 (and (fboundp 'deactivate-mark) (deactivate-mark)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1177 (cond ((not normal-exit) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1178 (set-window-configuration config)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1179 ,(if dont-return |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1180 `(t (setq mh-previous-window-config config)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1181 `((and (get-buffer cur-buffer-name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1182 (window-live-p (get-buffer-window |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1183 (get-buffer cur-buffer-name)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1184 (pop-to-buffer (get-buffer cur-buffer-name) nil))))))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1185 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1186 ;;; Generate interactive functions for the show buffer from the corresponding |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1187 ;;; folder functions. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1188 (mh-defun-show-buffer mh-show-previous-undeleted-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1189 mh-previous-undeleted-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1190 (mh-defun-show-buffer mh-show-next-undeleted-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1191 mh-next-undeleted-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1192 (mh-defun-show-buffer mh-show-quit mh-quit) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1193 (mh-defun-show-buffer mh-show-delete-msg mh-delete-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1194 (mh-defun-show-buffer mh-show-refile-msg mh-refile-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1195 (mh-defun-show-buffer mh-show-undo mh-undo) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1196 (mh-defun-show-buffer mh-show-execute-commands mh-execute-commands) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1197 (mh-defun-show-buffer mh-show-reply mh-reply t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1198 (mh-defun-show-buffer mh-show-redistribute mh-redistribute) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1199 (mh-defun-show-buffer mh-show-forward mh-forward t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1200 (mh-defun-show-buffer mh-show-header-display mh-header-display) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1201 (mh-defun-show-buffer mh-show-refile-or-write-again |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1202 mh-refile-or-write-again) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1203 (mh-defun-show-buffer mh-show-show mh-show) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1204 (mh-defun-show-buffer mh-show-write-message-to-file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1205 mh-write-msg-to-file) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1206 (mh-defun-show-buffer mh-show-extract-rejected-mail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1207 mh-extract-rejected-mail t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1208 (mh-defun-show-buffer mh-show-delete-msg-no-motion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1209 mh-delete-msg-no-motion) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1210 (mh-defun-show-buffer mh-show-first-msg mh-first-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1211 (mh-defun-show-buffer mh-show-last-msg mh-last-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1212 (mh-defun-show-buffer mh-show-copy-msg mh-copy-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1213 (mh-defun-show-buffer mh-show-edit-again mh-edit-again t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1214 (mh-defun-show-buffer mh-show-goto-msg mh-goto-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1215 (mh-defun-show-buffer mh-show-inc-folder mh-inc-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1216 (mh-defun-show-buffer mh-show-delete-subject |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1217 mh-delete-subject) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1218 (mh-defun-show-buffer mh-show-print-msg mh-print-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1219 (mh-defun-show-buffer mh-show-send mh-send t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1220 (mh-defun-show-buffer mh-show-toggle-showing mh-toggle-showing t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1221 (mh-defun-show-buffer mh-show-pipe-msg mh-pipe-msg t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1222 (mh-defun-show-buffer mh-show-sort-folder mh-sort-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1223 (mh-defun-show-buffer mh-show-visit-folder mh-visit-folder t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1224 (mh-defun-show-buffer mh-show-rescan-folder mh-rescan-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1225 (mh-defun-show-buffer mh-show-pack-folder mh-pack-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1226 (mh-defun-show-buffer mh-show-kill-folder mh-kill-folder t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1227 (mh-defun-show-buffer mh-show-list-folders mh-list-folders t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1228 (mh-defun-show-buffer mh-show-search-folder mh-search-folder t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1229 (mh-defun-show-buffer mh-show-undo-folder mh-undo-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1230 (mh-defun-show-buffer mh-show-delete-msg-from-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1231 mh-delete-msg-from-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1232 (mh-defun-show-buffer mh-show-delete-seq mh-delete-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1233 (mh-defun-show-buffer mh-show-list-sequences mh-list-sequences) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1234 (mh-defun-show-buffer mh-show-narrow-to-seq mh-narrow-to-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1235 (mh-defun-show-buffer mh-show-put-msg-in-seq mh-put-msg-in-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1236 (mh-defun-show-buffer mh-show-msg-is-in-seq mh-msg-is-in-seq) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1237 (mh-defun-show-buffer mh-show-widen mh-widen) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1238 (mh-defun-show-buffer mh-show-narrow-to-subject |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1239 mh-narrow-to-subject) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1240 (mh-defun-show-buffer mh-show-store-msg mh-store-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1241 (mh-defun-show-buffer mh-show-page-digest mh-page-digest) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1242 (mh-defun-show-buffer mh-show-page-digest-backwards |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1243 mh-page-digest-backwards) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1244 (mh-defun-show-buffer mh-show-burst-digest mh-burst-digest) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1245 (mh-defun-show-buffer mh-show-page-msg mh-page-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1246 (mh-defun-show-buffer mh-show-previous-page mh-previous-page) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1247 (mh-defun-show-buffer mh-show-modify mh-modify t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1248 (mh-defun-show-buffer mh-show-next-button mh-next-button) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1249 (mh-defun-show-buffer mh-show-prev-button mh-prev-button) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1250 (mh-defun-show-buffer mh-show-toggle-mime-part mh-folder-toggle-mime-part) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1251 (mh-defun-show-buffer mh-show-save-mime-part mh-folder-save-mime-part) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1252 (mh-defun-show-buffer mh-show-inline-mime-part mh-folder-inline-mime-part) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1253 (mh-defun-show-buffer mh-show-toggle-threads mh-toggle-threads) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1254 (mh-defun-show-buffer mh-show-update-sequences mh-update-sequences) |
11331 | 1255 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1256 ;;; Populate mh-show-mode-map |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1257 (gnus-define-keys mh-show-mode-map |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1258 " " mh-show-page-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1259 "!" mh-show-refile-or-write-again |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1260 "," mh-show-header-display |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1261 "." mh-show-show |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1262 ">" mh-show-write-message-to-file |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1263 "?" mh-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1264 "E" mh-show-extract-rejected-mail |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1265 "M" mh-show-modify |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1266 "\177" mh-show-previous-page |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1267 "\C-d" mh-show-delete-msg-no-motion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1268 "\t" mh-show-next-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1269 [backtab] mh-show-prev-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1270 "\M-\t" mh-show-prev-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1271 "\ed" mh-show-redistribute |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1272 "^" mh-show-refile-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1273 "c" mh-show-copy-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1274 "d" mh-show-delete-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1275 "e" mh-show-edit-again |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1276 "f" mh-show-forward |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1277 "g" mh-show-goto-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1278 "i" mh-show-inc-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1279 "k" mh-show-delete-subject |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1280 "l" mh-show-print-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1281 "m" mh-show-send |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1282 "n" mh-show-next-undeleted-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1283 "o" mh-show-refile-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1284 "p" mh-show-previous-undeleted-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1285 "q" mh-show-quit |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1286 "r" mh-show-reply |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1287 "s" mh-show-send |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1288 "t" mh-show-toggle-showing |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1289 "u" mh-show-undo |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1290 "x" mh-show-execute-commands |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1291 "|" mh-show-pipe-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1292 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1293 (gnus-define-keys (mh-show-folder-map "F" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1294 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1295 "S" mh-show-sort-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1296 "f" mh-show-visit-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1297 "i" mh-index-search |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1298 "k" mh-show-kill-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1299 "l" mh-show-list-folders |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1300 "o" mh-show-visit-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1301 "r" mh-show-rescan-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1302 "s" mh-show-search-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1303 "t" mh-show-toggle-threads |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1304 "u" mh-show-undo-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1305 "v" mh-show-visit-folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1306 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1307 (gnus-define-keys (mh-show-sequence-map "S" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1308 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1309 "d" mh-show-delete-msg-from-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1310 "k" mh-show-delete-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1311 "l" mh-show-list-sequences |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1312 "n" mh-show-narrow-to-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1313 "p" mh-show-put-msg-in-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1314 "s" mh-show-msg-is-in-seq |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1315 "w" mh-show-widen) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1316 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1317 (gnus-define-keys (mh-show-thread-map "T" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1318 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1319 "t" mh-show-toggle-threads) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1320 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1321 (gnus-define-keys (mh-show-limit-map "/" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1322 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1323 "s" mh-show-narrow-to-subject |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1324 "w" mh-show-widen) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1325 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1326 (gnus-define-keys (mh-show-extract-map "X" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1327 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1328 "s" mh-show-store-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1329 "u" mh-show-store-msg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1330 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1331 ;; Untested... |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1332 (gnus-define-keys (mh-show-digest-map "D" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1333 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1334 " " mh-show-page-digest |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1335 "\177" mh-show-page-digest-backwards |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1336 "b" mh-show-burst-digest) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1337 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1338 (gnus-define-keys (mh-show-mime-map "K" mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1339 "?" mh-prefix-help |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1340 "a" mh-mime-save-parts |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1341 "v" mh-show-toggle-mime-part |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1342 "o" mh-show-save-mime-part |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1343 "i" mh-show-inline-mime-part |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1344 "\t" mh-show-next-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1345 [backtab] mh-show-prev-button |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1346 "\M-\t" mh-show-prev-button) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1347 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1348 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1349 mh-show-sequence-menu mh-show-mode-map "Menu for MH-E folder-sequence." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1350 '("Sequence" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1351 ["Add Message to Sequence..." mh-show-put-msg-in-seq t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1352 ["List Sequences for Message" mh-show-msg-is-in-seq t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1353 ["Delete Message from Sequence..." mh-show-delete-msg-from-seq t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1354 ["List Sequences in Folder..." mh-show-list-sequences t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1355 ["Delete Sequence..." mh-show-delete-seq t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1356 ["Narrow to Sequence..." mh-show-narrow-to-seq t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1357 ["Widen from Sequence" mh-show-widen t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1358 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1359 ["Narrow to Subject Sequence" mh-show-narrow-to-subject t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1360 ["Delete Rest of Same Subject" mh-show-delete-subject t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1361 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1362 ["Push State Out to MH" mh-show-update-sequences t])) |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1363 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1364 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1365 mh-show-message-menu mh-show-mode-map "Menu for MH-E folder-message." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1366 '("Message" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1367 ["Show Message" mh-show-show t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1368 ["Show Message with Header" mh-show-header-display t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1369 ["Next Message" mh-show-next-undeleted-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1370 ["Previous Message" mh-show-previous-undeleted-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1371 ["Go to First Message" mh-show-first-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1372 ["Go to Last Message" mh-show-last-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1373 ["Go to Message by Number..." mh-show-goto-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1374 ["Modify Message" mh-show-modify t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1375 ["Delete Message" mh-show-delete-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1376 ["Refile Message" mh-show-refile-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1377 ["Undo Delete/Refile" mh-show-undo t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1378 ["Process Delete/Refile" mh-show-execute-commands t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1379 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1380 ["Compose a New Message" mh-send t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1381 ["Reply to Message..." mh-show-reply t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1382 ["Forward Message..." mh-show-forward t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1383 ["Redistribute Message..." mh-show-redistribute t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1384 ["Edit Message Again" mh-show-edit-again t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1385 ["Re-edit a Bounced Message" mh-show-extract-rejected-mail t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1386 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1387 ["Copy Message to Folder..." mh-show-copy-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1388 ["Print Message" mh-show-print-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1389 ["Write Message to File..." mh-show-write-msg-to-file t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1390 ["Pipe Message to Command..." mh-show-pipe-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1391 ["Unpack Uuencoded Message..." mh-show-store-msg t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1392 ["Burst Digest Message" mh-show-burst-digest t])) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1393 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1394 (easy-menu-define |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1395 mh-show-folder-menu mh-show-mode-map "Menu for MH-E folder." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1396 '("Folder" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1397 ["Incorporate New Mail" mh-show-inc-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1398 ["Toggle Show/Folder" mh-show-toggle-showing t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1399 ["Execute Delete/Refile" mh-show-execute-commands t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1400 ["Rescan Folder" mh-show-rescan-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1401 ["Thread Folder" mh-show-toggle-threads t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1402 ["Pack Folder" mh-show-pack-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1403 ["Sort Folder" mh-show-sort-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1404 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1405 ["List Folders" mh-show-list-folders t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1406 ["Visit a Folder..." mh-show-visit-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1407 ["Search a Folder..." mh-show-search-folder t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1408 ["Indexed Search..." mh-index-search t] |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1409 "--" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1410 ["Quit MH-E" mh-quit t])) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1411 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1412 (eval-when-compile (defvar tool-bar-map)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1413 (defvar mh-show-tool-bar-map nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1414 (when (and (fboundp 'tool-bar-add-item) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1415 tool-bar-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1416 (setq mh-show-tool-bar-map |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1417 (let ((tool-bar-map (make-sparse-keymap))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1418 (tool-bar-add-item "mail" 'mh-inc-folder 'mh-showtoolbar-inc-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1419 :help "Incorporate new mail in Inbox") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1420 (tool-bar-add-item "attach" 'mh-mime-save-parts |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1421 'mh-showtoolbar-mime-save-parts |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1422 :help "Save MIME parts") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1423 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1424 (tool-bar-add-item "left_arrow" 'mh-show-previous-undeleted-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1425 'mh-showtoolbar-prev :help "Previous message") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1426 (tool-bar-add-item "page-down" 'mh-show-page-msg 'mh-showtoolbar-page |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1427 :help "Page this message") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1428 (tool-bar-add-item "right_arrow" 'mh-show-next-undeleted-msg |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1429 'mh-showtoolbar-next :help "Next message") |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1430 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1431 (tool-bar-add-item "close" 'mh-show-delete-msg 'mh-showtoolbar-delete |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1432 :help "Mark for deletion") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1433 (tool-bar-add-item "refile" 'mh-show-refile-msg 'mh-showtoolbar-refile |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1434 :help "Refile this message") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1435 (tool-bar-add-item "undo" 'mh-show-undo 'mh-showtoolbar-undo |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1436 :help "Undo this mark") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1437 (tool-bar-add-item "execute" 'mh-show-execute-commands |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1438 'mh-showtoolbar-exec |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1439 :help "Perform moves and deletes") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1440 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1441 (tool-bar-add-item "show" 'mh-show-toggle-showing |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1442 'mh-showtoolbar-toggle-show |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1443 :help "Toggle showing message") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1444 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1445 (cond |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1446 (mh-tool-bar-reply-3-buttons-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1447 (tool-bar-add-item "reply-from" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1448 (lambda (&optional arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1449 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1450 (set-buffer mh-show-folder-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1451 (mh-reply (mh-get-msg-num nil) "from" arg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1452 'mh-showtoolbar-reply-from |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1453 :help "Reply to \"from\"") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1454 (tool-bar-add-item "reply-to" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1455 (lambda (&optional arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1456 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1457 (set-buffer mh-show-folder-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1458 (mh-reply (mh-get-msg-num nil) "to" arg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1459 'mh-showtoolbar-reply-to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1460 :help "Reply to \"to\"") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1461 (tool-bar-add-item "reply-all" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1462 (lambda (&optional arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1463 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1464 (set-buffer mh-show-folder-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1465 (mh-reply (mh-get-msg-num nil) "all" arg)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1466 'mh-showtoolbar-reply-all |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1467 :help "Reply to \"all\"")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1468 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1469 (tool-bar-add-item "mail/reply2" 'mh-show-reply 'mh-showtoolbar-reply |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1470 :help "Reply to this message"))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1471 (tool-bar-add-item "mail_compose" 'mh-send 'mh-showtoolbar-compose |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1472 :help "Compose new message") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1473 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1474 (tool-bar-add-item "rescan" 'mh-show-rescan-folder |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1475 'mh-showtoolbar-rescan :help "Rescan this folder") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1476 (tool-bar-add-item "repack" 'mh-show-pack-folder 'mh-showtoolbar-pack |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1477 :help "Repack this folder") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1478 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1479 (tool-bar-add-item "search" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1480 (lambda (&optional arg) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1481 (interactive "P") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1482 (call-interactively mh-tool-bar-search-function)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1483 'mh-showtoolbar-search :help "Search") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1484 (tool-bar-add-item "fld_open" 'mh-visit-folder 'mh-showtoolbar-visit |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1485 :help "Visit other folder") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1486 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1487 (tool-bar-add-item "preferences" (lambda () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1488 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1489 (customize-group "mh")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1490 'mh-showtoolbar-customize |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1491 :help "MH-E preferences") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1492 (tool-bar-add-item "help" (lambda () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1493 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1494 (Info-goto-node "(mh-e)Top")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1495 'mh-showtoolbar-help :help "Help") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1496 tool-bar-map))) |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1497 |
6365 | 1498 ;;; Ensure new buffers won't get this mode if default-major-mode is nil. |
1499 (put 'mh-show-mode 'mode-class 'special) | |
1500 | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1501 (define-derived-mode mh-show-mode text-mode "MH-Show" |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1502 "Major mode for showing messages in MH-E.\\<mh-show-mode-map> |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1503 The value of `mh-show-mode-hook' is a list of functions to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1504 be called, with no arguments, upon entry to this mode." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1505 (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1506 (setq paragraph-start (default-value 'paragraph-start)) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1507 (mh-show-unquote-From) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1508 (mh-show-xface) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1509 (mh-show-addr) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1510 (make-local-variable 'font-lock-defaults) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1511 ;(set (make-local-variable 'font-lock-support-mode) nil) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1512 (cond |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1513 ((equal mh-highlight-citation-p 'font-lock) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1514 (setq font-lock-defaults '(mh-show-font-lock-keywords-with-cite t))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1515 ((equal mh-highlight-citation-p 'gnus) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1516 (setq font-lock-defaults '((mh-show-font-lock-keywords) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1517 t nil nil nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1518 (font-lock-fontify-region-function |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1519 . mh-show-font-lock-fontify-region))) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1520 (mh-gnus-article-highlight-citation)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1521 (t |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1522 (setq font-lock-defaults '(mh-show-font-lock-keywords t)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1523 (if (and mh-xemacs-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1524 font-lock-auto-fontify) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1525 (turn-on-font-lock)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1526 (if (and (boundp 'tool-bar-mode) tool-bar-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1527 (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1528 (when mh-decode-mime-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1529 (add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1530 (easy-menu-add mh-show-sequence-menu) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1531 (easy-menu-add mh-show-message-menu) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1532 (easy-menu-add mh-show-folder-menu) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1533 (make-local-variable 'mh-show-folder-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1534 (buffer-disable-undo) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1535 (setq buffer-read-only t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1536 (use-local-map mh-show-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1537 (run-hooks 'mh-show-mode-hook)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1538 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1539 (defun mh-show-addr () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1540 "Use `goto-address'." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1541 (when mh-show-use-goto-addr-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1542 (if (not (featurep 'goto-addr)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1543 (load "goto-addr" t t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1544 (if (fboundp 'goto-address) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1545 (goto-address)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1546 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1547 (defvar mh-show-xface-function |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1548 (cond ((and mh-xemacs-flag (locate-library "x-face")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1549 (load "x-face" t t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1550 (if (fboundp 'x-face-xmas-wl-display-x-face) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1551 #'x-face-xmas-wl-display-x-face |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1552 #'ignore)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1553 ((>= emacs-major-version 21) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1554 (load "x-face-e21" t t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1555 (if (fboundp 'x-face-decode-message-header) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1556 #'x-face-decode-message-header |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1557 #'ignore)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1558 (t #'ignore)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1559 "Determine at run time what function should be called to display X-Face.") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1560 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1561 (defun mh-show-xface () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1562 "Display X-Face." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1563 (when (and mh-show-use-xface-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1564 (or mh-decode-mime-flag mhl-formfile mh-clean-message-header-flag)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1565 (funcall mh-show-xface-function))) |
6365 | 1566 |
1567 (defun mh-maybe-show (&optional msg) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1568 "Display message at cursor, but only if in show mode. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1569 If optional arg MSG is non-nil, display that message instead." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1570 (if mh-showing-mode (mh-show msg))) |
6365 | 1571 |
11331 | 1572 (defun mh-show (&optional message) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1573 "Show message at cursor. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1574 If optional argument MESSAGE is non-nil, display that message instead. |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1575 Force a two-window display with the folder window on top (size |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1576 `mh-summary-height') and the show buffer below it. |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1577 If the message is already visible, display the start of the message. |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1578 |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1579 Display of the message is controlled by setting the variables |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1580 `mh-clean-message-header-flag' and `mhl-formfile'. The default behavior is |
6856
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1581 to scroll uninteresting headers off the top of the window. |
396254137b30
(mh-progs, mh-lib): Move from mh-e.el
Richard M. Stallman <rms@gnu.org>
parents:
6365
diff
changeset
|
1582 Type \"\\[mh-header-display]\" to see the message with all its headers." |
6365 | 1583 (interactive) |
1584 (and mh-showing-with-headers | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1585 (or mhl-formfile mh-clean-message-header-flag) |
6365 | 1586 (mh-invalidate-show-buffer)) |
11331 | 1587 (mh-show-msg message)) |
6365 | 1588 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1589 (defun mh-show-mouse (EVENT) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1590 "Move point to mouse EVENT and show message." |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1591 (interactive "e") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1592 (mouse-set-point EVENT) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1593 (mh-show)) |
6365 | 1594 |
1595 (defun mh-show-msg (msg) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1596 "Show MSG. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1597 The value of `mh-show-hook' is a list of functions to be called, with no |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1598 arguments, after the message has been displayed." |
6365 | 1599 (if (not msg) |
1600 (setq msg (mh-get-msg-num t))) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1601 (mh-showing-mode t) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1602 (setq mh-page-to-next-msg-flag nil) |
6365 | 1603 (let ((folder mh-current-folder) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1604 (clean-message-header mh-clean-message-header-flag) |
6365 | 1605 (show-window (get-buffer-window mh-show-buffer))) |
18926
e597d4b325df
Change eql calls to eq.
Richard M. Stallman <rms@gnu.org>
parents:
18901
diff
changeset
|
1606 (if (not (eq (next-window (minibuffer-window)) (selected-window))) |
6365 | 1607 (delete-other-windows)) ; force ourself to the top window |
1608 (mh-in-show-buffer (mh-show-buffer) | |
1609 (if (and show-window | |
1610 (equal (mh-msg-filename msg folder) buffer-file-name)) | |
1611 (progn ;just back up to start | |
1612 (goto-char (point-min)) | |
1613 (if (not clean-message-header) | |
1614 (mh-start-of-uncleaned-message))) | |
1615 (mh-display-msg msg folder)))) | |
42323 | 1616 (if (not (= (1+ (window-height)) (frame-height))) ;not horizontally split |
6365 | 1617 (shrink-window (- (window-height) mh-summary-height))) |
1618 (mh-recenter nil) | |
1619 (if (not (memq msg mh-seen-list)) (setq mh-seen-list (cons msg mh-seen-list))) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1620 (when mh-update-sequences-after-mh-show-flag |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1621 (mh-update-sequences)) |
6365 | 1622 (run-hooks 'mh-show-hook)) |
1623 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1624 (defun mh-modify (&optional message) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1625 "Edit message at cursor. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1626 If optional argument MESSAGE is non-nil, edit that message instead. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1627 Force a two-window display with the folder window on top (size |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1628 `mh-summary-height') and the message editing buffer below it. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1629 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1630 The message is displayed in raw form." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1631 (interactive) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1632 (let* ((message (or message (mh-get-msg-num t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1633 (msg-filename (mh-msg-filename message)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1634 edit-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1635 (when (not (file-exists-p msg-filename)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1636 (error "Message %d does not exist" message)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1637 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1638 ;; Invalidate the show buffer if it is showing the same message that is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1639 ;; to be edited. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1640 (when (and (buffer-live-p (get-buffer mh-show-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1641 (equal (save-excursion (set-buffer mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1642 buffer-file-name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1643 msg-filename)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1644 (mh-invalidate-show-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1645 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1646 ;; Edit message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1647 (find-file msg-filename) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1648 (setq edit-buffer (current-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1649 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1650 ;; Set buffer properties |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1651 (mh-letter-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1652 (use-local-map text-mode-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1653 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1654 ;; Just show the edit buffer... |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1655 (delete-other-windows) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1656 (switch-to-buffer edit-buffer))) |
6365 | 1657 |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1658 (defun mh-decode-quoted-printable () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1659 "Run mimedecode on current buffer, replacing its contents." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1660 (let ((case-fold-search t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1661 (goto-char (point-min)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1662 (when (and (re-search-forward |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1663 "^content-transfer-encoding:[ \t]*quoted-printable" |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1664 (if mh-decode-mime-flag (mail-header-end) nil) t) |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1665 (search-forward "\n\n" nil t)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1666 (message "Converting quoted-printable characters...") |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1667 (let ((modified (buffer-modified-p)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1668 (command "mimedecode")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1669 (shell-command-on-region (point-min) (point-max) command t t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1670 (if (fboundp 'deactivate-mark) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1671 (deactivate-mark)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1672 (set-buffer-modified-p modified)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1673 (message "Converting quoted-printable characters... done.")))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1674 |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1675 (defun mh-show-unquote-From () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1676 "Decode >From at beginning of lines for `mh-show-mode'." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1677 (save-excursion |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1678 (let ((modified (buffer-modified-p)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1679 (case-fold-search nil)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1680 (goto-char (mail-header-end)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1681 (while (re-search-forward "^>From" nil t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1682 (replace-match "From")) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1683 (set-buffer-modified-p modified)))) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1684 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1685 (defun mh-msg-folder (folder-name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1686 "Return the name of the buffer for FOLDER-NAME." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1687 folder-name) |
6365 | 1688 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1689 (defun mh-display-msg (msg-num folder-name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1690 "Display MSG-NUM of FOLDER-NAME. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1691 Sets the current buffer to the show buffer." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1692 (let ((folder (mh-msg-folder folder-name))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1693 (set-buffer folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1694 ;; When Gnus uses external displayers it has to keep handles longer. So |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1695 ;; we will delete these handles when mh-quit is called on the folder. It |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1696 ;; would be nicer if there are weak pointers in emacs lisp, then we could |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1697 ;; get the garbage collector to do this for us. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1698 (unless (mh-buffer-data) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1699 (setf (mh-buffer-data) (mh-make-buffer-data))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1700 ;; Bind variables in folder buffer in case they are local |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1701 (let ((formfile mhl-formfile) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1702 (clean-message-header mh-clean-message-header-flag) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1703 (invisible-headers mh-invisible-headers) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1704 (visible-headers mh-visible-headers) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1705 (msg-filename (mh-msg-filename msg-num folder-name)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1706 (show-buffer mh-show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1707 (mm-inline-media-tests mh-mm-inline-media-tests)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1708 (if (not (file-exists-p msg-filename)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1709 (error "Message %d does not exist" msg-num)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1710 (if (and (> mh-show-maximum-size 0) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1711 (> (elt (file-attributes msg-filename) 7) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1712 mh-show-maximum-size) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1713 (not (y-or-n-p |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1714 (format |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1715 "Message %d (%d bytes) exceeds %d bytes. Display it? " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1716 msg-num (elt (file-attributes msg-filename) 7) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1717 mh-show-maximum-size)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1718 (error "Message %d not displayed" msg-num)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1719 (set-buffer show-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1720 (cond ((not (equal msg-filename buffer-file-name)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1721 (mh-unvisit-file) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1722 (setq buffer-read-only nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1723 (erase-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1724 ;; Changing contents, so this hook needs to be reinitialized. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1725 ;; pgp.el uses this. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1726 (if (boundp 'write-contents-hooks) ;Emacs 19 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1727 (kill-local-variable 'write-contents-hooks)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1728 (if formfile |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1729 (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1730 (if (stringp formfile) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1731 (list "-form" formfile)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1732 msg-filename) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1733 (insert-file-contents msg-filename)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1734 (if mh-decode-quoted-printable-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1735 (mh-decode-quoted-printable)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1736 ;; Cleanup old mime handles |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1737 (mh-mime-cleanup) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1738 ;; Use mm to display buffer |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1739 (when (and mh-decode-mime-flag (not formfile)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1740 (mh-add-missing-mime-version-header) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1741 (setf (mh-buffer-data) (mh-make-buffer-data)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1742 (mh-mime-display)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1743 ;; Header cleanup |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1744 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1745 (cond (clean-message-header |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1746 (mh-clean-msg-header (point-min) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1747 invisible-headers |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1748 visible-headers) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1749 (goto-char (point-min))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1750 (t |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1751 (mh-start-of-uncleaned-message))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1752 ;; the parts of visiting we want to do (no locking) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1753 (or (eq buffer-undo-list t) ;don't save undo info for prev msgs |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1754 (setq buffer-undo-list nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1755 (set-buffer-auto-saved) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1756 ;; the parts of set-visited-file-name we want to do (no locking) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1757 (setq buffer-file-name msg-filename) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1758 (setq buffer-backed-up nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1759 (auto-save-mode 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1760 (set-mark nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1761 (mh-show-mode) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1762 (unwind-protect |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1763 (when (and mh-decode-mime-flag (not formfile)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1764 (setq buffer-read-only nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1765 (mh-display-smileys) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1766 (mh-display-emphasis)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1767 (setq buffer-read-only t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1768 (set-buffer-modified-p nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1769 (setq mh-show-folder-buffer folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1770 (setq mode-line-buffer-identification |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1771 (list (format mh-show-buffer-mode-line-buffer-id |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1772 folder-name msg-num))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1773 (set-buffer folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1774 (setq mh-showing-with-headers nil)))))) |
6365 | 1775 |
1776 (defun mh-clean-msg-header (start invisible-headers visible-headers) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1777 "Flush extraneous lines in message header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1778 Header is cleaned from START to the end of the message header. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1779 INVISIBLE-HEADERS contains a regular expression specifying lines to delete |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1780 from the header. VISIBLE-HEADERS contains a regular expression specifying the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1781 lines to display. INVISIBLE-HEADERS is ignored if VISIBLE-HEADERS is non-nil." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1782 (let ((case-fold-search t) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1783 (after-change-functions nil)) ;Work around emacs-20 font-lock bug |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1784 ;causing an endless loop. |
6365 | 1785 (save-restriction |
1786 (goto-char start) | |
1787 (if (search-forward "\n\n" nil 'move) | |
1788 (backward-char 1)) | |
1789 (narrow-to-region start (point)) | |
1790 (goto-char (point-min)) | |
1791 (if visible-headers | |
1792 (while (< (point) (point-max)) | |
1793 (cond ((looking-at visible-headers) | |
1794 (forward-line 1) | |
1795 (while (looking-at "[ \t]") (forward-line 1))) | |
1796 (t | |
1797 (mh-delete-line 1) | |
1798 (while (looking-at "[ \t]") | |
1799 (mh-delete-line 1))))) | |
1800 (while (re-search-forward invisible-headers nil t) | |
1801 (beginning-of-line) | |
1802 (mh-delete-line 1) | |
1803 (while (looking-at "[ \t]") | |
1804 (mh-delete-line 1)))) | |
1805 (unlock-buffer)))) | |
1806 | |
1807 (defun mh-delete-line (lines) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1808 "Delete the next LINES lines." |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1809 (delete-region (point) (progn (forward-line lines) (point)))) |
6365 | 1810 |
1811 (defun mh-notate (msg notation offset) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1812 "Mark MSG with the character NOTATION at position OFFSET. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1813 Null MSG means the message at cursor." |
6365 | 1814 (save-excursion |
1815 (if (or (null msg) | |
1816 (mh-goto-msg msg t t)) | |
1817 (with-mh-folder-updating (t) | |
1818 (beginning-of-line) | |
1819 (forward-char offset) | |
1820 (delete-char 1) | |
1821 (insert notation))))) | |
1822 | |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1823 (defun mh-find-msg-get-num (step) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1824 "Return the message number of the message nearest the cursor. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1825 Jumps over non-message lines, such as inc errors. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1826 If we have to search, STEP tells whether to search forward or backward." |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1827 (or (mh-get-msg-num nil) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1828 (let ((msg-num nil) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1829 (nreverses 0)) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1830 (while (and (not msg-num) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1831 (< nreverses 2)) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1832 (cond ((eobp) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1833 (setq step -1) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1834 (setq nreverses (1+ nreverses))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1835 ((bobp) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1836 (setq step 1) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1837 (setq nreverses (1+ nreverses)))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1838 (forward-line step) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1839 (setq msg-num (mh-get-msg-num nil))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1840 msg-num))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1841 |
6365 | 1842 (defun mh-goto-msg (number &optional no-error-if-no-message dont-show) |
1843 "Position the cursor at message NUMBER. | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1844 Optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means return nil |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1845 instead of signaling an error if message does not exist; in this case, the |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1846 cursor is positioned near where the message would have been. |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1847 Non-nil third argument DONT-SHOW means not to show the message." |
11331 | 1848 (interactive "NGo to message: ") |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1849 (setq number (prefix-numeric-value number)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1850 (let ((point (point)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1851 (return-value t)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1852 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1853 (unless (re-search-forward (format "^[ ]*%s[^0-9]+" number) nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1854 (goto-char point) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1855 (unless no-error-if-no-message |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1856 (error "No message %d" number)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1857 (setq return-value nil)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1858 (beginning-of-line) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1859 (or dont-show (not return-value) (mh-maybe-show number)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1860 return-value)) |
6365 | 1861 |
1862 (defun mh-msg-search-pat (n) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1863 "Return a search pattern for message N in the scan listing." |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1864 (format mh-scan-msg-search-regexp n)) |
6365 | 1865 |
11331 | 1866 (defun mh-get-profile-field (field) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1867 "Find and return the value of FIELD in the current buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1868 Returns nil if the field is not in the buffer." |
11331 | 1869 (let ((case-fold-search t)) |
1870 (goto-char (point-min)) | |
1871 (cond ((not (re-search-forward (format "^%s" field) nil t)) nil) | |
1872 ((looking-at "[\t ]*$") nil) | |
1873 (t | |
1874 (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t) | |
1875 (let ((start (match-beginning 1))) | |
1876 (end-of-line) | |
1877 (buffer-substring start (point))))))) | |
1878 | |
25146
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1879 (defvar mail-user-agent) |
34599
9266023b321c
(mh-find-path): Set read-mail-command.
Gerd Moellmann <gerd@gnu.org>
parents:
27525
diff
changeset
|
1880 (defvar read-mail-command) |
25146
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1881 |
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1882 (defvar mh-find-path-run nil |
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1883 "Non-nil if `mh-find-path' has been run already.") |
11331 | 1884 |
6365 | 1885 (defun mh-find-path () |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1886 "Set `mh-progs', `mh-lib', and `mh-lib-progs' variables. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1887 Set `mh-user-path', `mh-draft-folder', `mh-unseen-seq', `mh-previous-seq', |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1888 `mh-inbox' from user's MH profile. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1889 The value of `mh-find-path-hook' is a list of functions to be called, with no |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1890 arguments, after these variable have been set." |
6365 | 1891 (mh-find-progs) |
25146
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1892 (unless mh-find-path-run |
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1893 (setq mh-find-path-run t) |
34599
9266023b321c
(mh-find-path): Set read-mail-command.
Gerd Moellmann <gerd@gnu.org>
parents:
27525
diff
changeset
|
1894 (setq read-mail-command 'mh-rmail) |
25146
1fa062857a8d
(mh-find-path-run): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
24587
diff
changeset
|
1895 (setq mail-user-agent 'mh-e-user-agent)) |
6365 | 1896 (save-excursion |
1897 ;; Be sure profile is fully expanded before switching buffers | |
1898 (let ((profile (expand-file-name (or (getenv "MH") "~/.mh_profile")))) | |
11331 | 1899 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 1900 (setq buffer-offer-save nil) ;for people who set default to t |
1901 (erase-buffer) | |
1902 (condition-case err | |
1903 (insert-file-contents profile) | |
1904 (file-error | |
1905 (mh-install profile err))) | |
11331 | 1906 (setq mh-user-path (mh-get-profile-field "Path:")) |
1907 (if (not mh-user-path) | |
6365 | 1908 (setq mh-user-path "Mail")) |
1909 (setq mh-user-path | |
1910 (file-name-as-directory | |
1911 (expand-file-name mh-user-path (expand-file-name "~")))) | |
11331 | 1912 (setq mh-draft-folder (mh-get-profile-field "Draft-Folder:")) |
1913 (if mh-draft-folder | |
1914 (progn | |
1915 (if (not (mh-folder-name-p mh-draft-folder)) | |
1916 (setq mh-draft-folder (format "+%s" mh-draft-folder))) | |
1917 (if (not (file-exists-p (mh-expand-file-name mh-draft-folder))) | |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37178
diff
changeset
|
1918 (error "Draft folder \"%s\" not found. Create it and try again" |
11331 | 1919 (mh-expand-file-name mh-draft-folder))))) |
1920 (setq mh-inbox (mh-get-profile-field "Inbox:")) | |
1921 (cond ((not mh-inbox) | |
1922 (setq mh-inbox "+inbox")) | |
1923 ((not (mh-folder-name-p mh-inbox)) | |
1924 (setq mh-inbox (format "+%s" mh-inbox)))) | |
1925 (setq mh-unseen-seq (mh-get-profile-field "Unseen-Sequence:")) | |
1926 (if mh-unseen-seq | |
1927 (setq mh-unseen-seq (intern mh-unseen-seq)) | |
1928 (setq mh-unseen-seq 'unseen)) ;old MH default? | |
1929 (setq mh-previous-seq (mh-get-profile-field "Previous-Sequence:")) | |
1930 (if mh-previous-seq | |
1931 (setq mh-previous-seq (intern mh-previous-seq))) | |
18901
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
1932 (run-hooks 'mh-find-path-hook))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1933 (and mh-auto-folder-collect-flag |
18901
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
1934 (let ((mh-no-install t)) ;only get folders if MH installed |
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
1935 (condition-case err |
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
1936 (mh-make-folder-list-background) |
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
1937 (file-error))))) ;so don't complain if not installed |
6365 | 1938 |
17893
ad5fda4d4c36
(mh-file-command-p): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17426
diff
changeset
|
1939 (defun mh-file-command-p (file) |
ad5fda4d4c36
(mh-file-command-p): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17426
diff
changeset
|
1940 "Return t if file FILE is the name of a executable regular file." |
ad5fda4d4c36
(mh-file-command-p): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17426
diff
changeset
|
1941 (and (file-regular-p file) (file-executable-p file))) |
ad5fda4d4c36
(mh-file-command-p): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17426
diff
changeset
|
1942 |
6365 | 1943 (defun mh-find-progs () |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
1944 "Find the directories for the installed MH/nmh binaries and config files. |
24420 | 1945 Set the `mh-progs' and `mh-lib', and `mh-lib-progs' variables to the |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1946 directory names and set `mh-nmh-flag' if we detect nmh instead of MH." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1947 (unless (and mh-progs mh-lib mh-lib-progs) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1948 (let ((path (or (mh-path-search exec-path "mhparam") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1949 (mh-path-search '("/usr/local/nmh/bin" ; nmh default |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1950 "/usr/local/bin/mh/" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1951 "/usr/local/mh/" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1952 "/usr/bin/mh/" ;Ultrix 4.2, Linux |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1953 "/usr/new/mh/" ;Ultrix <4.2 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1954 "/usr/contrib/mh/bin/" ;BSDI |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1955 "/usr/pkg/bin/" ; NetBSD |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1956 "/usr/local/bin/" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1957 ) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1958 "mhparam")))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1959 (if (not path) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1960 (error "Unable to find the `mhparam' command")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1961 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1962 (let ((tmp-buffer (get-buffer-create mh-temp-buffer))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1963 (set-buffer tmp-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1964 (unwind-protect |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1965 (progn |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1966 (call-process (expand-file-name "mhparam" path) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1967 nil '(t nil) nil "libdir" "etcdir") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1968 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1969 (if (search-forward-regexp "^libdir:\\s-\\(\\S-+\\)\\s-*$" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1970 nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1971 (setq mh-lib-progs (match-string 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1972 mh-lib mh-lib-progs |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1973 mh-progs path)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1974 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1975 (if (search-forward-regexp "^etcdir:\\s-\\(\\S-+\\)\\s-*$" |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1976 nil t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1977 (setq mh-lib (match-string 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1978 mh-nmh-flag t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1979 (kill-buffer tmp-buffer)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1980 (unless (and mh-progs mh-lib mh-lib-progs) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1981 (error "Unable to determine paths from `mhparam' command"))))) |
22637
030c40f7d202
(mh-find-progs): Avoid WTA error
Richard M. Stallman <rms@gnu.org>
parents:
21164
diff
changeset
|
1982 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1983 (defun mh-path-search (path file) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1984 "Search PATH, a list of directory names, for FILE. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1985 Returns the element of PATH that contains FILE, or nil if not found." |
6365 | 1986 (while (and path |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1987 (not (funcall 'mh-file-command-p |
24420 | 1988 (expand-file-name file (car path))))) |
6365 | 1989 (setq path (cdr path))) |
1990 (car path)) | |
1991 | |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1992 (defvar mh-no-install nil) ;do not run install-mh |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1993 |
6365 | 1994 (defun mh-install (profile error-val) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1995 "Initialize the MH environment. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1996 This is called if we fail to read the PROFILE file. ERROR-VAL is the error |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
1997 that made this call necessary." |
6365 | 1998 (if (or (getenv "MH") |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
1999 (file-exists-p profile) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2000 mh-no-install) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2001 (signal (car error-val) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2002 (list (format "Cannot read MH profile \"%s\"" profile) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2003 (car (cdr (cdr error-val)))))) |
6365 | 2004 ;; The "install-mh" command will output a short note which |
2005 ;; mh-exec-cmd will display to the user. | |
11331 | 2006 ;; The MH 5 version of install-mh might try prompt the user |
2007 ;; for information, which would fail here. | |
24420 | 2008 (mh-exec-cmd (expand-file-name "install-mh" mh-lib-progs) "-auto") |
6365 | 2009 ;; now try again to read the profile file |
2010 (erase-buffer) | |
2011 (condition-case err | |
2012 (insert-file-contents profile) | |
2013 (file-error | |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2014 (signal (car err) ;re-signal with more specific msg |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2015 (list (format "Cannot read MH profile \"%s\"" profile) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2016 (car (cdr (cdr err)))))))) |
6365 | 2017 |
2018 (defun mh-set-folder-modified-p (flag) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2019 "Mark current folder as modified or unmodified according to FLAG." |
6365 | 2020 (set-buffer-modified-p flag)) |
2021 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2022 (defun mh-find-seq (name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2023 "Return sequence NAME." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2024 (assoc name mh-seq-list)) |
6365 | 2025 |
2026 (defun mh-seq-to-msgs (seq) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2027 "Return a list of the messages in SEQ." |
6365 | 2028 (mh-seq-msgs (mh-find-seq seq))) |
2029 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2030 (defun mh-update-scan-format (fmt width) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2031 "Return a scan format with the (msg) width in the FMT replaced with WIDTH. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2032 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2033 The message number width portion of the format is discovered using |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2034 `mh-scan-msg-format-regexp'. Its replacement is controlled with |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2035 `mh-scan-msg-format-string'." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2036 (or (and |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2037 (string-match mh-scan-msg-format-regexp fmt) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2038 (let ((begin (match-beginning 1)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2039 (end (match-end 1))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2040 (concat (substring fmt 0 begin) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2041 (format mh-scan-msg-format-string width) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2042 (substring fmt end)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2043 fmt)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2044 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2045 (defun mh-set-cmd-note (width) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2046 "Set `mh-cmd-note' to WIDTH characters (minimum of 2). |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2047 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2048 If `mh-scan-format-file' specifies nil or a filename, then this function |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2049 will NOT update `mh-cmd-note'." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2050 ;; Add one to the width to always have whitespace in column zero. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2051 (setq width (max (1+ width) 2)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2052 (if (and (equal mh-scan-format-file t) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2053 (not (eq mh-cmd-note width))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2054 (progn |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2055 (setq mh-cmd-note width) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2056 ;; Rachet up the default value |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2057 (if (< (default-value 'mh-cmd-note) mh-cmd-note) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2058 (setq-default mh-cmd-note mh-cmd-note)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2059 mh-cmd-note) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2060 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2061 (defun mh-message-number-width (folder) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2062 "Return the widest message number in this FOLDER." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2063 (or mh-progs (mh-find-path)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2064 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2065 (width 0)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2066 (save-excursion |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2067 (set-buffer tmp-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2068 (erase-buffer) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2069 (apply 'call-process |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2070 (expand-file-name "scan" mh-progs) nil '(t nil) nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2071 (list folder "last" "-format" "%(msg)")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2072 (goto-char (point-min)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2073 (if (re-search-forward mh-scan-msg-number-regexp nil 0 1) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2074 (setq width (length (buffer-substring |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2075 (match-beginning 1) (match-end 1)))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2076 width)) |
6365 | 2077 |
2078 (defun mh-add-msgs-to-seq (msgs seq &optional internal-flag) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2079 "Add MSGS to SEQ. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2080 Remove duplicates and keep sequence sorted. If optional INTERNAL-FLAG is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2081 non-nil, do not mark the message in the scan listing or inform MH of the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2082 addition." |
6365 | 2083 (let ((entry (mh-find-seq seq))) |
2084 (if (and msgs (atom msgs)) (setq msgs (list msgs))) | |
2085 (if (null entry) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2086 (setq mh-seq-list |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2087 (cons (mh-make-seq seq (mh-canonicalize-sequence msgs)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2088 mh-seq-list)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2089 (if msgs (setcdr entry (mh-canonicalize-sequence |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2090 (append msgs (mh-seq-msgs entry)))))) |
6365 | 2091 (cond ((not internal-flag) |
2092 (mh-add-to-sequence seq msgs) | |
11331 | 2093 (mh-notate-seq seq mh-note-seq (1+ mh-cmd-note)))))) |
6365 | 2094 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2095 (defun mh-canonicalize-sequence (msgs) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2096 "Sort MSGS in decreasing order and remove duplicates." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2097 (let* ((sorted-msgs (sort (copy-sequence msgs) '>)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2098 (head sorted-msgs)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2099 (while (cdr head) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2100 (if (= (car head) (cadr head)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2101 (setcdr head (cddr head)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2102 (setq head (cdr head)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2103 sorted-msgs)) |
6365 | 2104 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2105 (defvar mh-folder-hist nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2106 (defvar mh-speed-folder-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2107 |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2108 (defun mh-prompt-for-folder (prompt default can-create |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2109 &optional default-string) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2110 "Prompt for a folder name with PROMPT. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2111 Returns the folder's name as a string. DEFAULT is used if the folder exists |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2112 and the user types return. If the CAN-CREATE flag is t, then a folder is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2113 created if it doesn't already exist. If optional argument DEFAULT-STRING is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2114 non-nil, use it in the prompt instead of DEFAULT. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2115 The value of `mh-folder-list-change-hook' is a list of functions to be called, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2116 with no arguments, whenever the cached folder list `mh-folder-list' is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2117 changed." |
6365 | 2118 (if (null default) |
2119 (setq default "")) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2120 (let* ((default-string (cond (default-string (format " [%s]? " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2121 default-string)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2122 ((equal "" default) "? ") |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2123 (t (format " [%s]? " default)))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2124 (prompt (format "%s folder%s" prompt default-string)) |
6365 | 2125 read-name folder-name) |
2126 (if (null mh-folder-list) | |
2127 (mh-set-folder-list)) | |
37178
3dab3c3ae5ee
(mh-folder-hist): New var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34599
diff
changeset
|
2128 (while (and (setq read-name (completing-read prompt mh-folder-list nil nil |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2129 "+" 'mh-folder-hist)) |
6365 | 2130 (equal read-name "") |
2131 (equal default ""))) | |
2132 (cond ((or (equal read-name "") (equal read-name "+")) | |
2133 (setq read-name default)) | |
2134 ((not (mh-folder-name-p read-name)) | |
2135 (setq read-name (format "+%s" read-name)))) | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
2136 (if (or (not read-name) (equal "" read-name)) |
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
2137 (error "No folder specified")) |
6365 | 2138 (setq folder-name read-name) |
2139 (cond ((and (> (length folder-name) 0) | |
18926
e597d4b325df
Change eql calls to eq.
Richard M. Stallman <rms@gnu.org>
parents:
18901
diff
changeset
|
2140 (eq (aref folder-name (1- (length folder-name))) ?/)) |
6365 | 2141 (setq folder-name (substring folder-name 0 -1)))) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2142 (let ((new-file-flag |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2143 (not (file-exists-p (mh-expand-file-name folder-name))))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2144 (cond ((and new-file-flag |
6365 | 2145 (y-or-n-p |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2146 (format "Folder %s does not exist. Create it? " |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2147 folder-name))) |
6365 | 2148 (message "Creating %s" folder-name) |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2149 (mh-exec-cmd-error nil "folder" folder-name) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2150 (when (boundp 'mh-speed-folder-map) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2151 (mh-speed-add-folder folder-name)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2152 (message "Creating %s...done" folder-name) |
11331 | 2153 (setq mh-folder-list (cons (list read-name) mh-folder-list)) |
2154 (run-hooks 'mh-folder-list-change-hook)) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2155 (new-file-flag |
6365 | 2156 (error "Folder %s is not created" folder-name)) |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2157 ((not (file-directory-p (mh-expand-file-name folder-name))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2158 (error "\"%s\" is not a directory" |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2159 (mh-expand-file-name folder-name))) |
6365 | 2160 ((and (null (assoc read-name mh-folder-list)) |
2161 (null (assoc (concat read-name "/") mh-folder-list))) | |
11331 | 2162 (setq mh-folder-list (cons (list read-name) mh-folder-list)) |
2163 (run-hooks 'mh-folder-list-change-hook)))) | |
6365 | 2164 folder-name)) |
2165 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2166 (defvar mh-make-folder-list-process nil) ;The background process collecting |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2167 ;the folder list. |
6365 | 2168 |
11331 | 2169 (defvar mh-folder-list-temp nil) ;mh-folder-list as it is being built. |
6365 | 2170 |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2171 (defvar mh-folder-list-partial-line "") ;Start of last incomplete line from |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2172 ;folder process. |
6365 | 2173 |
2174 (defun mh-set-folder-list () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2175 "Set `mh-folder-list' correctly. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2176 A useful function for the command line or for when you need to |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2177 sync by hand. Format is in a form suitable for completing read. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2178 The value of `mh-folder-list-change-hook' is a list of functions to be called, |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2179 with no arguments, once the list of folders has been created." |
6365 | 2180 (message "Collecting folder names...") |
2181 (if (not mh-make-folder-list-process) | |
2182 (mh-make-folder-list-background)) | |
2183 (while (eq (process-status mh-make-folder-list-process) 'run) | |
2184 (accept-process-output mh-make-folder-list-process)) | |
2185 (setq mh-folder-list mh-folder-list-temp) | |
11331 | 2186 (run-hooks 'mh-folder-list-change-hook) |
6365 | 2187 (setq mh-folder-list-temp nil) |
2188 (delete-process mh-make-folder-list-process) | |
2189 (setq mh-make-folder-list-process nil) | |
2190 (message "Collecting folder names...done")) | |
2191 | |
2192 (defun mh-make-folder-list-background () | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2193 "Start a background process to compute a list of the user's folders. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2194 Call `mh-set-folder-list' to wait for the result." |
6365 | 2195 (cond |
2196 ((not mh-make-folder-list-process) | |
18901
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
2197 (unless mh-inbox |
b9b03935853a
(mh-make-folder-list-background):
Richard M. Stallman <rms@gnu.org>
parents:
18889
diff
changeset
|
2198 (mh-find-path)) |
6365 | 2199 (let ((process-connection-type nil)) |
2200 (setq mh-make-folder-list-process | |
2201 (start-process "folders" nil (expand-file-name "folders" mh-progs) | |
2202 "-fast" | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2203 (if mh-recursive-folders-flag |
6365 | 2204 "-recurse" |
2205 "-norecurse"))) | |
2206 (set-process-filter mh-make-folder-list-process | |
2207 'mh-make-folder-list-filter) | |
2208 (process-kill-without-query mh-make-folder-list-process))))) | |
2209 | |
2210 (defun mh-make-folder-list-filter (process output) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2211 "Given the PROCESS \"folders -fast\", parse OUTPUT. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2212 See also `set-process-filter'." |
6365 | 2213 (let ((position 0) |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2214 line-end |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2215 new-folder |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2216 (prevailing-match-data (match-data))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2217 (unwind-protect |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2218 ;; make sure got complete line |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2219 (while (setq line-end (string-match "\n" output position)) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2220 (setq new-folder (format "+%s%s" |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2221 mh-folder-list-partial-line |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2222 (substring output position line-end))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2223 (setq mh-folder-list-partial-line "") |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2224 ;; is new folder a subfolder of previous? |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2225 (if (and mh-folder-list-temp |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2226 (string-match |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2227 (regexp-quote |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2228 (concat (car (car mh-folder-list-temp)) "/")) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2229 new-folder)) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2230 ;; append slash to parent folder for better completion |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2231 ;; (undone by mh-prompt-for-folder) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2232 (setq mh-folder-list-temp |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2233 (cons |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2234 (list new-folder) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2235 (cons |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2236 (list (concat (car (car mh-folder-list-temp)) "/")) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2237 (cdr mh-folder-list-temp)))) |
6365 | 2238 (setq mh-folder-list-temp |
2239 (cons (list new-folder) | |
13386
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2240 mh-folder-list-temp))) |
78c7ebcbd9fe
(mh-goto-msg): binary search (much faster!).
Karl Heuer <kwzh@gnu.org>
parents:
11576
diff
changeset
|
2241 (setq position (1+ line-end))) |
21164
966308b754da
(mh-make-folder-list-filter): store-match-data => set-match-data.
Richard M. Stallman <rms@gnu.org>
parents:
18926
diff
changeset
|
2242 (set-match-data prevailing-match-data)) |
6365 | 2243 (setq mh-folder-list-partial-line (substring output position)))) |
2244 | |
2245 ;;; Issue commands to MH. | |
2246 | |
2247 (defun mh-exec-cmd (command &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2248 "Execute mh-command COMMAND with ARGS. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2249 The side effects are what is desired. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2250 Any output is assumed to be an error and is shown to the user. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2251 The output is not read or parsed by MH-E." |
6365 | 2252 (save-excursion |
11331 | 2253 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 2254 (erase-buffer) |
2255 (apply 'call-process | |
2256 (expand-file-name command mh-progs) nil t nil | |
2257 (mh-list-to-string args)) | |
2258 (if (> (buffer-size) 0) | |
2259 (save-window-excursion | |
11331 | 2260 (switch-to-buffer-other-window mh-temp-buffer) |
6365 | 2261 (sit-for 5))))) |
2262 | |
2263 (defun mh-exec-cmd-error (env command &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2264 "In environment ENV, execute mh-command COMMAND with ARGS. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2265 ENV is nil or a string of space-separated \"var=value\" elements. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2266 Signals an error if process does not complete successfully." |
6365 | 2267 (save-excursion |
11331 | 2268 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 2269 (erase-buffer) |
2270 (let ((status | |
2271 (if env | |
2272 ;; the shell hacks necessary here shows just how broken Unix is | |
2273 (apply 'call-process "/bin/sh" nil t nil "-c" | |
2274 (format "%s %s ${1+\"$@\"}" | |
47730
2568d5a27317
Upgraded to mh-e version 6.1.1.
Bill Wohler <wohler@newt.com>
parents:
42323
diff
changeset
|
2275 env |
6365 | 2276 (expand-file-name command mh-progs)) |
2277 command | |
2278 (mh-list-to-string args)) | |
2279 (apply 'call-process | |
2280 (expand-file-name command mh-progs) nil t nil | |
2281 (mh-list-to-string args))))) | |
2282 (mh-handle-process-error command status)))) | |
2283 | |
2284 (defun mh-exec-cmd-daemon (command &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2285 "Execute MH command COMMAND with ARGS in the background. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2286 Any output from command is displayed in an asynchronous pop-up window." |
6365 | 2287 (save-excursion |
11331 | 2288 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 2289 (erase-buffer)) |
2290 (let* ((process-connection-type nil) | |
2291 (process (apply 'start-process | |
2292 command nil | |
2293 (expand-file-name command mh-progs) | |
2294 (mh-list-to-string args)))) | |
2295 (set-process-filter process 'mh-process-daemon))) | |
2296 | |
2297 (defun mh-process-daemon (process output) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2298 "PROCESS daemon that puts OUTPUT into a temporary buffer." |
11331 | 2299 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 2300 (insert-before-markers output) |
11331 | 2301 (display-buffer mh-temp-buffer)) |
6365 | 2302 |
2303 (defun mh-exec-cmd-quiet (raise-error command &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2304 "Signal RAISE-ERROR if COMMAND with ARGS fails. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2305 Execute MH command COMMAND with ARGS. ARGS is a list of strings. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2306 Return at start of mh-temp buffer, where output can be parsed and used. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2307 Returns value of `call-process', which is 0 for success, unless RAISE-ERROR is |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2308 non-nil, in which case an error is signaled if `call-process' returns non-0." |
11331 | 2309 (set-buffer (get-buffer-create mh-temp-buffer)) |
6365 | 2310 (erase-buffer) |
2311 (let ((value | |
2312 (apply 'call-process | |
2313 (expand-file-name command mh-progs) nil t nil | |
2314 args))) | |
2315 (goto-char (point-min)) | |
2316 (if raise-error | |
2317 (mh-handle-process-error command value) | |
2318 value))) | |
2319 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2320 (defun mh-exchange-point-and-mark-preserving-active-mark () |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2321 "Put the mark where point is now, and point where the mark is now. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2322 This command works even when the mark is not active, and preserves whether the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2323 mark is active or not." |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2324 (interactive nil) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2325 (let ((is-active (and (boundp 'mark-active) mark-active))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2326 (let ((omark (mark t))) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2327 (if (null omark) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2328 (error "No mark set in this buffer")) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2329 (set-mark (point)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2330 (goto-char omark) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2331 (if (boundp 'mark-active) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2332 (setq mark-active is-active)) |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2333 nil))) |
6365 | 2334 |
2335 (defun mh-exec-cmd-output (command display &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2336 "Execute MH command COMMAND with DISPLAY flag and ARGS. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2337 Put the output into buffer after point. Set mark after inserted text. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2338 Output is expected to be shown to user, not parsed by MH-E." |
6365 | 2339 (push-mark (point) t) |
2340 (apply 'call-process | |
2341 (expand-file-name command mh-progs) nil t display | |
2342 (mh-list-to-string args)) | |
2343 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2344 ;; The following is used instead of 'exchange-point-and-mark because the |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2345 ;; latter activates the current region (between point and mark), which |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2346 ;; turns on highlighting. So prior to this bug fix, doing "inc" would |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2347 ;; highlight a region containing the new messages, which is undesirable. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2348 ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2349 (mh-exchange-point-and-mark-preserving-active-mark)) |
6365 | 2350 |
2351 (defun mh-exec-lib-cmd-output (command &rest args) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2352 "Execute MH library command COMMAND with ARGS. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2353 Put the output into buffer after point. Set mark after inserted text." |
24420 | 2354 (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args)) |
6365 | 2355 |
2356 (defun mh-handle-process-error (command status) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2357 "Raise error if COMMAND returned non-zero STATUS, otherwise return STATUS. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2358 STATUS is return value from `call-process'. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2359 Program output is in current buffer. |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2360 If output is too long to include in error message, display the buffer." |
18926
e597d4b325df
Change eql calls to eq.
Richard M. Stallman <rms@gnu.org>
parents:
18901
diff
changeset
|
2361 (cond ((eq status 0) ;success |
6365 | 2362 status) |
2363 ((stringp status) ;kill string | |
14426
9f18c1b097ce
(mh-handle-process-error): Fix error format string.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
2364 (error "%s: %s" command status)) |
6365 | 2365 (t ;exit code |
2366 (cond | |
2367 ((= (buffer-size) 0) ;program produced no error message | |
14426
9f18c1b097ce
(mh-handle-process-error): Fix error format string.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
2368 (error "%s: exit code %d" command status)) |
6365 | 2369 (t |
2370 ;; will error message fit on one line? | |
2371 (goto-line 2) | |
42323 | 2372 (if (and (< (buffer-size) (frame-width)) |
6365 | 2373 (eobp)) |
14426
9f18c1b097ce
(mh-handle-process-error): Fix error format string.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
2374 (error "%s" |
9f18c1b097ce
(mh-handle-process-error): Fix error format string.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
2375 (buffer-substring 1 (progn (goto-char 1) |
6365 | 2376 (end-of-line) |
2377 (point)))) | |
2378 (display-buffer (current-buffer)) | |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37178
diff
changeset
|
2379 (error "%s failed with status %d. See error message in other window" |
14426
9f18c1b097ce
(mh-handle-process-error): Fix error format string.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
2380 command status))))))) |
6365 | 2381 |
2382 (defun mh-list-to-string (l) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2383 "Flatten the list L and make every element of the new list into a string." |
6365 | 2384 (nreverse (mh-list-to-string-1 l))) |
2385 | |
2386 (defun mh-list-to-string-1 (l) | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2387 "Flatten the list L and make every element of the new list into a string." |
6365 | 2388 (let ((new-list nil)) |
2389 (while l | |
2390 (cond ((null (car l))) | |
2391 ((symbolp (car l)) | |
2392 (setq new-list (cons (symbol-name (car l)) new-list))) | |
2393 ((numberp (car l)) | |
2394 (setq new-list (cons (int-to-string (car l)) new-list))) | |
2395 ((equal (car l) "")) | |
2396 ((stringp (car l)) (setq new-list (cons (car l) new-list))) | |
2397 ((listp (car l)) | |
2398 (setq new-list (nconc (mh-list-to-string-1 (car l)) | |
2399 new-list))) | |
2400 (t (error "Bad element in mh-list-to-string: %s" (car l)))) | |
2401 (setq l (cdr l))) | |
2402 new-list)) | |
2403 | |
2404 (provide 'mh-utils) | |
2405 | |
48595
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2406 ;;; Local Variables: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2407 ;;; sentence-end-double-space: nil |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2408 ;;; End: |
8aaba207e44b
Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
47730
diff
changeset
|
2409 |
6365 | 2410 ;;; mh-utils.el ends here |