annotate generic-extras.el @ 18:2a3055313d1e

*** empty log message ***
author ht
date Sat, 19 Apr 2008 19:10:28 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
1 ;;; generic-extras.el --- Extra Modes for generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
2 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
3 ;; Author: Peter Breton <pbreton@i-kinetics.com>
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
4 ;; Created: Tue Oct 08 1996
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
5 ;; Version: $Id$
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
6 ;; Keywords:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
7 ;; Time-stamp: <98/02/10 22:48:22 pbreton>
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
8 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
9 ;; Copyright (C) Peter Breton 01Nov96
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
10 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
11 ;; This is free software; you can redistribute it and/or modify
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
14 ;; any later version.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
15 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
16 ;; generic-extras.el is distributed in the hope that it will be useful,
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
19 ;; General Public License for more details.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
20 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
23 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
24 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
25 ;; LCD Archive Entry:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
26 ;; generic-extras|Peter Breton|pbreton@i-kinetics.com|
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
27 ;; Sample modes for 'generic-mode'|
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
28 ;; 01-Nov-1996|1.0|~/misc/generic-extras.el.gz|
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
29 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
30 ;;; Commentary:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
31 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
32 ;; This file contains some pre-defined generic-modes.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
33 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
34 ;; INSTALLATION:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
35 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
36 ;; Add this line to your .emacs file:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
37 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
38 ;; (require 'generic-extras)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
39 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
40 ;; You can decide which modes to load by setting the variable
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
41 ;; 'generic-extras-enable-list'. Some platform-specific modes are
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
42 ;; affected by the variables 'generic-define-mswindows-modes' and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
43 ;; 'generic-define-unix-modes' (which see).
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
44 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
45 ;; ALTERING THESE MODES:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
46 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
47 ;; To alter the definition of these modes, use the 'alter-generic-mode-'
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
48 ;; convenience functions defined in generic-mode.el. Each of these functions
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
49 ;; takes an optional how-to-alter argument, which can be one of the following
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
50 ;; symbols: 'overwrite, 'append, 'prepend.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
51 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
52 ;; You can also send me new modes (I'll accept ones for file types which are
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
53 ;; reasonably common) or patches to these ones.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
54 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
55 ;; PROBLEMS WHEN USED WITH FOLDING MODE:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
56 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
57 ;; From Anders Lindgren <andersl@csd.uu.se>
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
58 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
59 ;; Problem summary: Wayne Adams has found a problem when using folding
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
60 ;; mode in conjuction with font-lock for a mode defined in
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
61 ;; `generic-extras.el'.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
62 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
63 ;; The problem, as Wayne described it, was that error messages of the
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
64 ;; following form appeared when both font-lock and folding are used:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
65 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
66 ;; > - various msgs including "Fontifying region...(error Stack
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
67 ;; > overflow in regexp matcher)" appear
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
68 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
69 ;; I have just tracked down the cause of the problem. The regexp:s in
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
70 ;; `generic-extras.el' does not take into account the way that folding
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
71 ;; hides sections of the buffer. The technique is known as
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
72 ;; `selective-display' and has been available for a very long time (I
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
73 ;; started using it back in the good old' Emacs 18 days). Basically, a
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
74 ;; section is hidden by creating one very long line were the newline
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
75 ;; character (C-j) is replaced by a linefeed (C-m) character.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
76 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
77 ;; Many other hiding packages, besides folding, use the same technique,
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
78 ;; the problem should occur when using them as well.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
79 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
80 ;; The erroronous lines in `generic-extras' look like the following (this
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
81 ;; example is from the `ini' section):
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
82 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
83 ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
84 ;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
85 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
86 ;; The intention of these lines is to highlight lines of the following
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
87 ;; form:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
88 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
89 ;; [foo]
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
90 ;; bar = xxx
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
91 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
92 ;; However, since the `.' regexp symbol match the linefeed character the
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
93 ;; entire folded section is searched, resulting in a regexp stack
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
94 ;; overflow.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
95 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
96 ;; Solution suggestion 2: Instead of using ".", use the sequence
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
97 ;; "[^\n\r]". This will make the rules behave just as before, but they
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
98 ;; will work together with selective-display.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
99 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
100 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
101 ;;; Change log:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
102 ;; $Log$
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
103 ;; Revision 1.1 2008/04/19 18:10:28 ht
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
104 ;; *** empty log message ***
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
105 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
106 ;; Revision 1.5 1998/02/11 03:44:32 pbreton
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
107 ;; About to pull out generic-indent code
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
108 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
109 ;; Revision 1.4 1996/11/01 16:51:20 peter
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
110 ;; Added GPL and LCD information.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
111 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
112 ;; Revision 1.3 1996/10/19 12:22:07 peter
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
113 ;; Added new versions of rc and rul modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
114 ;; Regexp patches for generic-bat-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
115 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
116 ;; Revision 1.2 1996/10/17 01:02:41 peter
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
117 ;; Improved samba and apache modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
118 ;; Added fvwm and x-resource modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
119 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
120
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
121 ;;; Code:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
122
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
123 (require 'generic-mode)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
124 (require 'font-lock)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
125
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
126 (defvar generic-extras-enable-list nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
127 "*List of generic modes to enable by default.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
128 Each entry in the list should be a symbol.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
129 The variables `generic-define-mswindows-modes' and `generic-define-unix-modes'
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
130 also affect which generic modes are defined")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
131
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
132 (defvar generic-define-mswindows-modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
133 (memq system-type (list 'windows-nt 'ms-dos))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
134 "*If non-nil, some MS-Windows specific generic modes will be defined.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
135
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
136 (defvar generic-define-unix-modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
137 (not generic-define-mswindows-modes)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
138 "*If non-nil, some Unix specific generic modes will be defined.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
139
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
140 (if generic-define-mswindows-modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
141 (setq generic-extras-enable-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
142 (append (list 'bat-generic-mode 'ini-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
143 'inf-generic-mode 'rc-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
144 'reg-generic-mode 'rul-generic-mode)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
145 generic-extras-enable-list)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
146
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
147 (if generic-define-unix-modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
148 (setq generic-extras-enable-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
149 (append (list 'apache-generic-mode 'samba-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
150 'hosts-generic-mode 'fvwm-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
151 'x-resource-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
152 'crontab-generic-mode)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
153 generic-extras-enable-list)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
154
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
155 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
156 ;; Generic-modes
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
157 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
158
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
159 ;;; Apache
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
160 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
161 (memq 'apache-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
162
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
163 (define-generic-mode 'apache-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
164 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
165 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
166 '(("^\\(<.*>\\)" 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
167 ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
168 (list "srm\\.conf$" "httpd\\.conf$" "access\\.conf$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
169 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
170 "Generic mode for Apache or HTTPD configuration files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
171
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
172 ;;; Samba
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
173 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
174 (memq 'samba-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
175
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
176 (define-generic-mode 'samba-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
177 (list ?\;)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
178 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
179 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
180 (list "smb\\.conf$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
181 (list 'generic-bracket-support)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
182 "Generic mode for Samba configuration files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
183
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
184 ;;; Fvwm
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
185 ;; This is pretty basic. Also, modes for other window managers could
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
186 ;; be defined as well.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
187 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
188 (memq 'fvwm-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
189
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
190 (define-generic-mode 'fvwm-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
191 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
192 (list "Style" "Function" "EndFunction" "Popup" "EndPopup")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
193 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
194 (list "\\.fvwmrc")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
195 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
196 "Generic mode for FVWM configuration files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
197
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
198 ;;; X Resource
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
199 ;; I'm pretty sure I've seen an actual mode to do this, but I don't
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
200 ;; think it's standard with Emacs
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
201 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
202 (memq 'x-resource-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
203
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
204 (define-generic-mode 'x-resource-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
205 (list ?!)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
206 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
207 '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
208 (list "\\.Xdefaults" "\\.Xresources")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
209 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
210 "Generic mode for X Resource configuration files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
211
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
212 ;;; Hosts
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
213 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
214 (memq 'hosts-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
215
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
216 (define-generic-mode 'hosts-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
217 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
218 (list "localhost")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
219 '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
220 (list "[hH][oO][sS][tT][sS]$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
221 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
222 "Generic mode for HOSTS files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
223
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
224 ;;; Windows INF files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
225 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
226 (memq 'inf-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
227
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
228 (define-generic-mode 'inf-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
229 (list ?\;)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
230 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
231 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
232 (list "\\.[iI][nN][fF]")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
233 (list 'generic-bracket-support)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
234 "Generic mode for MS-Windows INF files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
235
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
236 ;;; Windows INI files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
237 ;; Should define escape character as well!
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
238 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
239 (memq 'ini-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
240
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
241 (define-generic-mode 'ini-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
242 (list ?\;)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
243 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
244 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
245 ("^\\([^\n\r]*\\)=\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
246 (1 font-lock-function-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
247 (2 font-lock-variable-name-face)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
248 (list "\\.[iI][nN][iI]$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
249 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
250 (function
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
251 (lambda ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
252 (setq imenu-generic-expression
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
253 '((nil "^\\[\\(.*\\)\\]" 1)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
254 ("*Variables*" "^\\s-*\\(.*\\)\\s-*=" 1)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
255 )))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
256 "Generic mode for MS-Windows INI files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
257
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
258 ;;; Windows REG files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
259 ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
260 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
261 (memq 'reg-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
262
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
263 (define-generic-mode 'reg-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
264 '(?\;)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
265 '("key" "classes_root" "REGEDIT" "REGEDIT4")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
266 '(("\\(\\[.*]\\)" 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
267 ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
268 '("\\.[rR][eE][gG]$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
269 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
270 (function
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
271 (lambda ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
272 (setq imenu-generic-expression
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
273 '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
274 "Generic mode for MS-Windows Registry files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
275
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
276 ;;; Windows BAT files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
277 (if (not (memq 'bat-generic-mode generic-extras-enable-list))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
278 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
279 (define-generic-mode 'bat-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
280 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
281 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
282 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
283 ;; Make this one first in the list, otherwise comments will
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
284 ;; be over-written by other variables
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
285 (list "^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 'font-lock-comment-face t)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
286 (list "^[ \t]*\\(::-.*\\)" 1 'font-lock-comment-face t)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
287 ;; These keywords appear as the first word on a line
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
288 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
289 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
290 "[cC][aA][lL][lL]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
291 "[eE][cC][hH][oO]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
292 "[fF][oO][rR]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
293 "[iI][fF]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
294 "[pP][aA][tT][hH]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
295 "[pP][aA][uU][sS][eE]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
296 "[pP][rR][oO][mM][pP][tT]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
297 "[sS][eE][tT]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
298 "[sS][tT][aA][rR][tT]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
299 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
300 'font-lock-keyword-face "^[@ \t]*")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
301 ;; These keywords can be anywhere on a line
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
302 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
303 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
304 "[eE][xX][iI][sS][tT]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
305 "[eE][rR][rR][oO][rR][lL][eE][vV][eE][lL]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
306 "[gG][oO][tT][oO]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
307 "[nN][oO][tT]"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
308 ) 'font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
309 (list "^[ \t]*\\(:\\sw+\\)" 1 'font-lock-function-name-face t)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
310 (list "\\(%\\sw+%\\)" 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
311 (list "\\(%[0-9]\\)" 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
312 (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
313 (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
314 (list "\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
315 '(1 font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
316 '(2 font-lock-function-name-face nil t))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
317
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
318 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
319 (list "\\.[bB][aA][tT]$" "CONFIG\\." "AUTOEXEC\\." )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
320 (list 'generic-bat-mode-setup-function)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
321 "Generic mode for MS-Windows BAT files.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
322
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
323 (defvar bat-generic-mode-syntax-table nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
324 "Syntax table in use in bat-generic-mode buffers.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
325
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
326 ;; Make underscores count as words
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
327 (if bat-generic-mode-syntax-table
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
328 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
329 (setq bat-generic-mode-syntax-table (make-syntax-table))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
330 (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
331
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
332 ;; bat-generic-mode doesn't use the comment functionality of generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
333 ;; because it has a three-letter comment-string, so we do it
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
334 ;; here manually instead
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
335 (defun generic-bat-mode-setup-function ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
336 (make-local-variable 'parse-sexp-ignore-comments)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
337 (make-local-variable 'comment-start)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
338 (make-local-variable 'comment-start-skip)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
339 (make-local-variable 'comment-end)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
340 (setq imenu-generic-expression '((nil "^:\\(\\sw+\\)" 1))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
341 parse-sexp-ignore-comments t
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
342 comment-end ""
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
343 comment-start "[Rr][Ee][Mm] "
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
344 comment-start-skip "[Rr][Ee][Mm] *"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
345 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
346 (set-syntax-table bat-generic-mode-syntax-table)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
347 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
348 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
349
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
350 ;;; Windows RC files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
351 ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
352 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
353 (memq 'rc-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
354
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
355 (define-generic-mode 'rc-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
356 ;; (list ?\/)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
357 (list "//")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
358 '("ACCELERATORS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
359 "AUTO3STATE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
360 "AUTOCHECKBOX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
361 "AUTORADIOBUTTON"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
362 "BITMAP"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
363 "CAPTION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
364 "CHARACTERISTICS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
365 "CHECKBOX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
366 "CLASS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
367 "COMBOBOX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
368 "CONTROL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
369 "CTEXT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
370 "CURSOR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
371 "DEFPUSHBUTTON"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
372 "DIALOG"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
373 "EDITTEXT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
374 "EXSTYLE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
375 "FONT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
376 "GROUPBOX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
377 "ICON"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
378 "LANGUAGE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
379 "LISTBOX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
380 "LTEXT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
381 "MENUITEM SEPARATOR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
382 "MENUITEM"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
383 "MENU"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
384 "POPUP"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
385 "PUSHBOX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
386 "PUSHBUTTON"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
387 "RADIOBUTTON"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
388 "RCDATA"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
389 "RTEXT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
390 "SCROLLBAR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
391 "SEPARATOR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
392 "STATE3"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
393 "STRINGTABLE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
394 "STYLE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
395 "VERSIONINFO"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
396 "VERSION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
397 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
398 ;; the choice of what tokens go where is somewhat arbitrary,
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
399 ;; as is the choice of which value tokens are included, as
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
400 ;; the choice of face for each token group
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
401 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
402 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
403 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
404 "FILEFLAGSMASK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
405 "FILEFLAGS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
406 "FILEOS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
407 "FILESUBTYPE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
408 "FILETYPE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
409 "FILEVERSION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
410 "PRODUCTVERSION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
411 ) 'font-lock-type-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
412 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
413 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
414 "BEGIN"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
415 "BLOCK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
416 "END"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
417 "VALUE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
418 ) 'font-lock-function-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
419 '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
420 '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
421 '("^#[ \t]*\\(elif\\|if\\)\\>"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
422 ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
423 (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
424 '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
425 (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
426 (list "\\.[rR][cC]$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
427 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
428 "Generic mode for MS-Windows Resource files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
429
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
430 ;;; InstallShield RUL files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
431 ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
432 ;; Additional contributions by alex@brainstorm.fr (Alex Lemaresquier)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
433 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
434 (memq 'rul-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
435
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
436 (define-generic-mode 'rul-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
437 ;; Using "/*" and "*/" doesn't seem to be working right
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
438 (list "//")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
439 '("begin"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
440 "call"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
441 "case"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
442 "declare"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
443 "default"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
444 "downto"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
445 "elseif"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
446 "else"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
447 "endfor"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
448 "endif"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
449 "endswitch"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
450 "endwhile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
451 "end"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
452 "exit"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
453 "external"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
454 "for"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
455 "function"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
456 ;; "goto" -- handled elsewhere
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
457 "if"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
458 "program"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
459 "prototype"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
460 "repeat"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
461 "return"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
462 "step"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
463 "switch"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
464 "then"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
465 "to"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
466 "typedef"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
467 "until"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
468 "void"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
469 "while")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
470 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
471 ;; preprocessor constructs
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
472 '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
473 1 font-lock-string-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
474 '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
475 (1 font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
476 (2 font-lock-variable-name-face nil t))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
477 ;; gotos
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
478 '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
479 '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
480 (1 font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
481 (2 font-lock-reference-face nil t))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
482 ;; system variables
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
483 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
484 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
485 "CMDLINE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
486 "ERRORFILENAME"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
487 "INFOFILENAME"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
488 "ISRES"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
489 "ISUSER"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
490 "ISVERSION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
491 "SRCDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
492 "SRCDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
493 "SUPPORTDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
494 "TARGETDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
495 "TARGETDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
496 "WINDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
497 "WINDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
498 "WINMAJOR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
499 "WINSYSDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
500 "WINSYSDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
501 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
502 'font-lock-variable-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
503 ;; system functions
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
504 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
505 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
506 "AddFolderIcon"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
507 "AppCommand"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
508 "AskDestPath"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
509 "AskOptions"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
510 "AskPath"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
511 "AskText"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
512 "AskYesNo"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
513 "CloseFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
514 "CmdGetHwndDlg"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
515 "CompressEnum"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
516 "CompressGet"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
517 "CopyFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
518 "CreateDir"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
519 "CreateProgramFolder"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
520 "DeinstallStart"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
521 "Delay"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
522 "DeleteDir"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
523 "DeleteFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
524 "Disable"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
525 "DoInstall"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
526 "Do"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
527 "Enable"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
528 "EnterDisk"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
529 "ExistsDir"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
530 "EzDefineDialog"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
531 "FindFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
532 "FindWindow"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
533 "FileCompare"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
534 "FileSetBeginDefine"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
535 "FileSetEndDefine"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
536 "FileSetPerformEz"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
537 "FileSetPerform"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
538 "GetDiskSpace"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
539 "GetDisk"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
540 "GetExtents"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
541 "GetProfString"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
542 "GetSystemInfo"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
543 "GetVersion"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
544 "GetWindowHandle"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
545 "InstallationInfo"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
546 "Is"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
547 "LaunchApp"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
548 "ListCreate"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
549 "ListDestroy"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
550 "ListGetFirstString"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
551 "ListGetNextString"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
552 "ListSetIndex"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
553 "LongPathToQuote"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
554 "LongPathToShortPath"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
555 "MessageBox"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
556 "NumToStr"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
557 "OpenFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
558 "ParsePath"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
559 "PlaceBitmap"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
560 "PlaceWindow"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
561 "ProgDefGroupType"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
562 "RegDBCreateKeyEx"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
563 "RegDBGetItem"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
564 "RegDBSetItem"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
565 "RegDBGetKeyValueEx"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
566 "RegDBSetKeyValueEx"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
567 "RegDBSetDefaultRoot"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
568 "RenameFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
569 "SdSelectFolder"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
570 "SdShowMsg"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
571 "SdWelcome"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
572 "SetColor"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
573 "SetDialogTitle"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
574 "SetFileInfo"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
575 "SetForegroundWindow"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
576 "SetStatusWindow"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
577 "SetTitle"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
578 "ShowProgramFolder"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
579 "Sprintf"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
580 "StatusUpdate"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
581 "StrCompare"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
582 "StrFind"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
583 "StrGetTokens"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
584 "StrLength"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
585 "StrRemoveLastSlash"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
586 "StrToLower"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
587 "StrToUpper"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
588 "StrSub"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
589 "VarRestore"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
590 "VarSave"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
591 "WaitOnDialog"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
592 "Welcome"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
593 "XCopyFile"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
594 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
595 'font-lock-function-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
596 ;; type keywords
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
597 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
598 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
599 "BOOL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
600 "BYREF"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
601 "CHAR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
602 "HIWORD"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
603 "HWND"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
604 "INT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
605 "LIST"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
606 "LONG"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
607 "LOWORD"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
608 "NUMBER"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
609 "POINTER"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
610 "QUAD"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
611 "RGB"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
612 "SHORT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
613 "STRINGLIST"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
614 "STRING"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
615 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
616 'font-lock-type-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
617 ;;; system variables
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
618 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
619 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
620 "CMDLINE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
621 "ERRORFILENAME"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
622 "INFOFILENAME"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
623 "ISRES"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
624 "ISUSER"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
625 "ISVERSION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
626 "SRCDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
627 "SRCDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
628 "SUPPORTDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
629 "TARGETDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
630 "TARGETDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
631 "WINDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
632 "WINDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
633 "WINSYSDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
634 "WINSYSDISK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
635 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
636 'font-lock-variable-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
637 ;; pre-defined constants (not exhaustive -- just my favorites)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
638 (generic-make-keywords-list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
639 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
640 "AFTER"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
641 "APPEND"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
642 "BACKGROUNDCAPTION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
643 "BACKGROUND"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
644 "BACK"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
645 "BEFORE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
646 "BK_BLUE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
647 "BK_GREEN"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
648 "BK_RED"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
649 "CANCEL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
650 "COMMANDEX"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
651 "COMMAND"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
652 "CONTINUE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
653 "DEFWINDOWMODE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
654 "DISABLE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
655 "DLG_ERR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
656 "ENABLE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
657 "END_OF_LIST"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
658 "EXCLUSIVE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
659 "EXISTS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
660 "EXIT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
661 "FAILIFEXISTS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
662 "FALSE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
663 "FULL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
664 "INDVFILESTATUS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
665 "INFORMATION"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
666 "LIST_NULL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
667 "LISTFIRST"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
668 "LISTNEXT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
669 "LOGGING"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
670 "NEXT"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
671 "NONEXCLUSIVE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
672 "NOSET"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
673 "NO"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
674 "OFF"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
675 "ON"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
676 "PARTIAL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
677 "REPLACE_ITEM"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
678 "REPLACE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
679 "RESET"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
680 "RESTART"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
681 "SET"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
682 "SEVERE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
683 "SRCTARGETDIR"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
684 "STATUS"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
685 "TRUE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
686 "YES"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
687 "WARNING"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
688 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
689 'font-lock-variable-name-face) ; is this face the best choice?
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
690 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
691 (list "\\.[rR][uU][lL]$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
692 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
693 (function
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
694 (lambda ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
695 (setq imenu-generic-expression
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
696 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
697 )))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
698 "Generic mode for InstallShield RUL files")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
699
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
700 (define-skeleton rul-if
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
701 "Insert an if statement."
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
702 "condition: "
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
703 "if(" str ") then" \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
704 > _ \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
705 ( "other condition, %s: "
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
706 > "elseif(" str ") then" \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
707 > \n)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
708 > "else" \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
709 > \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
710 resume:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
711 > "endif;"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
712 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
713
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
714 (define-skeleton rul-function
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
715 "Insert a function statement."
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
716 "function: "
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
717 "function " str " ()" \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
718 ( "local variables, %s: "
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
719 > " " str ";" \n)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
720 > "begin" \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
721 > _ \n
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
722 resume:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
723 > "end;")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
724
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
725 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
726
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
727 ;;; Info-Mac abstracts
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
728 ;; Contributed by Jacques Duthen Prestataire (duthen@cegelec-red.fr)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
729 ;;
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
730 ;; For an example of such a file, you can download (the small):
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
731 ;; http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/_Font/00font-abstracts.txt
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
732 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
733 (memq 'info-mac-abstract-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
734
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
735 (define-generic-mode 'info-mac-abstract-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
736 ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
737 (list "Date" "From" "Subject")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
738 '(("^#### [^\n\r]*" . font-lock-function-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
739 (list "00.*-abstracts\\.txt")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
740 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
741 "Generic mode for info-mac abstract files."))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
742
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
743 ;;; Mailagent
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
744 ;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
745 ;; for procmail?
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
746 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
747 (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
748
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
749 (define-generic-mode 'mailagent-rules-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
750 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
751 (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
752 '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
753 ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
754 (list "\\.rules$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
755 (list 'mailagent-rules-setup-function)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
756 "Mode for Mailagent rules files.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
757
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
758 (defun mailagent-rules-setup-function ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
759 (make-local-variable 'imenu-generic-expression)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
760 (setq imenu-generic-expression
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
761 '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
762 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
763
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
764 ;;; Crontab
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
765 ;; I didn't write this, I only adapted it for generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
766 ;; If anyone knows who wrote it originally, I'd be glad to credit them
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
767 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
768 (memq 'crontab-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
769
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
770 (define-generic-mode 'crontab-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
771 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
772 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
773 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
774 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
775 (concat "^\\("
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
776 ;; Repeated 5 times for minute, hour, day of month,
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
777 ;; month and day of week fields
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
778 (mapconcat 'identity (make-list 5 "[*0-9,]+[ \t]+") "")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
779 "\\)\\([^\n\r]*\\)")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
780 (list 1 'font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
781 (list 2 'font-lock-function-name-face)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
782 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
783 (list 'crontab-setup-function)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
784 "Mode for Crontab files.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
785
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
786 (defun crontab-setup-function ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
787 (local-set-key "\C-c\C-c" 'crontab-update)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
788 (local-set-key "\C-x\C-s" 'crontab-update)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
789 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
790
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
791 (defun crontab ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
792 "Edit a crontab file.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
793 Type \\[save-buffer] to feed the buffer to the crontab command."
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
794 (interactive)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
795 (switch-to-buffer "*Crontab*")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
796 (erase-buffer)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
797 (message "Reading crontab file ... ")(sit-for 0) ; redisplay
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
798 (if (eq (call-process-region (point) (point) "crontab" nil t t "-l") 0)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
799 (message "Reading crontab file ... done")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
800 (message "No crontab file")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
801 (erase-buffer)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
802 (insert "#min hour dom mon dow (0=Sun) cmd\n"))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
803 (set-buffer-modified-p nil)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
804 (crontab-generic-mode))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
805
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
806 (defun crontab-update ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
807 "Use the current buffer to update the crontab file."
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
808 (interactive)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
809 (message "Updating crontab file ... ")(sit-for 0) ; redisplay
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
810 (shell-command-on-region (point-min) (point-max) "crontab" nil)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
811 (message "Updating crontab file ... done")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
812 (set-buffer-modified-p nil))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
813 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
814
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
815 ;; Contributed by Jacques Duthen Prestataire (duthen@cegelec-red.fr)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
816 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
817 (memq 'ps-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
818
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
819 (define-generic-mode 'ps-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
820 () ;; (list ?%) would not permit to differentiate DSC comments.
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
821 (list "def" "if" "ifelse" "forall") ; some keywords
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
822 '(("^%%[^ \n]*" . font-lock-reference-face) ; DSC comments
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
823 ("^/[^ \n]*" . font-lock-function-name-face) ; func or glob var def
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
824 ("%.*" . font-lock-comment-face) ; normal comments
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
825 ("(.*)" . font-lock-string-face) ; ps strings
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
826 ("/[^ \n]*" . font-lock-variable-name-face) ; symbols
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
827 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
828 (list "\\.ps") ;; extension of Postscript files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
829 nil ;; no hook
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
830 "Generic mode for PostScript files")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
831 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
832
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
833 ;; Solaris/Sys V prototype files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
834 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
835 (memq 'prototype-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
836
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
837 (define-generic-mode 'prototype-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
838 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
839 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
840 '(
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
841 ("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
842 (2 font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
843 (3 font-lock-keyword-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
844 ("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
845 (1 font-lock-reference-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
846 (2 font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
847 (3 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
848 ("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
849 (1 font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
850 (3 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
851 ("^\\(!\\s-*\\sw+\\)=\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
852 (1 font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
853 (2 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
854 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
855 (list "prototype$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
856 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
857 "Mode for Sys V prototype files"))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
858
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
859 ;; Solaris/Sys V pkginfo files
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
860 (and
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
861 (memq 'pkginfo-generic-mode generic-extras-enable-list)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
862
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
863 (define-generic-mode 'pkginfo-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
864 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
865 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
866 '(
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
867 ("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
868 (1 font-lock-keyword-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
869 (2 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
870 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
871 (list "pkginfo$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
872 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
873 "Mode for Sys V pkginfo files"))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
874
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
875 (define-generic-mode 'javascript-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
876 (list "//")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
877 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
878 "document"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
879 "else"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
880 "function"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
881 "function"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
882 "if"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
883 "then"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
884 "var"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
885 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
886 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
887 (list "^\\s-*function\\s-+\\([A-Za-z0-9]+\\)"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
888 '(1 font-lock-function-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
889 (list "^\\s-*var\\s-+\\([A-Za-z0-9]+\\)"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
890 '(1 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
891 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
892 (list "\\.js$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
893 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
894 (function
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
895 (lambda ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
896 (setq imenu-generic-expression
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
897 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
898 )))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
899 "Mode for JavaScript files.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
900
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
901 (define-generic-mode 'vrml-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
902 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
903 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
904 "DEF"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
905 "NULL"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
906 "USE"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
907 "Viewpoint"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
908 "ambientIntensity"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
909 "appearance"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
910 "children"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
911 "color"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
912 "coord"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
913 "coordIndex"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
914 "creaseAngle"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
915 "diffuseColor"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
916 "emissiveColor"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
917 "fieldOfView"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
918 "geometry"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
919 "info"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
920 "material"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
921 "normal"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
922 "orientation"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
923 "position"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
924 "shininess"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
925 "specularColor"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
926 "texCoord"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
927 "texture"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
928 "textureTransform"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
929 "title"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
930 "transparency"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
931 "type"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
932 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
933 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
934 (list "USE\\s-+\\([-A-Za-z0-9_]+\\)"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
935 '(1 font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
936 (list "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
937 '(1 font-lock-type-face)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
938 '(2 font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
939 (list "^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
940 '(1 font-lock-function-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
941 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
942 "^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
943 '(2 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
944 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
945 (list "\\.wrl$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
946 (list
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
947 (function
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
948 (lambda ()
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
949 (setq imenu-generic-expression
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
950 '((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
951 ("*Definitions*"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
952 "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
953 1)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
954 )))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
955 "Generic Mode for VRML files.")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
956
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
957 (define-generic-mode 'mailrc-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
958 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
959 (list "alias" "group" "set")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
960 '(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
961 (2 font-lock-reference-face) (3 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
962 ("^\\s-*set\\s-+\\([-A-Za-z0-9_]+\\)=\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
963 (1 font-lock-reference-face) (2 font-lock-variable-name-face)))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
964 (list "\\.mailrc$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
965 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
966 "Mode for mailrc files")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
967
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
968 (define-generic-mode 'java-manifest-generic-mode
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
969 (list ?#)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
970 (list "Name"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
971 "Digest-Algorithms"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
972 "Manifest-Version"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
973 "Required-Version"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
974 "Signature-Version"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
975 "Magic")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
976 '(("^Name:\\s-+\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
977 (1 font-lock-variable-name-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
978 ("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
979 (2 font-lock-reference-face))
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
980 )
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
981 (list "manifest\\.mf$")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
982 nil
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
983 "Mode for Java Manifest files")
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
984
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
985 (provide 'generic-extras)
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
986
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
987 ;;; generic-extras.el ends here
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
988
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
989 ;; Local Variables:
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
990 ;; autocompile: t
2a3055313d1e *** empty log message ***
ht
parents:
diff changeset
991 ;; End: