annotate lisp/utils/highlight-headers.el @ 173:8eaf7971accc r20-3b13

Import from CVS: tag r20-3b13
author cvs
date Mon, 13 Aug 2007 09:49:09 +0200
parents 43dd3413c7c7
children 850242ba4a81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; highlight-headers.el --- highlighting message headers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Tinker Systems
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Keywords: mail, news
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
23 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; Synched up with: Not in FSF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
27 ;; This code is shared by RMAIL and VM.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;; Faces:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;; message-headers the part before the colon
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;; message-header-contents the part after the colon
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;; message-highlighted-header-contents contents of "special" headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;; message-cited-text quoted text from other messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;; Variables:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;; highlight-headers-regexp what makes a "special" header
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;; highlight-headers-citation-regexp matches lines of quoted text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;; highlight-headers-citation-header-regexp matches headers for quoted text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
42 (defgroup highlight-headers nil
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
43 "Fancify rfc822 documents."
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
44 :group 'mail
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
45 :group 'news)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
47 (defgroup highlight-headers-faces nil
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
48 "Faces of highlighted headers."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
49 :group 'highlight-headers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
50 :group 'faces)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
51
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
52 (defface message-headers '((t (:bold t)))
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
53 "Face used for header part before colon."
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
54 :group 'highlight-headers-faces)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
56 (defface message-header-contents '((t (:italic t)))
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
57 "Face used for header part after colon."
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
58 :group 'highlight-headers-faces)
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
59
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
60 (defface message-highlighted-header-contents '((t (:italic t :bold t)))
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
61 "Face used for contents of \"special\" headers."
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
62 :group 'highlight-headers-faces)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
64 (defface message-cited-text '((t (:italic t)))
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
65 "Face used for cited text."
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
66 :group 'highlight-headers-faces)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
68 (defface x-face '((t (:background "white" :foreground "black")))
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 16
diff changeset
69 "Face used for X-Face icon."
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
70 :group 'highlight-headers-faces)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;;(condition-case nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 ;; (face-name 'message-addresses)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;; (wrong-type-argument
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 ;; (make-face 'message-addresses)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 ;; (or (face-differs-from-default-p 'message-addresses)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 ;; (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 ;; (copy-face 'bold-italic 'message-addresses)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 ;; (set-face-underline-p 'message-addresses
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 ;; (face-underline-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 ;; 'message-highlighted-header-contents))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
83 (defcustom highlight-headers-regexp "Subject[ \t]*:"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 "*The headers whose contents should be emphasized more.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 The contents of these headers will be displayed in the face
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
86 `message-highlighted-header-contents' instead of `message-header-contents'."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
87 :type 'regexp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
88 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
90 (defcustom highlight-headers-citation-regexp
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (concat "^\\("
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (mapconcat 'identity
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 '("[ \t]*[a-zA-Z0-9_]+>+" ; supercite
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 "[ \t]*[>]+" ; ">" with leading spaces
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 "[]}<>|:]+[ \t]*" ; other chars, no leading space
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 "\\|")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 "\\)[ \t]*")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 "*The pattern to match cited text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 Text in the body of a message which matches this will be displayed in
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
101 the face `message-cited-text'."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
102 :type 'regexp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
103 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
105 (defcustom highlight-headers-citation-header-regexp
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (concat "^In article\\|^In message\\|"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 "^[^ \t].*\\(writes\\|wrote\\|said\\):\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (substring highlight-headers-citation-regexp 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 "*The pattern to match the prolog of a cited block.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 Text in the body of a message which matches this will be displayed in
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
111 the `message-headers' face."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
112 :type 'regexp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
113 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
115 (defcustom highlight-headers-highlight-citation-too nil
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 "*Whether the whole citation line should go in the `mesage-cited-text' face.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 If nil, the text matched by `highlight-headers-citation-regexp' is in the
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
118 default face, and the remainder of the line is in the message-cited-text face."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
119 :type 'boolean
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
120 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
122 (defcustom highlight-headers-max-message-size 10000
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 "*If the message body is larger than this many chars, don't highlight it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 This is to prevent us from wasting time trying to fontify things like
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 uuencoded files and large digests. If this is nil, all messages will
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
126 be highlighted."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
127 :type '(choice integer
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
128 (const :tag "Highlight All" nil))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
129 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
131 (defcustom highlight-headers-hack-x-face-p (featurep 'xface)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 "*If true, then the bitmap in an X-Face header will be displayed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 in the buffer. This assumes you have the `uncompface' and `icontopbm'
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
134 programs on your path."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
135 :type 'boolean
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
136 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
138 (defcustom highlight-headers-convert-quietly nil
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 "*Non-nil inhibits the message that is normally displayed when external
124
9b50b4588a93 Import from CVS: tag r20-1b15
cvs
parents: 116
diff changeset
140 filters are used to convert an X-Face header. This has no effect if
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
141 XEmacs is compiled with internal support for x-faces."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
142 :type 'boolean
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
143 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
145 (defcustom highlight-headers-invert-x-face-data nil
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 "*If true, causes the foreground and background bits in an X-Face
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 header to be flipped before the image is displayed. If you use a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 light foreground color on a dark background color, you probably want
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 to set this to t. This assumes that you have the `pnminvert' program
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
150 on your path. This doesn't presently work with internal xface support."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
151 :type 'boolean
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
152 :group 'highlight-headers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (defun highlight-headers (start end hack-sig)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 "Highlight message headers between start and end.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 Faces used:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 message-headers the part before the colon
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 message-header-contents the part after the colon
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 message-highlighted-header-contents contents of \"special\" headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 message-cited-text quoted text from other messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 Variables used:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 highlight-headers-regexp what makes a \"special\" header
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 highlight-headers-citation-regexp matches lines of quoted text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 highlight-headers-citation-header-regexp matches headers for quoted text
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 If HACK-SIG is true,then we search backward from END for something that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 looks like the beginning of a signature block, and don't consider that a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 part of the message (this is because signatures are often incorrectly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 interpreted as cited text.)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (if (< end start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (let ((s start)) (setq start end end s)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (let* ((too-big (and highlight-headers-max-message-size
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (> (- end start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 highlight-headers-max-message-size)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (real-end end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 e p hend)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 ;; delete previous highlighting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (map-extents (function (lambda (extent ignore)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (if (extent-property extent 'headers)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (delete-extent extent))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (current-buffer) start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 ;; take off signature
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (if (and hack-sig (not too-big))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (goto-char end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 (if (re-search-backward "\n--+ *\n" start t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 (if (eq (char-after (point)) ?\n)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 (setq end (1+ (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (setq end (point))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (narrow-to-region start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 ;; narrow down to just the headers...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 ;; If this search fails then the narrowing performed above
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 ;; is sufficient
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (if (re-search-forward "^$" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (narrow-to-region (point-min) (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 ((looking-at "^\\([^ \t\n:]+[ \t]*:\\) *\\(.*\\(\n[ \t].*\\)*\n\\)")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (setq hend (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (setq e (make-extent (match-beginning 1) (match-end 1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (set-extent-face e 'message-headers)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 (setq p (match-end 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ((and highlight-headers-hack-x-face-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 (save-match-data (looking-at "^X-Face: *")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 ;; make the whole header invisible
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (setq e (make-extent (match-beginning 0) (match-end 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 (set-extent-property e 'invisible t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 ;; now extract the xface and put it somewhere interesting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 (let ((xface (highlight-headers-x-face-to-pixmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 (match-beginning 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (match-end 2))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (if (not xface)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 nil ; just leave the header invisible if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 ; we can't convert the face for some
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 ; reason
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 (cond ((save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 (save-excursion (re-search-forward "^From: *"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 nil t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (setq e (make-extent (match-end 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 (match-end 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 (t
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
238 ;; okay, make the beginning of the invisible
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 ;; move forward to only hide the modem noise...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (set-extent-endpoints e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 (match-beginning 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 (1- (match-end 2)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 ;; kludge: if a zero-length extent exists at the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 ;; starting point of an invisible extent, then
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 ;; it's invisible... even if the invisible extent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 ;; is start-open.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 (setq e (make-extent (1- (match-beginning 2))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 (match-beginning 2)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 (set-extent-end-glyph e xface))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 ;;; I don't think this is worth the effort
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 ;;; ((looking-at "\\(From\\|Resent-From\\)[ \t]*:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 ;;; (setq current 'message-highlighted-header-contents)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 ;;; (goto-char (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 ;;; (or (looking-at ".*(\\(.*\\))")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 ;;; (looking-at "\\(.*\\)<")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 ;;; (looking-at "\\(.*\\)[@%]")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 ;;; (looking-at "\\(.*\\)"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 ;;; (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 ;;; (setq e (make-extent p (match-beginning 1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 ;;; (set-extent-face e current)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 ;;; (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 ;;; (setq e (make-extent (match-beginning 1) (match-end 1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 ;;; (set-extent-face e 'message-addresses)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 ;;; (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 ;;; (setq e (make-extent (match-end 1) (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 ;;; (set-extent-face e current)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 ;;; (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 ;;; )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 ((and highlight-headers-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 (save-match-data (looking-at highlight-headers-regexp)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 (setq e (make-extent (match-beginning 2) (match-end 2)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 (set-extent-face e 'message-highlighted-header-contents)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 (set-extent-property e 'headers t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 (setq e (make-extent (match-beginning 2) (match-end 2)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 (set-extent-face e 'message-header-contents)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 (set-extent-property e 'headers t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 (goto-char hend))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 ;; ignore non-header field name lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 (t (forward-line 1)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 ;; now do the body, unless it's too big....
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 (if too-big
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 (cond ((null highlight-headers-citation-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 ((looking-at highlight-headers-citation-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 (or highlight-headers-highlight-citation-too
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 (goto-char (match-end 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 (or (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 (beginning-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 (let ((case-fold-search nil)) ; aaaaah, unix...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 (looking-at "^>From ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 (setq current 'message-cited-text)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 ;;; ((or (looking-at "^In article\\|^In message")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 ;;; (looking-at
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 ;;; "^[^ \t].*\\(writes\\|wrote\\|said\\):\n[ \t]+[A-Z]*[]}<>|]"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 ;;; (setq current 'message-headers))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 ((null highlight-headers-citation-header-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 ((looking-at highlight-headers-citation-header-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 (setq current 'message-headers))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 (t (setq current nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 (cond (current
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 (forward-line 1) ; this is to put the \n in the face too
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 (setq e (make-extent p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 (forward-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 (set-extent-face e current)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 (set-extent-property e 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 (forward-line 1)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 (narrow-to-region start real-end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 (highlight-headers-mark-urls start real-end)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 ;;; X-Face header conversion:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 ;;; This cache is only used if x-face conversion is done with external
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 ;;; filters. If XEmacs is compiled --with-xface, then it's better to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 ;;; convert it twice than to suck up memory for a potentially large cache of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 ;;; stuff that's not difficult to recreate.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (defvar highlight-headers-x-face-to-pixmap-cache nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 (defun highlight-headers-x-face-to-pixmap (start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 (let* ((string (if (stringp start) start (buffer-substring start end)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 (data (assoc string highlight-headers-x-face-to-pixmap-cache)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 (if (featurep 'xface)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 (let ((new-face (make-glyph (concat "X-Face: " string))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 (set-glyph-face new-face 'x-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 new-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 ;; YUCK this is the old two-external-filters-plus-a-bunch-of-lisp method
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 (if data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 (cdr data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 (setq data (cons string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 (condition-case c
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 (highlight-headers-parse-x-face-data start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 (error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 (display-error c nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 (sit-for 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 (setq highlight-headers-x-face-to-pixmap-cache
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 (cons data highlight-headers-x-face-to-pixmap-cache))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 (cdr data)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 ;;; Kludge kludge kludge for displaying the bitmap in the X-Face header.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 ;;; This depends on the following programs: icontopbm, from the pbmplus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 ;;; toolkit (available everywhere) and uncompface, which comes with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 ;;; several faces-related packages, and can also be had at ftp.clark.net
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 ;;; in /pub/liebman/compface.tar.Z. See also xfaces 3.*. Not needed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 ;;; for this, but a very nice xbiff replacment.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 (defconst highlight-headers-x-face-bitrev
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 (purecopy
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 (eval-when-compile
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 (let* ((v (make-string 256 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 (i (1- (length v))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 (while (>= i 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 (let ((j 7)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 (k 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 (while (>= j 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 (if (/= 0 (logand i (lsh 1 (- 7 j))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 (setq k (logior k (lsh 1 j))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 (setq j (1- j)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 (aset v i k))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 (setq i (1- i)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 v))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 (defun highlight-headers-parse-x-face-data (start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 (let ((b (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 (lines 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 (or highlight-headers-convert-quietly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 (message "Converting X-Face header to pixmap ..."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 (set-buffer (get-buffer-create " *x-face-tmp*"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 (buffer-disable-undo (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 (if (stringp start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 (insert start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 (insert-buffer-substring b start end))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 (while (search-forward "\n" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 (skip-chars-backward " \t\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 (setq p (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 (skip-chars-forward " \t\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 (delete-region p (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 (call-process-region (point-min) (point-max) "uncompface" t t nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 (or (looking-at "0x....,0x....,0x...., *$")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 (error "unexpected uncompface output"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 (forward-line 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 (setq lines (1+ lines))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 (delete-char -1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 (insert (format "/* Format_version=1, Width=%d, Height=%d" lines lines))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 (insert ", Depth=1, Valid_bits_per_item=16\n */\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 (insert ?\t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 (forward-char 56) ; 7 groups per line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 (insert ?\n))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 (forward-char -1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 (delete-char -1) ; take off last comma
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 ;; Ok, now we've got the format that "icontopbm" knows about.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 (call-process-region (point-min) (point-max) "icontopbm" t t nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 ;; Invert the image if the user wants us to...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 (if highlight-headers-invert-x-face-data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 (call-process-region (point-min) (point-max) "pnminvert" t t nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 ;; If PBM is using binary mode, we're winning.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 (let ((new-face))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 (cond ((looking-at "P4\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 (forward-line 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 (delete-region (point-min) (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 (insert (aref highlight-headers-x-face-bitrev
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 (following-char)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 (delete-char 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 (setq new-face (make-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 (vector 'xbm :data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 (list lines lines (prog1 (buffer-string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 (erase-buffer))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439 (set-glyph-image new-face "[xface]" 'global 'tty)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 (set-glyph-face new-face 'x-face))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441 (t ; fix me
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 (error "I only understand binary-format PBM...")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 (or highlight-headers-convert-quietly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 (message "Converting X-Face header to pixmap ... done."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 new-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 ;;; "The Internet's new BBS!" -Boardwatch Magazine
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 ;;; URL support by jwz@netscape.com
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
452 (defcustom highlight-headers-mark-urls (string-match "XEmacs" emacs-version)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
453 "*Whether to make URLs clickable in message bodies."
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
454 :type 'boolean
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
455 :group 'highlight-headers)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
456
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
457 ;; Uh, these should really use browse-url. They are too lame to be
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 155
diff changeset
458 ;; customized.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 (defvar highlight-headers-follow-url-function 'w3-fetch
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 "The function to invoke to follow a URL.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 Possible values that work out of the box are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 'w3-fetch == Use emacs-w3
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 124
diff changeset
465 'highlight-headers-follow-url-netscape == Use Netscape
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 'highlight-headers-follow-url-mosaic == Use Mosaic")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 (defvar highlight-headers-follow-url-netscape-auto-raise t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 "*Whether to make Netscape auto-raise when a URL is sent to it.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 (defvar highlight-headers-follow-url-netscape-new-window nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 "*Whether to make Netscape create a new window when a URL is sent to it.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 (defun highlight-headers-follow-url-netscape (url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 (message "Sending URL to Netscape...")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 (set-buffer (get-buffer-create "*Shell Command Output*"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 (if (equal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 (apply 'call-process "netscape" nil t nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 "-remote"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 (nconc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 (and (not highlight-headers-follow-url-netscape-auto-raise)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 (list "-noraise"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488 (concat "openURL(" url
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 (if highlight-headers-follow-url-netscape-new-window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 ",new-window)" ")"))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 ;; it worked
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 ;; it didn't work, so start a new Netscape process.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 (call-process "netscape" nil 0 nil url)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 (message "Sending URL to Netscape... done"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 (defun highlight-headers-follow-url-mosaic (url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 (message "Sending URL to Mosaic...")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 (let ((pid-file "~/.mosaicpid")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 (work-buffer " *mosaic work*")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 (pid nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503 (cond ((file-readable-p pid-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 (set-buffer (get-buffer-create work-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 (insert-file-contents pid-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 (setq pid (int-to-string (string-to-int (buffer-string))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 (insert "goto" ?\n)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510 (insert url ?\n)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 (write-region (point-min) (point-max)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 (concat "/tmp/Mosaic." pid)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 nil 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 (set-buffer-modified-p nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 (kill-buffer work-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 (cond ((or (null pid)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 (not (equal 0 (call-process "kill" nil nil nil "-USR1" pid))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 (call-process "Mosaic" nil 0 nil url))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 (message "Sending URL to Mosaic... done"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 (defvar highlight-headers-url-keymap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 (let ((m (make-sparse-keymap)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 (set-keymap-name m 'highlight-headers-url-keymap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 (if (string-match "XEmacs" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 (define-key m 'button2 'highlight-headers-follow-url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 m))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 (defun highlight-headers-follow-url (event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 (interactive "e")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533 (let* ((p (event-point event))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 (buffer (window-buffer (event-window event)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 (extent (and p (extent-at p buffer 'highlight)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 (url (and extent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 (set-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 (buffer-substring (extent-start-position extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 (extent-end-position extent))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 (if (and url (string-match "\\`<\\([^>]+\\)>\\'" url))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 (setq url (concat "news:"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 (substring url (match-beginning 1) (match-end 1)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 (if url
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 (funcall highlight-headers-follow-url-function url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 (beep))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 (defconst highlight-headers-url-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 (concat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|s?news\\|telnet\\|mailbox\\):"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 "\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 "[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]+"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 (defun highlight-headers-mark-urls (start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 (highlight-headers-mark-urls
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 (while (re-search-forward highlight-headers-url-pattern nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 (let ((s (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 e
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 (goto-char (match-end 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 ;(skip-chars-forward "^ \t\n\r")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 (skip-chars-backward ".?#!*()")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 (setq e (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 (setq extent (make-extent s e))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 (set-extent-face extent 'bold)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 (set-extent-property extent 'highlight t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 (set-extent-property extent 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 (set-extent-property extent 'keymap highlight-headers-url-keymap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 (while (re-search-forward "^Message-ID: \\(<[^>\n]+>\\)" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 (let ((s (match-beginning 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 (e (match-end 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 (setq extent (make-extent s e))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 (set-extent-face extent 'bold)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 (set-extent-property extent 'highlight t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 (set-extent-property extent 'headers t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 (set-extent-property extent 'keymap highlight-headers-url-keymap)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 ))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 (provide 'highlight-headers)