Merge from trunk.
[bpt/emacs.git] / lisp / generic-x.el
1 ;;; generic-x.el --- A collection of generic modes
2
3 ;; Copyright (C) 1997-1998, 2001-2013 Free Software Foundation, Inc.
4
5 ;; Author: Peter Breton <pbreton@cs.umb.edu>
6 ;; Created: Tue Oct 08 1996
7 ;; Keywords: generic, comment, font-lock
8 ;; Package: emacs
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24
25 ;;; Commentary:
26 ;;
27 ;; This file contains a collection of generic modes.
28 ;;
29 ;; INSTALLATION:
30 ;;
31 ;; Add this line to your init file:
32 ;;
33 ;; (require 'generic-x)
34 ;;
35 ;; You can decide which modes to load by setting the variable
36 ;; `generic-extras-enable-list'. Its default value is platform-
37 ;; specific. The recommended way to set this variable is through
38 ;; customize:
39 ;;
40 ;; M-x customize-option RET generic-extras-enable-list RET
41 ;;
42 ;; This lets you select generic modes from the list of available
43 ;; modes. If you manually set `generic-extras-enable-list' in your
44 ;; .emacs, do it BEFORE loading generic-x with (require 'generic-x).
45 ;;
46 ;; You can also send in new modes; if the file types are reasonably
47 ;; common, we would like to install them.
48 ;;
49 ;; DEFAULT GENERIC MODE:
50 ;;
51 ;; This file provides a hook which automatically puts a file into
52 ;; `default-generic-mode' if the first few lines of a file in
53 ;; fundamental mode start with a hash comment character. To disable
54 ;; this functionality, set the variable `generic-use-find-file-hook'
55 ;; to nil BEFORE loading generic-x. See the variables
56 ;; `generic-lines-to-scan' and `generic-find-file-regexp' for
57 ;; customization options.
58 ;;
59 ;; PROBLEMS WHEN USED WITH FOLDING MODE:
60 ;;
61 ;; [The following relates to the obsolete selective-display technique.
62 ;; Folding mode should use invisible text properties instead. -- Dave
63 ;; Love]
64 ;;
65 ;; From Anders Lindgren <andersl@csd.uu.se>
66 ;;
67 ;; Problem summary: Wayne Adams has found a problem when using folding
68 ;; mode in conjunction with font-lock for a mode defined in
69 ;; `generic-x.el'.
70 ;;
71 ;; The problem, as Wayne described it, was that error messages of the
72 ;; following form appeared when both font-lock and folding are used:
73 ;;
74 ;; > - various msgs including "Fontifying region...(error Stack
75 ;; > overflow in regexp matcher)" appear
76 ;;
77 ;; I have just tracked down the cause of the problem. The regexp's in
78 ;; `generic-x.el' do not take into account the way that folding hides
79 ;; sections of the buffer. The technique is known as
80 ;; `selective-display' and has been available for a very long time (I
81 ;; started using it back in the good old Emacs 18 days). Basically, a
82 ;; section is hidden by creating one very long line were the newline
83 ;; character (C-j) is replaced by a linefeed (C-m) character.
84 ;;
85 ;; Many other hiding packages, besides folding, use the same technique,
86 ;; the problem should occur when using them as well.
87 ;;
88 ;; The erroneous lines in `generic-x.el' look like the following (this
89 ;; example is from the `ini' section):
90 ;;
91 ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)
92 ;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face)
93 ;;
94 ;; The intention of these lines is to highlight lines of the following
95 ;; form:
96 ;;
97 ;; [foo]
98 ;; bar = xxx
99 ;;
100 ;; However, since the `.' regexp symbol matches the linefeed character
101 ;; the entire folded section is searched, resulting in a regexp stack
102 ;; overflow.
103 ;;
104 ;; Solution suggestion: Instead of using ".", use the sequence
105 ;; "[^\n\r]". This will make the rules behave just as before, but
106 ;; they will work together with selective-display.
107
108 ;;; Code:
109
110 (eval-when-compile (require 'font-lock))
111
112 (defgroup generic-x nil
113 "A collection of generic modes."
114 :prefix "generic-"
115 :group 'data
116 :version "20.3")
117
118 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
119 ;; Default-Generic mode
120 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
121
122 (defcustom generic-use-find-file-hook t
123 "If non-nil, add a hook to enter `default-generic-mode' automatically.
124 This is done if the first few lines of a file in fundamental mode
125 start with a hash comment character."
126 :group 'generic-x
127 :type 'boolean)
128
129 (defcustom generic-lines-to-scan 3
130 "Number of lines that `generic-mode-find-file-hook' looks at.
131 Relevant when deciding whether to enter Default-Generic mode automatically.
132 This variable should be set to a small positive number."
133 :group 'generic-x
134 :type 'integer)
135
136 (defcustom generic-find-file-regexp "^#"
137 "Regular expression used by `generic-mode-find-file-hook'.
138 Files in fundamental mode whose first few lines contain a match
139 for this regexp, should be put into Default-Generic mode instead.
140 The number of lines tested for the matches is specified by the
141 value of the variable `generic-lines-to-scan', which see."
142 :group 'generic-x
143 :type 'regexp)
144
145 (defcustom generic-ignore-files-regexp "[Tt][Aa][Gg][Ss]\\'"
146 "Regular expression used by `generic-mode-find-file-hook'.
147 Files whose names match this regular expression should not be put
148 into Default-Generic mode, even if they have lines which match
149 the regexp in `generic-find-file-regexp'. If the value is nil,
150 `generic-mode-find-file-hook' does not check the file names."
151 :group 'generic-x
152 :type '(choice (const :tag "Don't check file names" nil) regexp))
153
154 ;; This generic mode is always defined
155 (define-generic-mode default-generic-mode (list ?#) nil nil nil nil)
156
157 ;; A more general solution would allow us to enter generic-mode for
158 ;; *any* comment character, but would require us to synthesize a new
159 ;; generic-mode on the fly. I think this gives us most of what we
160 ;; want.
161 (defun generic-mode-find-file-hook ()
162 "Hook function to enter Default-Generic mode automatically.
163
164 Done if the first few lines of a file in Fundamental mode start
165 with a match for the regexp in `generic-find-file-regexp', unless
166 the file's name matches the regexp which is the value of the
167 variable `generic-ignore-files-regexp'.
168
169 This hook will be installed if the variable
170 `generic-use-find-file-hook' is non-nil. The variable
171 `generic-lines-to-scan' determines the number of lines to look at."
172 (when (and (eq major-mode 'fundamental-mode)
173 (or (null generic-ignore-files-regexp)
174 (not (string-match-p
175 generic-ignore-files-regexp
176 (file-name-sans-versions buffer-file-name)))))
177 (save-excursion
178 (goto-char (point-min))
179 (when (re-search-forward generic-find-file-regexp
180 (save-excursion
181 (forward-line generic-lines-to-scan)
182 (point)) t)
183 (goto-char (point-min))
184 (default-generic-mode)))))
185
186 (and generic-use-find-file-hook
187 (add-hook 'find-file-hook 'generic-mode-find-file-hook))
188
189 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
190 ;; Other Generic modes
191 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
192
193 ;; If you add a generic mode to this file, put it in one of these four
194 ;; lists as well.
195
196 (defconst generic-default-modes
197 '(apache-conf-generic-mode
198 apache-log-generic-mode
199 hosts-generic-mode
200 java-manifest-generic-mode
201 java-properties-generic-mode
202 javascript-generic-mode
203 show-tabs-generic-mode
204 vrml-generic-mode)
205 "List of generic modes that are defined by default.")
206
207 (defconst generic-mswindows-modes
208 '(bat-generic-mode
209 inf-generic-mode
210 ini-generic-mode
211 rc-generic-mode
212 reg-generic-mode
213 rul-generic-mode)
214 "List of generic modes that are defined by default on MS-Windows.")
215
216 (defconst generic-unix-modes
217 '(alias-generic-mode
218 etc-fstab-generic-mode
219 etc-modules-conf-generic-mode
220 etc-passwd-generic-mode
221 etc-services-generic-mode
222 etc-sudoers-generic-mode
223 fvwm-generic-mode
224 inetd-conf-generic-mode
225 mailagent-rules-generic-mode
226 mailrc-generic-mode
227 named-boot-generic-mode
228 named-database-generic-mode
229 prototype-generic-mode
230 resolve-conf-generic-mode
231 samba-generic-mode
232 x-resource-generic-mode
233 xmodmap-generic-mode)
234 "List of generic modes that are defined by default on Unix.")
235
236 (defconst generic-other-modes
237 '(astap-generic-mode
238 ibis-generic-mode
239 pkginfo-generic-mode
240 spice-generic-mode)
241 "List of generic modes that are not defined by default.")
242
243 (defcustom generic-define-mswindows-modes
244 (memq system-type '(windows-nt ms-dos))
245 "Non-nil means the modes in `generic-mswindows-modes' will be defined.
246 This is a list of MS-Windows specific generic modes. This variable
247 only affects the default value of `generic-extras-enable-list'."
248 :group 'generic-x
249 :type 'boolean
250 :version "22.1")
251 (make-obsolete-variable 'generic-define-mswindows-modes 'generic-extras-enable-list "22.1")
252
253 (defcustom generic-define-unix-modes
254 (not (memq system-type '(windows-nt ms-dos)))
255 "Non-nil means the modes in `generic-unix-modes' will be defined.
256 This is a list of Unix specific generic modes. This variable only
257 affects the default value of `generic-extras-enable-list'."
258 :group 'generic-x
259 :type 'boolean
260 :version "22.1")
261 (make-obsolete-variable 'generic-define-unix-modes 'generic-extras-enable-list "22.1")
262
263 (defcustom generic-extras-enable-list
264 (append generic-default-modes
265 (if generic-define-mswindows-modes generic-mswindows-modes)
266 (if generic-define-unix-modes generic-unix-modes)
267 nil)
268 "List of generic modes to define.
269 Each entry in the list should be a symbol. If you set this variable
270 directly, without using customize, you must reload generic-x to put
271 your changes into effect."
272 :group 'generic-x
273 :type (let (list)
274 (dolist (mode
275 (sort (append generic-default-modes
276 generic-mswindows-modes
277 generic-unix-modes
278 generic-other-modes
279 nil)
280 (lambda (a b)
281 (string< (symbol-name b)
282 (symbol-name a))))
283 (cons 'set list))
284 (push `(const ,mode) list)))
285 :set (lambda (s v)
286 (set-default s v)
287 (unless load-in-progress
288 (load "generic-x")))
289 :version "22.1")
290
291 ;;; Apache
292 (when (memq 'apache-conf-generic-mode generic-extras-enable-list)
293
294 (define-generic-mode apache-conf-generic-mode
295 '(?#)
296 nil
297 '(("^\\s-*\\(<.*>\\)" 1 font-lock-constant-face)
298 ("^\\s-*\\(\\sw+\\)\\s-" 1 font-lock-variable-name-face))
299 '("srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'")
300 (list
301 (function
302 (lambda ()
303 (setq imenu-generic-expression
304 '((nil "^\\([-A-Za-z0-9_]+\\)" 1)
305 ("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1)
306 ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1))))))
307 "Generic mode for Apache or HTTPD configuration files."))
308
309 (when (memq 'apache-log-generic-mode generic-extras-enable-list)
310
311 (define-generic-mode apache-log-generic-mode
312 nil
313 nil
314 ;; Hostname ? user date request return-code number-of-bytes
315 '(("^\\([-a-zA-z0-9.]+\\) - [-A-Za-z]+ \\(\\[.*\\]\\)"
316 (1 font-lock-constant-face)
317 (2 font-lock-variable-name-face)))
318 '("access_log\\'")
319 nil
320 "Generic mode for Apache log files."))
321
322 ;;; Samba
323 (when (memq 'samba-generic-mode generic-extras-enable-list)
324
325 (define-generic-mode samba-generic-mode
326 '(?\; ?#)
327 nil
328 '(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face)
329 ("^\\s-*\\(.+\\)=\\([^\r\n]*\\)"
330 (1 font-lock-variable-name-face)
331 (2 font-lock-type-face)))
332 '("smb\\.conf\\'")
333 '(generic-bracket-support)
334 "Generic mode for Samba configuration files."))
335
336 ;;; Fvwm
337 ;; This is pretty basic. Also, modes for other window managers could
338 ;; be defined as well.
339 (when (memq 'fvwm-generic-mode generic-extras-enable-list)
340
341 (define-generic-mode fvwm-generic-mode
342 '(?#)
343 '("AddToMenu"
344 "AddToFunc"
345 "ButtonStyle"
346 "EndFunction"
347 "EndPopup"
348 "Function"
349 "IconPath"
350 "Key"
351 "ModulePath"
352 "Mouse"
353 "PixmapPath"
354 "Popup"
355 "Style")
356 nil
357 '("\\.fvwmrc\\'" "\\.fvwm2rc\\'")
358 nil
359 "Generic mode for FVWM configuration files."))
360
361 ;;; X Resource
362 ;; I'm pretty sure I've seen an actual mode to do this, but I don't
363 ;; think it's standard with Emacs
364 (when (memq 'x-resource-generic-mode generic-extras-enable-list)
365
366 (define-generic-mode x-resource-generic-mode
367 '(?!)
368 nil
369 '(("^\\([^:\n]+:\\)" 1 font-lock-variable-name-face))
370 '("\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'")
371 nil
372 "Generic mode for X Resource configuration files."))
373
374 (if (memq 'xmodmap-generic-mode generic-extras-enable-list)
375 (define-generic-mode xmodmap-generic-mode
376 '(?!)
377 '("add" "clear" "keycode" "keysym" "remove" "pointer")
378 nil
379 '("[xX]modmap\\(rc\\)?\\'")
380 nil
381 "Simple mode for xmodmap files."))
382
383 ;;; Hosts
384 (when (memq 'hosts-generic-mode generic-extras-enable-list)
385
386 (define-generic-mode hosts-generic-mode
387 '(?#)
388 '("localhost")
389 '(("\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" 1 font-lock-constant-face))
390 '("[hH][oO][sS][tT][sS]\\'")
391 nil
392 "Generic mode for HOSTS files."))
393
394 ;;; Windows INF files
395
396 ;; If i-g-m-f-f-h is defined, then so is i-g-m.
397 (declare-function ini-generic-mode "generic-x")
398
399 (when (memq 'inf-generic-mode generic-extras-enable-list)
400
401 (define-generic-mode inf-generic-mode
402 '(?\;)
403 nil
404 '(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face))
405 '("\\.[iI][nN][fF]\\'")
406 '(generic-bracket-support)
407 "Generic mode for MS-Windows INF files."))
408
409 ;;; Windows INI files
410 ;; Should define escape character as well!
411 (when (memq 'ini-generic-mode generic-extras-enable-list)
412
413 (define-generic-mode ini-generic-mode
414 '(?\;)
415 nil
416 '(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face)
417 ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$"
418 (1 font-lock-function-name-face)
419 (2 font-lock-variable-name-face)))
420 '("\\.[iI][nN][iI]\\'")
421 (list
422 (function
423 (lambda ()
424 (setq imenu-generic-expression
425 '((nil "^\\[\\(.*\\)\\]" 1)
426 ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
427 "Generic mode for MS-Windows INI files.
428 You can use `ini-generic-mode-find-file-hook' to enter this mode
429 automatically for INI files whose names do not end in \".ini\".")
430
431 (defun ini-generic-mode-find-file-hook ()
432 "Hook function to enter Ini-Generic mode automatically for INI files.
433 Done if the first few lines of a file in Fundamental mode look
434 like an INI file. You can add this hook to `find-file-hook'."
435 (and (eq major-mode 'fundamental-mode)
436 (save-excursion
437 (goto-char (point-min))
438 (and (looking-at "^\\s-*\\[.*\\]")
439 (ini-generic-mode)))))
440 (defalias 'generic-mode-ini-file-find-file-hook 'ini-generic-mode-find-file-hook))
441
442 ;;; Windows REG files
443 ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
444 (when (memq 'reg-generic-mode generic-extras-enable-list)
445
446 (define-generic-mode reg-generic-mode
447 '(?\;)
448 '("key" "classes_root" "REGEDIT" "REGEDIT4")
449 '(("\\(\\[.*\\]\\)" 1 font-lock-constant-face)
450 ("^\\([^\n\r]*\\)\\s-*=" 1 font-lock-variable-name-face))
451 '("\\.[rR][eE][gG]\\'")
452 (list
453 (function
454 (lambda ()
455 (setq imenu-generic-expression
456 '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
457 "Generic mode for MS-Windows Registry files."))
458
459 (declare-function w32-shell-name "w32-fns" ())
460
461 ;;; DOS/Windows BAT files
462 (when (memq 'bat-generic-mode generic-extras-enable-list)
463
464 (define-generic-mode bat-generic-mode
465 nil
466 nil
467 (eval-when-compile
468 (list
469 ;; Make this one first in the list, otherwise comments will
470 ;; be over-written by other variables
471 '("^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 font-lock-comment-face t)
472 '("^[ \t]*\\(::.*\\)" 1 font-lock-comment-face t)
473 '("^[@ \t]*\\([bB][rR][eE][aA][kK]\\|[vV][eE][rR][iI][fF][yY]\\)[ \t]+\\([oO]\\([nN]\\|[fF][fF]\\)\\)"
474 (1 font-lock-builtin-face)
475 (2 font-lock-constant-face t t))
476 ;; Any text (except ON/OFF) following ECHO is a string.
477 '("^[@ \t]*\\([eE][cC][hH][oO]\\)[ \t]+\\(\\([oO]\\([nN]\\|[fF][fF]\\)\\)\\|\\([^>|\r\n]+\\)\\)"
478 (1 font-lock-builtin-face)
479 (3 font-lock-constant-face t t)
480 (5 font-lock-string-face t t))
481 ;; These keywords appear as the first word on a line. (Actually, they
482 ;; can also appear after "if ..." or "for ..." clause, but since they
483 ;; are frequently used in simple text, we punt.)
484 ;; In `generic-bat-mode-setup-function' we make the keywords
485 ;; case-insensitive
486 (generic-make-keywords-list
487 '("for"
488 "if")
489 font-lock-keyword-face "^[@ \t]*")
490 ;; These keywords can be anywhere on a line
491 ;; In `generic-bat-mode-setup-function' we make the keywords
492 ;; case-insensitive
493 (generic-make-keywords-list
494 '("do"
495 "exist"
496 "errorlevel"
497 "goto"
498 "not")
499 font-lock-keyword-face)
500 ;; These are built-in commands. Only frequently-used ones are listed.
501 (generic-make-keywords-list
502 '("CALL" "call" "Call"
503 "CD" "cd" "Cd"
504 "CLS" "cls" "Cls"
505 "COPY" "copy" "Copy"
506 "DEL" "del" "Del"
507 "ECHO" "echo" "Echo"
508 "MD" "md" "Md"
509 "PATH" "path" "Path"
510 "PAUSE" "pause" "Pause"
511 "PROMPT" "prompt" "Prompt"
512 "RD" "rd" "Rd"
513 "REN" "ren" "Ren"
514 "SET" "set" "Set"
515 "START" "start" "Start"
516 "SHIFT" "shift" "Shift")
517 font-lock-builtin-face "[ \t|\n]")
518 '("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t)
519 '("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t)
520 '("\\(%[0-9]\\)" 1 font-lock-variable-name-face t)
521 '("[\t ]+\\([+-/][^\t\n\" ]+\\)" 1 font-lock-type-face)
522 '("[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
523 (1 font-lock-keyword-face)
524 (2 font-lock-function-name-face nil t))
525 '("[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?"
526 (1 font-lock-builtin-face)
527 (2 font-lock-variable-name-face t t))))
528 '("\\.[bB][aA][tT]\\'"
529 "\\.[cC][mM][dD]\\'"
530 "\\`[cC][oO][nN][fF][iI][gG]\\."
531 "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.")
532 '(generic-bat-mode-setup-function)
533 "Generic mode for MS-Windows batch files.")
534
535 (defvar bat-generic-mode-syntax-table nil
536 "Syntax table in use in `bat-generic-mode' buffers.")
537
538 (defvar bat-generic-mode-keymap (make-sparse-keymap)
539 "Keymap for `bat-generic-mode'.")
540
541 (defun bat-generic-mode-compile ()
542 "Run the current BAT file in a compilation buffer."
543 (interactive)
544 (let ((compilation-buffer-name-function
545 (function
546 (lambda (_ign)
547 (concat "*" (buffer-file-name) "*")))))
548 (compile
549 (concat (w32-shell-name) " -c " (buffer-file-name)))))
550
551 (declare-function comint-mode "comint" ())
552 (declare-function comint-exec "comint" (buffer name command startfile switches))
553
554 (defun bat-generic-mode-run-as-comint ()
555 "Run the current BAT file in a comint buffer."
556 (interactive)
557 (require 'comint)
558 (let* ((file (buffer-file-name))
559 (buf-name (concat "*" file "*")))
560 (with-current-buffer (get-buffer-create buf-name)
561 (erase-buffer)
562 (comint-mode)
563 (comint-exec
564 buf-name
565 file
566 (w32-shell-name)
567 nil
568 (list "-c" file))
569 (display-buffer buf-name))))
570
571 (define-key bat-generic-mode-keymap "\C-c\C-c" 'bat-generic-mode-compile)
572
573 ;; Make underscores count as words
574 (unless bat-generic-mode-syntax-table
575 (setq bat-generic-mode-syntax-table (make-syntax-table))
576 (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
577
578 ;; bat-generic-mode doesn't use the comment functionality of
579 ;; define-generic-mode because it has a three-letter comment-string,
580 ;; so we do it here manually instead
581 (defun generic-bat-mode-setup-function ()
582 (make-local-variable 'parse-sexp-ignore-comments)
583 (make-local-variable 'comment-start)
584 (make-local-variable 'comment-start-skip)
585 (make-local-variable 'comment-end)
586 (setq imenu-generic-expression '((nil "^:\\(\\sw+\\)" 1))
587 parse-sexp-ignore-comments t
588 comment-end ""
589 comment-start "REM "
590 comment-start-skip "[Rr][Ee][Mm] *")
591 (set-syntax-table bat-generic-mode-syntax-table)
592 ;; Make keywords case-insensitive
593 (setq font-lock-defaults '(generic-font-lock-keywords nil t))
594 (use-local-map bat-generic-mode-keymap)))
595
596 ;;; Mailagent
597 ;; Mailagent is a Unix mail filtering program. Anyone wanna do a
598 ;; generic mode for procmail?
599 (when (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
600
601 (define-generic-mode mailagent-rules-generic-mode
602 '(?#)
603 '("SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
604 '(("^\\(\\sw+\\)\\s-*=" 1 font-lock-variable-name-face)
605 ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 font-lock-constant-face))
606 '("\\.rules\\'")
607 (list
608 (function
609 (lambda ()
610 (setq imenu-generic-expression
611 '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))))
612 "Generic mode for Mailagent rules files."))
613
614 ;; Solaris/Sys V prototype files
615 (when (memq 'prototype-generic-mode generic-extras-enable-list)
616
617 (define-generic-mode prototype-generic-mode
618 '(?#)
619 nil
620 '(("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$"
621 (2 font-lock-constant-face)
622 (3 font-lock-keyword-face))
623 ("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
624 (1 font-lock-constant-face)
625 (2 font-lock-keyword-face)
626 (3 font-lock-variable-name-face))
627 ("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$"
628 (1 font-lock-keyword-face)
629 (3 font-lock-variable-name-face))
630 ("^\\(!\\s-*\\sw+\\)=\\([^\n\r]*\\)$"
631 (1 font-lock-keyword-face)
632 (2 font-lock-variable-name-face)))
633 '("prototype\\'")
634 nil
635 "Generic mode for Sys V prototype files."))
636
637 ;; Solaris/Sys V pkginfo files
638 (when (memq 'pkginfo-generic-mode generic-extras-enable-list)
639
640 (define-generic-mode pkginfo-generic-mode
641 '(?#)
642 nil
643 '(("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
644 (1 font-lock-keyword-face)
645 (2 font-lock-variable-name-face)))
646 '("pkginfo\\'")
647 nil
648 "Generic mode for Sys V pkginfo files."))
649
650 ;; Javascript mode
651 ;; Obsolete; defer to js-mode from js.el.
652 (when (memq 'javascript-generic-mode generic-extras-enable-list)
653 (define-obsolete-function-alias 'javascript-generic-mode 'js-mode "24.3")
654 (define-obsolete-variable-alias 'javascript-generic-mode-hook 'js-mode-hook "24.3"))
655
656 ;; VRML files
657 (when (memq 'vrml-generic-mode generic-extras-enable-list)
658
659 (define-generic-mode vrml-generic-mode
660 '(?#)
661 '("DEF"
662 "NULL"
663 "USE"
664 "Viewpoint"
665 "ambientIntensity"
666 "appearance"
667 "children"
668 "color"
669 "coord"
670 "coordIndex"
671 "creaseAngle"
672 "diffuseColor"
673 "emissiveColor"
674 "fieldOfView"
675 "geometry"
676 "info"
677 "material"
678 "normal"
679 "orientation"
680 "position"
681 "shininess"
682 "specularColor"
683 "texCoord"
684 "texture"
685 "textureTransform"
686 "title"
687 "transparency"
688 "type")
689 '(("USE\\s-+\\([-A-Za-z0-9_]+\\)"
690 (1 font-lock-constant-face))
691 ("DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
692 (1 font-lock-type-face)
693 (2 font-lock-constant-face))
694 ("^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{"
695 (1 font-lock-function-name-face))
696 ("^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
697 (2 font-lock-variable-name-face)))
698 '("\\.wrl\\'")
699 (list
700 (function
701 (lambda ()
702 (setq imenu-generic-expression
703 '((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
704 ("*Definitions*"
705 "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
706 1))))))
707 "Generic Mode for VRML files."))
708
709 ;; Java Manifests
710 (when (memq 'java-manifest-generic-mode generic-extras-enable-list)
711
712 (define-generic-mode java-manifest-generic-mode
713 '(?#)
714 '("Name"
715 "Digest-Algorithms"
716 "Manifest-Version"
717 "Required-Version"
718 "Signature-Version"
719 "Magic"
720 "Java-Bean"
721 "Depends-On")
722 '(("^Name:\\s-+\\([^\n\r]*\\)$"
723 (1 font-lock-variable-name-face))
724 ("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
725 (2 font-lock-constant-face)))
726 '("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
727 nil
728 "Generic mode for Java Manifest files."))
729
730 ;; Java properties files
731 (when (memq 'java-properties-generic-mode generic-extras-enable-list)
732
733 (define-generic-mode java-properties-generic-mode
734 '(?! ?#)
735 nil
736 (eval-when-compile
737 (let ((java-properties-key
738 "\\(\\([-A-Za-z0-9_\\./]\\|\\(\\\\[ =:]\\)\\)+\\)")
739 (java-properties-value
740 "\\([^\r\n]*\\)"))
741 ;; Property and value can be separated in a number of different ways:
742 ;; * whitespace
743 ;; * an equal sign
744 ;; * a colon
745 (mapcar
746 (function
747 (lambda (elt)
748 (list
749 (concat "^" java-properties-key elt java-properties-value "$")
750 '(1 font-lock-constant-face)
751 '(4 font-lock-variable-name-face))))
752 ;; These are the separators
753 '(":\\s-*" "\\s-+" "\\s-*=\\s-*"))))
754 nil
755 (list
756 (function
757 (lambda ()
758 (setq imenu-generic-expression
759 '((nil "^\\([^#! \t\n\r=:]+\\)" 1))))))
760 "Generic mode for Java properties files."))
761
762 ;; C shell alias definitions
763 (when (memq 'alias-generic-mode generic-extras-enable-list)
764
765 (define-generic-mode alias-generic-mode
766 '(?#)
767 '("alias" "unalias")
768 '(("^alias\\s-+\\([-A-Za-z0-9_]+\\)\\s-+"
769 (1 font-lock-variable-name-face))
770 ("^unalias\\s-+\\([-A-Za-z0-9_]+\\)\\s-*$"
771 (1 font-lock-variable-name-face)))
772 '("alias\\'")
773 (list
774 (function
775 (lambda ()
776 (setq imenu-generic-expression
777 '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))))))
778 "Generic mode for C Shell alias files."))
779
780 ;;; Windows RC files
781 ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
782 (when (memq 'rc-generic-mode generic-extras-enable-list)
783
784 (define-generic-mode rc-generic-mode
785 ;; '(?\/)
786 '("//")
787 '("ACCELERATORS"
788 "AUTO3STATE"
789 "AUTOCHECKBOX"
790 "AUTORADIOBUTTON"
791 "BITMAP"
792 "BOTTOMMARGIN"
793 "BUTTON"
794 "CAPTION"
795 "CHARACTERISTICS"
796 "CHECKBOX"
797 "CLASS"
798 "COMBOBOX"
799 "CONTROL"
800 "CTEXT"
801 "CURSOR"
802 "DEFPUSHBUTTON"
803 "DESIGNINFO"
804 "DIALOG"
805 "DISCARDABLE"
806 "EDITTEXT"
807 "EXSTYLE"
808 "FONT"
809 "GROUPBOX"
810 "GUIDELINES"
811 "ICON"
812 "LANGUAGE"
813 "LEFTMARGIN"
814 "LISTBOX"
815 "LTEXT"
816 "MENUITEM SEPARATOR"
817 "MENUITEM"
818 "MENU"
819 "MOVEABLE"
820 "POPUP"
821 "PRELOAD"
822 "PURE"
823 "PUSHBOX"
824 "PUSHBUTTON"
825 "RADIOBUTTON"
826 "RCDATA"
827 "RIGHTMARGIN"
828 "RTEXT"
829 "SCROLLBAR"
830 "SEPARATOR"
831 "STATE3"
832 "STRINGTABLE"
833 "STYLE"
834 "TEXTINCLUDE"
835 "TOOLBAR"
836 "TOPMARGIN"
837 "VERSIONINFO"
838 "VERSION")
839 ;; the choice of what tokens go where is somewhat arbitrary,
840 ;; as is the choice of which value tokens are included, as
841 ;; the choice of face for each token group
842 (eval-when-compile
843 (list
844 (generic-make-keywords-list
845 '("FILEFLAGSMASK"
846 "FILEFLAGS"
847 "FILEOS"
848 "FILESUBTYPE"
849 "FILETYPE"
850 "FILEVERSION"
851 "PRODUCTVERSION")
852 font-lock-type-face)
853 (generic-make-keywords-list
854 '("BEGIN"
855 "BLOCK"
856 "END"
857 "VALUE")
858 font-lock-function-name-face)
859 '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
860 '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
861 '("^#[ \t]*\\(elif\\|if\\)\\>"
862 ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
863 (1 font-lock-constant-face)
864 (2 font-lock-variable-name-face nil t)))
865 '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
866 (1 font-lock-constant-face)
867 (2 font-lock-variable-name-face nil t))))
868 '("\\.[rR][cC]\\'")
869 nil
870 "Generic mode for MS-Windows Resource files."))
871
872 ;; InstallShield RUL files
873 ;; Contributed by Alfred.Correira@Pervasive.Com
874 ;; Bugfixes by "Rolf Sandau" <Rolf.Sandau@marconi.com>
875 (when (memq 'rul-generic-mode generic-extras-enable-list)
876
877 (eval-when-compile
878
879 ;;; build the regexp strings using regexp-opt
880 (defconst installshield-statement-keyword-list
881 '("abort"
882 "begin"
883 "call"
884 "case"
885 "declare"
886 "default"
887 "downto"
888 "elseif"
889 "else"
890 "endfor"
891 "endif"
892 "endswitch"
893 "endwhile"
894 "end"
895 "exit"
896 "external"
897 "for"
898 "function"
899 ;; "goto" -- handled elsewhere
900 "if"
901 "program"
902 "prototype"
903 "repeat"
904 "return"
905 "step"
906 "switch"
907 "then"
908 "to"
909 "typedef"
910 "until"
911 "void"
912 "while")
913 "Statement keywords used in InstallShield 3 and 5.")
914
915 (defconst installshield-system-functions-list
916 '("AddFolderIcon"
917 "AddProfString"
918 "AddressString"
919 "AppCommand"
920 "AskDestPath"
921 "AskOptions"
922 "AskPath"
923 "AskText"
924 "AskYesNo"
925 "BatchDeleteEx"
926 "BatchFileLoad"
927 "BatchFileSave"
928 "BatchFind"
929 "BatchGetFileName"
930 "BatchMoveEx"
931 "BatchSetFileName"
932 "ChangeDirectory"
933 "CloseFile"
934 "CmdGetHwndDlg"
935 "ComponentAddItem" ; differs between IS3 and IS5
936 "ComponentCompareSizeRequired" ; IS5 only
937 "ComponentDialog"
938 "ComponentError" ; IS5 only
939 "ComponentFileEnum" ; IS5 only
940 "ComponentFileInfo" ; IS5 only
941 "ComponentFilterLanguage" ; IS5 only
942 "ComponentFilterOS" ; IS5 only
943 "ComponentGetData" ; IS5 only
944 "ComponentGetItemInfo" ; IS3 only
945 "ComponentGetItemSize" ; differs between IS3 and IS5
946 "ComponentIsItemSelected" ; differs between IS3 and IS5
947 "ComponentListItems"
948 "ComponentMoveData" ; IS5 only
949 "ComponentSelectItem" ; differs between IS3 and IS5
950 "ComponentSetData" ; IS5 only
951 "ComponentSetItemInfo" ; IS3 only
952 "ComponentSetTarget" ; IS5 only
953 "ComponentSetupTypeEnum" ; IS5 only
954 "ComponentSetupTypeGetData" ; IS5 only
955 "ComponentSetupTypeSet" ; IS5 only
956 "ComponentTotalSize"
957 "ComponentValidate" ; IS5 only
958 "CompressAdd" ; IS3 only
959 "CompressDel" ; IS3 only
960 "CompressEnum" ; IS3 only
961 "CompressGet" ; IS3 only
962 "CompressInfo" ; IS3 only
963 "CopyFile"
964 "CreateDir"
965 "CreateFile"
966 "CreateProgramFolder"
967 "DeinstallSetReference" ; IS5 only
968 "DeinstallStart"
969 "Delay"
970 "DeleteDir"
971 "DeleteFile"
972 "DialogSetInfo"
973 "Disable"
974 "DoInstall"
975 "Do"
976 "Enable"
977 "EnterDisk"
978 "ExistsDir"
979 "ExistsDisk"
980 "ExitProgMan"
981 "EzBatchAddPath"
982 "EzBatchAddString"
983 "EzBatchReplace"
984 "EzConfigAddDriver"
985 "EzConfigAddString"
986 "EzConfigGetValue"
987 "EzConfigSetValue"
988 "EzDefineDialog"
989 "FileCompare"
990 "FileDeleteLine"
991 "FileGrep"
992 "FileInsertLine"
993 "FileSetBeginDefine" ; IS3 only
994 "FileSetEndDefine" ; IS3 only
995 "FileSetPerformEz" ; IS3 only
996 "FileSetPerform" ; IS3 only
997 "FileSetReset" ; IS3 only
998 "FileSetRoot" ; IS3 only
999 "FindAllDirs"
1000 "FindAllFiles"
1001 "FindFile"
1002 "FindWindow"
1003 "GetDiskSpace"
1004 "GetDisk"
1005 "GetEnvVar"
1006 "GetExtents"
1007 "GetFileInfo"
1008 "GetLine"
1009 "GetProfInt"
1010 "GetProfString"
1011 "GetSystemInfo"
1012 "GetValidDrivesList"
1013 "GetVersion"
1014 "GetWindowHandle"
1015 "InstallationInfo"
1016 "Is"
1017 "LaunchApp"
1018 "LaunchAppAndWait"
1019 "ListAddItem"
1020 "ListAddString"
1021 "ListCount"
1022 "ListCreate"
1023 "ListDestroy"
1024 "ListFindItem"
1025 "ListFindString"
1026 "ListGetFirstItem"
1027 "ListGetFirstString"
1028 "ListGetNextItem"
1029 "ListGetNextString"
1030 "ListReadFromFile"
1031 "ListSetCurrentItem"
1032 "ListSetNextItem"
1033 "ListSetNextString"
1034 "ListSetIndex"
1035 "ListWriteToFile"
1036 "LongPathToQuote"
1037 "LongPathToShortPath"
1038 "MessageBox"
1039 "NumToStr"
1040 "OpenFileMode"
1041 "OpenFile"
1042 "ParsePath"
1043 "PathAdd"
1044 "PathDelete"
1045 "PathFind"
1046 "PathGet"
1047 "PathMove"
1048 "PathSet"
1049 "Path"
1050 "PlaceBitmap"
1051 "PlaceWindow"
1052 "PlayMMedia" ; IS5 only
1053 "ProgDefGroupType"
1054 "RegDBCreateKeyEx"
1055 "RegDBDeleteValue"
1056 "RegDBGetItem"
1057 "RegDBKeyExist"
1058 "RegDBSetItem"
1059 "RegDBGetKeyValueEx"
1060 "RegDBSetKeyValueEx"
1061 "RegDBSetDefaultRoot"
1062 "RenameFile"
1063 "ReplaceFolderIcon"
1064 "ReplaceProfString"
1065 "SdAskDestPath"
1066 "SdAskOptions"
1067 "SdAskOptionsList"
1068 "SdBitmap"
1069 "SdCloseDlg"
1070 "SdComponentAdvCheckSpace"
1071 "SdComponentAdvInit"
1072 "SdComponentAdvUpdateSpace"
1073 "SdComponentDialog"
1074 "SdComponentDialog2"
1075 "SdComponentDialogAdv"
1076 "SdComponentDialogEx"
1077 "SdComponentDlgCheckSpace"
1078 "SdComponentMult"
1079 "SdConfirmNewDir"
1080 "SdConfirmRegistration"
1081 "SdDiskSpace"
1082 "SdDisplayTopics"
1083 "SdDoStdButton"
1084 "SdEnablement"
1085 "SdError"
1086 "SdFinish"
1087 "SdFinishInit32"
1088 "SdFinishReboot"
1089 "SdGeneralInit"
1090 "SdGetItemName"
1091 "SdGetTextExtent"
1092 "SdGetUserCompanyInfo"
1093 "SdInit"
1094 "SdIsShellExplorer"
1095 "SdIsStdButton"
1096 "SdLicense"
1097 "SdMakeName"
1098 "SdOptionInit"
1099 "SdOptionSetState"
1100 "SdOptionsButtons"
1101 "SdOptionsButtonsInit"
1102 "SdPlugInProductName"
1103 "SdProductName"
1104 "SdRegEnableButton"
1105 "SdRegExEnableButton"
1106 "SdRegisterUser"
1107 "SdRegisterUserEx"
1108 "SdRemoveEndSpace"
1109 "SdSelectFolder"
1110 "SdSetSequentialItems"
1111 "SdSetStatic"
1112 "SdSetupTypeEx" ; IS5 only
1113 "SdSetupType"
1114 "SdShowAnyDialog"
1115 "SdShowDlgEdit1"
1116 "SdShowDlgEdit2"
1117 "SdShowDlgEdit3"
1118 "SdShowFileMods"
1119 "SdShowInfoList"
1120 "SdShowMsg"
1121 "SdStartCopy"
1122 "SdUnInit"
1123 "SdUpdateComponentSelection"
1124 "SdWelcome"
1125 "SendMessage"
1126 "SetColor"
1127 "SetFont"
1128 "SetDialogTitle"
1129 "SetDisplayEffect" ; IS5 only
1130 "SetFileInfo"
1131 "SetForegroundWindow"
1132 "SetStatusWindow"
1133 "SetTitle"
1134 "SetupType"
1135 "ShowProgramFolder"
1136 "Split" ; IS3 only
1137 "SprintfBox"
1138 "Sprintf"
1139 "StatusUpdate"
1140 "StrCompare"
1141 "StrFind"
1142 "StrGetTokens"
1143 "StrLength"
1144 "StrRemoveLastSlash"
1145 "StrToLower"
1146 "StrToNum"
1147 "StrToUpper"
1148 "StrSub"
1149 "VarRestore"
1150 "VarSave"
1151 "VerCompare"
1152 "VerGetFileVersion"
1153 "WaitOnDialog"
1154 "Welcome"
1155 "WriteLine"
1156 "WriteProfString"
1157 "XCopyFile")
1158 "System functions defined in InstallShield 3 and 5.")
1159
1160 (defconst installshield-system-variables-list
1161 '("BATCH_INSTALL"
1162 "CMDLINE"
1163 "COMMONFILES"
1164 "CORECOMPONENTHANDLING"
1165 "DIALOGCACHE"
1166 "ERRORFILENAME"
1167 "FOLDER_DESKTOP"
1168 "FOLDER_PROGRAMS"
1169 "FOLDER_STARTMENU"
1170 "FOLDER_STARTUP"
1171 "INFOFILENAME"
1172 "ISRES"
1173 "ISUSER"
1174 "ISVERSION"
1175 "MEDIA"
1176 "MODE"
1177 "PROGRAMFILES"
1178 "SELECTED_LANGUAGE"
1179 "SRCDIR"
1180 "SRCDISK"
1181 "SUPPORTDIR"
1182 "TARGETDIR"
1183 "TARGETDISK"
1184 "UNINST"
1185 "WINDIR"
1186 "WINDISK"
1187 "WINMAJOR"
1188 "WINSYSDIR"
1189 "WINSYSDISK")
1190 "System variables used in InstallShield 3 and 5.")
1191
1192 (defconst installshield-types-list
1193 '("BOOL"
1194 "BYREF"
1195 "CHAR"
1196 "HIWORD"
1197 "HWND"
1198 "INT"
1199 "LIST"
1200 "LONG"
1201 "LOWORD"
1202 "LPSTR"
1203 "NUMBER"
1204 "NUMBERLIST"
1205 "POINTER"
1206 "QUAD"
1207 "RGB"
1208 "SHORT"
1209 "STRINGLIST"
1210 "STRING")
1211 "Type keywords used in InstallShield 3 and 5.")
1212
1213 ;;; some might want to skip highlighting these to improve performance
1214 (defconst installshield-funarg-constants-list
1215 '("AFTER"
1216 "APPEND"
1217 "ALLCONTENTS"
1218 "BACKBUTTON"
1219 "BACKGROUNDCAPTION"
1220 "BACKGROUND"
1221 "BACK"
1222 "BASEMEMORY"
1223 "BEFORE"
1224 "BIOS"
1225 "BITMAPICON"
1226 "BK_BLUE"
1227 "BK_GREEN"
1228 "BK_RED"
1229 "BLUE"
1230 "BOOTUPDRIVE"
1231 "CANCEL"
1232 "CDROM_DRIVE"
1233 "CDROM"
1234 "CHECKBOX95"
1235 "CHECKBOX"
1236 "CHECKLINE"
1237 "CHECKMARK"
1238 "COLORS"
1239 "COMMANDEX"
1240 "COMMAND"
1241 "COMP_NORMAL"
1242 "COMP_UPDATE_DATE"
1243 "COMP_UPDATE_SAME"
1244 "COMP_UPDATE_VERSION"
1245 "COMPACT"
1246 "CONTINUE"
1247 "CPU"
1248 "CUSTOM"
1249 "DATE"
1250 "DEFWINDOWMODE"
1251 "DIR_WRITEABLE"
1252 "DIRECTORY"
1253 "DISABLE"
1254 "DISK_TOTALSPACE"
1255 "DISK"
1256 "DLG_OPTIONS"
1257 "DLG_PATH"
1258 "DLG_TEXT"
1259 "DLG_ASK_YESNO"
1260 "DLG_ENTER_DISK"
1261 "DLG_ERR"
1262 "DLG_INFO_ALTIMAGE"
1263 "DLG_INFO_CHECKSELECTION"
1264 "DLG_INFO_KUNITS"
1265 "DLG_INFO_USEDECIMAL"
1266 "DLG_MSG_INFORMATION"
1267 "DLG_MSG_SEVERE"
1268 "DLG_MSG_WARNING"
1269 "DLG_STATUS"
1270 "DLG_WARNING"
1271 "DLG_USER_CAPTION"
1272 "DRIVE"
1273 "ENABLE"
1274 "END_OF_FILE"
1275 "END_OF_LIST"
1276 "ENVSPACE"
1277 "EQUALS"
1278 "EXCLUDE_SUBDIR"
1279 "EXCLUSIVE"
1280 "EXISTS"
1281 "EXIT"
1282 "EXTENDED_MEMORY"
1283 "EXTENSION_ONLY"
1284 "FAILIFEXISTS"
1285 "FALSE"
1286 "FEEDBACK_FULL"
1287 "FILE_ATTR_ARCHIVED"
1288 "FILE_ATTR_DIRECTORY"
1289 "FILE_ATTR_HIDDEN"
1290 "FILE_ATTR_NORMAL"
1291 "FILE_ATTR_READONLY"
1292 "FILE_ATTR_SYSTEM"
1293 "FILE_ATTRIBUTE"
1294 "FILE_DATE"
1295 "FILE_LINE_LENGTH"
1296 "FILE_MODE_APPEND"
1297 "FILE_MODE_BINARYREADONLY"
1298 "FILE_MODE_BINARY"
1299 "FILE_MODE_NORMAL"
1300 "FILE_NO_VERSION"
1301 "FILE_NOT_FOUND"
1302 "FILE_SIZE"
1303 "FILE_TIME"
1304 "FILENAME_ONLY"
1305 "FILENAME"
1306 "FIXED_DRIVE"
1307 "FOLDER_DESKTOP"
1308 "FOLDER_PROGRAMS"
1309 "FOLDER_STARTMENU"
1310 "FOLDER_STARTUP"
1311 "FREEENVSPACE"
1312 "FULLWINDOWMODE"
1313 "FULL"
1314 "FONT_TITLE"
1315 "GREATER_THAN"
1316 "GREEN"
1317 "HKEY_CLASSES_ROOT"
1318 "HKEY_CURRENT_USER"
1319 "HKEY_LOCAL_MACHINE"
1320 "HKEY_USERS"
1321 "HOURGLASS"
1322 "INCLUDE_SUBDIR"
1323 "INDVFILESTATUS"
1324 "INFORMATION"
1325 "IS_WINDOWSNT"
1326 "IS_WINDOWS95"
1327 "IS_WINDOWS"
1328 "IS_WIN32S"
1329 "ISTYPE"
1330 "LANGUAGE_DRV"
1331 "LANGUAGE"
1332 "LESS_THAN"
1333 "LIST_NULL"
1334 "LISTFIRST"
1335 "LISTNEXT"
1336 "LOCKEDFILE"
1337 "LOGGING"
1338 "LOWER_LEFT"
1339 "LOWER_RIGHT"
1340 "MAGENTA"
1341 "MOUSE_DRV"
1342 "MOUSE"
1343 "NETWORK_DRV"
1344 "NETWORK"
1345 "NEXT"
1346 "NONEXCLUSIVE"
1347 "NORMALMODE"
1348 "NOSET"
1349 "NOTEXISTS"
1350 "NOWAIT"
1351 "NO"
1352 "OFF"
1353 "ONLYDIR"
1354 "ON"
1355 "OSMAJOR"
1356 "OSMINOR"
1357 "OS"
1358 "OTHER_FAILURE"
1359 "PARALLEL"
1360 "PARTIAL"
1361 "PATH_EXISTS"
1362 "PATH"
1363 "RED"
1364 "REGDB_APPPATH_DEFAULT"
1365 "REGDB_APPPATH"
1366 "REGDB_BINARY"
1367 "REGDB_ERR_CONNECTIONEXISTS"
1368 "REGDB_ERR_CORRUPTEDREGISTRY"
1369 "REGDB_ERR_INITIALIZATION"
1370 "REGDB_ERR_INVALIDHANDLE"
1371 "REGDB_ERR_INVALIDNAME"
1372 "REGDB_NUMBER"
1373 "REGDB_STRING_EXPAND"
1374 "REGDB_STRING_MULTI"
1375 "REGDB_STRING"
1376 "REGDB_UNINSTALL_NAME"
1377 "REMOTE_DRIVE"
1378 "REMOVEABLE_DRIVE"
1379 "REPLACE_ITEM"
1380 "REPLACE"
1381 "RESET"
1382 "RESTART"
1383 "ROOT"
1384 "SELFREGISTER"
1385 "SERIAL"
1386 "SET"
1387 "SEVERE"
1388 "SHAREDFILE"
1389 "SHARE"
1390 "SILENTMODE"
1391 "SRCTARGETDIR"
1392 "STATUSBAR"
1393 "STATUSDLG"
1394 "STATUSOLD"
1395 "STATUS"
1396 "STYLE_NORMAL"
1397 "SW_MAXIMIZE"
1398 "SW_MINIMIZE"
1399 "SW_RESTORE"
1400 "SW_SHOW"
1401 "SYS_BOOTMACHINE"
1402 "TIME"
1403 "TRUE"
1404 "TYPICAL"
1405 "UPPER_LEFT"
1406 "UPPER_RIGHT"
1407 "VALID_PATH"
1408 "VERSION"
1409 "VIDEO"
1410 "VOLUMELABEL"
1411 "YELLOW"
1412 "YES"
1413 "WAIT"
1414 "WARNING"
1415 "WINMAJOR"
1416 "WINMINOR"
1417 "WIN32SINSTALLED"
1418 "WIN32SMAJOR"
1419 "WIN32SMINOR")
1420 "Function argument constants used in InstallShield 3 and 5."))
1421
1422 (defvar rul-generic-mode-syntax-table nil
1423 "Syntax table to use in `rul-generic-mode' buffers.")
1424
1425 (setq rul-generic-mode-syntax-table
1426 (make-syntax-table c++-mode-syntax-table))
1427
1428 (modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
1429 (modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
1430
1431 (modify-syntax-entry ?/ ". 124b" rul-generic-mode-syntax-table)
1432 (modify-syntax-entry ?* ". 23" rul-generic-mode-syntax-table)
1433
1434 ;; here manually instead
1435 (defun generic-rul-mode-setup-function ()
1436 (make-local-variable 'parse-sexp-ignore-comments)
1437 (make-local-variable 'comment-start)
1438 (make-local-variable 'comment-start-skip)
1439 (make-local-variable 'comment-end)
1440 (setq imenu-generic-expression
1441 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))
1442 parse-sexp-ignore-comments t
1443 comment-end "*/"
1444 comment-start "/*"
1445 ;;; comment-end ""
1446 ;;; comment-start "//"
1447 ;;; comment-start-skip ""
1448 )
1449 ;; (set-syntax-table rul-generic-mode-syntax-table)
1450 (setq font-lock-syntax-table rul-generic-mode-syntax-table))
1451
1452 ;; moved mode-definition behind defun-definition to be warning-free - 15.11.02/RSan
1453 (define-generic-mode rul-generic-mode
1454 ;; Using "/*" and "*/" doesn't seem to be working right
1455 '("//" ("/*" . "*/" ))
1456 (eval-when-compile installshield-statement-keyword-list)
1457 (eval-when-compile
1458 (list
1459 ;; preprocessor constructs
1460 '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"
1461 1 font-lock-string-face)
1462 '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
1463 (1 font-lock-constant-face)
1464 (2 font-lock-variable-name-face nil t))
1465 ;; indirect string constants
1466 '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face)
1467 ;; gotos
1468 '("[ \t]*\\(\\sw+:\\)" 1 font-lock-constant-face)
1469 '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"
1470 (1 font-lock-keyword-face)
1471 (2 font-lock-constant-face nil t))
1472 ;; system variables
1473 (generic-make-keywords-list
1474 installshield-system-variables-list
1475 font-lock-variable-name-face "[^_]" "[^_]")
1476 ;; system functions
1477 (generic-make-keywords-list
1478 installshield-system-functions-list
1479 font-lock-function-name-face "[^_]" "[^_]")
1480 ;; type keywords
1481 (generic-make-keywords-list
1482 installshield-types-list
1483 font-lock-type-face "[^_]" "[^_]")
1484 ;; function argument constants
1485 (generic-make-keywords-list
1486 installshield-funarg-constants-list
1487 font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice?
1488 '("\\.[rR][uU][lL]\\'")
1489 '(generic-rul-mode-setup-function)
1490 "Generic mode for InstallShield RUL files.")
1491
1492 (define-skeleton rul-if
1493 "Insert an if statement."
1494 "condition: "
1495 "if(" str ") then" \n
1496 > _ \n
1497 ( "other condition, %s: "
1498 > "elseif(" str ") then" \n
1499 > \n)
1500 > "else" \n
1501 > \n
1502 resume:
1503 > "endif;")
1504
1505 (define-skeleton rul-function
1506 "Insert a function statement."
1507 "function: "
1508 "function " str " ()" \n
1509 ( "local variables, %s: "
1510 > " " str ";" \n)
1511 > "begin" \n
1512 > _ \n
1513 resume:
1514 > "end;"))
1515
1516 ;; Additions by ACorreir@pervasive-sw.com (Alfred Correira)
1517 (when (memq 'mailrc-generic-mode generic-extras-enable-list)
1518
1519 (define-generic-mode mailrc-generic-mode
1520 '(?#)
1521 '("alias"
1522 "else"
1523 "endif"
1524 "group"
1525 "if"
1526 "ignore"
1527 "set"
1528 "source"
1529 "unset")
1530 '(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
1531 (2 font-lock-constant-face)
1532 (3 font-lock-variable-name-face))
1533 ("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$"
1534 (2 font-lock-constant-face)
1535 (3 font-lock-variable-name-face))
1536 ("^\\s-*\\(source\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
1537 (2 font-lock-variable-name-face)))
1538 '("\\.mailrc\\'")
1539 nil
1540 "Mode for mailrc files."))
1541
1542 ;; Inetd.conf
1543 (when (memq 'inetd-conf-generic-mode generic-extras-enable-list)
1544
1545 (define-generic-mode inetd-conf-generic-mode
1546 '(?#)
1547 '("stream"
1548 "dgram"
1549 "tcp"
1550 "udp"
1551 "wait"
1552 "nowait"
1553 "internal")
1554 '(("^\\([-A-Za-z0-9_]+\\)" 1 font-lock-type-face))
1555 '("/etc/inetd.conf\\'")
1556 (list
1557 (function
1558 (lambda ()
1559 (setq imenu-generic-expression
1560 '((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
1561
1562 ;; Services
1563 (when (memq 'etc-services-generic-mode generic-extras-enable-list)
1564
1565 (define-generic-mode etc-services-generic-mode
1566 '(?#)
1567 '("tcp"
1568 "udp"
1569 "ddp")
1570 '(("^\\([-A-Za-z0-9_]+\\)\\s-+\\([0-9]+\\)/"
1571 (1 font-lock-type-face)
1572 (2 font-lock-variable-name-face)))
1573 '("/etc/services\\'")
1574 (list
1575 (function
1576 (lambda ()
1577 (setq imenu-generic-expression
1578 '((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
1579
1580 ;; Password and Group files
1581 (when (memq 'etc-passwd-generic-mode generic-extras-enable-list)
1582
1583 (define-generic-mode etc-passwd-generic-mode
1584 nil ;; No comment characters
1585 '("root") ;; Only one keyword
1586 (eval-when-compile
1587 (list
1588 (list
1589 (concat
1590 "^"
1591 ;; User name -- Never blank!
1592 "\\([^:]+\\)"
1593 ":"
1594 ;; Password, UID and GID
1595 (mapconcat
1596 'identity
1597 (make-list 3 "\\([^:]+\\)")
1598 ":")
1599 ":"
1600 ;; GECOS/Name -- might be blank
1601 "\\([^:]*\\)"
1602 ":"
1603 ;; Home directory and shell
1604 "\\([^:]+\\)"
1605 ":?"
1606 "\\([^:]*\\)"
1607 "$")
1608 '(1 font-lock-type-face)
1609 '(5 font-lock-variable-name-face)
1610 '(6 font-lock-constant-face)
1611 '(7 font-lock-warning-face))
1612 '("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$"
1613 (1 font-lock-type-face)
1614 (4 font-lock-variable-name-face))))
1615 '("/etc/passwd\\'" "/etc/group\\'")
1616 (list
1617 (function
1618 (lambda ()
1619 (setq imenu-generic-expression
1620 '((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))))
1621
1622 ;; Fstab
1623 (when (memq 'etc-fstab-generic-mode generic-extras-enable-list)
1624
1625 (define-generic-mode etc-fstab-generic-mode
1626 '(?#)
1627 '("adfs"
1628 "affs"
1629 "autofs"
1630 "coda"
1631 "coherent"
1632 "cramfs"
1633 "devpts"
1634 "efs"
1635 "ext2"
1636 "ext3"
1637 "ext4"
1638 "hfs"
1639 "hpfs"
1640 "iso9660"
1641 "jfs"
1642 "minix"
1643 "msdos"
1644 "ncpfs"
1645 "nfs"
1646 "ntfs"
1647 "proc"
1648 "qnx4"
1649 "reiserfs"
1650 "romfs"
1651 "smbfs"
1652 "cifs"
1653 "usbdevfs"
1654 "sysv"
1655 "sysfs"
1656 "tmpfs"
1657 "udf"
1658 "ufs"
1659 "umsdos"
1660 "vfat"
1661 "xenix"
1662 "xfs"
1663 "swap"
1664 "auto"
1665 "ignore")
1666 '(("^\\([^# \t]+\\)\\s-+\\([^# \t]+\\)"
1667 (1 font-lock-type-face t)
1668 (2 font-lock-variable-name-face t)))
1669 '("/etc/[v]*fstab\\'")
1670 (list
1671 (function
1672 (lambda ()
1673 (setq imenu-generic-expression
1674 '((nil "^\\([^# \t]+\\)\\s-+" 1))))))))
1675
1676 ;; /etc/sudoers
1677 (when (memq 'etc-sudoers-generic-mode generic-extras-enable-list)
1678
1679 (define-generic-mode etc-sudoers-generic-mode
1680 '(?#)
1681 '("User_Alias" "Runas_Alias" "Host_Alias" "Cmnd_Alias"
1682 "NOPASSWD" "PASSWD" "NOEXEC" "EXEC"
1683 "ALL")
1684 '(("\\<\\(root\\|su\\)\\>" 1 font-lock-warning-face)
1685 ("\\(\\*\\)" 1 font-lock-warning-face)
1686 ("\\<\\(%[A-Za-z0-9_]+\\)\\>" 1 font-lock-variable-name-face))
1687 '("/etc/sudoers\\'")
1688 nil
1689 "Generic mode for sudoers configuration files."))
1690
1691 ;; From Jacques Duthen <jacques.duthen@sncf.fr>
1692 (when (memq 'show-tabs-generic-mode generic-extras-enable-list)
1693
1694 (eval-when-compile
1695
1696 (defconst show-tabs-generic-mode-font-lock-defaults-1
1697 '(;; trailing spaces must come before...
1698 ("[ \t]+$" . 'show-tabs-space)
1699 ;; ...embedded tabs
1700 ("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab))))
1701
1702 (defconst show-tabs-generic-mode-font-lock-defaults-2
1703 '(;; trailing spaces must come before...
1704 ("[ \t]+$" . 'show-tabs-space)
1705 ;; ...tabs
1706 ("\t+" . 'show-tabs-tab))))
1707
1708 (defface show-tabs-tab
1709 '((((class grayscale) (background light)) (:background "DimGray" :weight bold))
1710 (((class grayscale) (background dark)) (:background "LightGray" :weight bold))
1711 (((class color) (min-colors 88)) (:background "red1"))
1712 (((class color)) (:background "red"))
1713 (t (:weight bold)))
1714 "Font Lock mode face used to highlight TABs."
1715 :group 'generic-x)
1716 (define-obsolete-face-alias 'show-tabs-tab-face 'show-tabs-tab "22.1")
1717
1718 (defface show-tabs-space
1719 '((((class grayscale) (background light)) (:background "DimGray" :weight bold))
1720 (((class grayscale) (background dark)) (:background "LightGray" :weight bold))
1721 (((class color) (min-colors 88)) (:background "yellow1"))
1722 (((class color)) (:background "yellow"))
1723 (t (:weight bold)))
1724 "Font Lock mode face used to highlight spaces."
1725 :group 'generic-x)
1726 (define-obsolete-face-alias 'show-tabs-space-face 'show-tabs-space "22.1")
1727
1728 (define-generic-mode show-tabs-generic-mode
1729 nil ;; no comment char
1730 nil ;; no keywords
1731 (eval-when-compile show-tabs-generic-mode-font-lock-defaults-1)
1732 nil ;; no auto-mode-alist
1733 ;; '(show-tabs-generic-mode-hook-fun)
1734 nil
1735 "Generic mode to show tabs and trailing spaces."))
1736
1737 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1738 ;; DNS modes
1739 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1740
1741 (when (memq 'named-boot-generic-mode generic-extras-enable-list)
1742
1743 (define-generic-mode named-boot-generic-mode
1744 ;; List of comment characters
1745 '(?\;)
1746 ;; List of keywords
1747 '("cache" "primary" "secondary" "forwarders" "limit" "options"
1748 "directory" "check-names")
1749 ;; List of additional font-lock-expressions
1750 '(("\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" 1 font-lock-constant-face)
1751 ("^directory\\s-+\\(.*\\)" 1 font-lock-variable-name-face)
1752 ("^\\(primary\\|cache\\)\\s-+\\([.A-Za-z]+\\)\\s-+\\(.*\\)"
1753 (2 font-lock-variable-name-face)
1754 (3 font-lock-constant-face)))
1755 ;; List of additional automode-alist expressions
1756 '("/etc/named.boot\\'")
1757 ;; List of set up functions to call
1758 nil))
1759
1760 (when (memq 'named-database-generic-mode generic-extras-enable-list)
1761
1762 (define-generic-mode named-database-generic-mode
1763 ;; List of comment characters
1764 '(?\;)
1765 ;; List of keywords
1766 '("IN" "NS" "CNAME" "SOA" "PTR" "MX" "A")
1767 ;; List of additional font-lock-expressions
1768 '(("\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" 1 font-lock-constant-face)
1769 ("^\\([.A-Za-z0-9]+\\)" 1 font-lock-variable-name-face))
1770 ;; List of additional auto-mode-alist expressions
1771 nil
1772 ;; List of set up functions to call
1773 nil)
1774
1775 (defvar named-database-time-string "%Y%m%d%H"
1776 "Timestring for named serial numbers.")
1777
1778 (defun named-database-print-serial ()
1779 "Print a serial number based on the current date."
1780 (interactive)
1781 (insert (format-time-string named-database-time-string (current-time)))))
1782
1783 (when (memq 'resolve-conf-generic-mode generic-extras-enable-list)
1784
1785 (define-generic-mode resolve-conf-generic-mode
1786 ;; List of comment characters
1787 '(?#)
1788 ;; List of keywords
1789 '("nameserver" "domain" "search" "sortlist" "options")
1790 ;; List of additional font-lock-expressions
1791 nil
1792 ;; List of additional auto-mode-alist expressions
1793 '("/etc/resolv[e]?.conf\\'")
1794 ;; List of set up functions to call
1795 nil))
1796
1797 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1798 ;; Modes for spice and common electrical engineering circuit netlist formats
1799 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1800
1801 (when (memq 'spice-generic-mode generic-extras-enable-list)
1802
1803 (define-generic-mode spice-generic-mode
1804 nil
1805 '("and"
1806 "cccs"
1807 "ccvs"
1808 "delay"
1809 "nand"
1810 "nor"
1811 "npwl"
1812 "or"
1813 "par"
1814 "ppwl"
1815 "pwl"
1816 "vccap"
1817 "vccs"
1818 "vcr"
1819 "vcvs")
1820 '(("^\\s-*\\([*].*\\)" 1 font-lock-comment-face)
1821 (" \\(\\$ .*\\)$" 1 font-lock-comment-face)
1822 ("^\\(\\$ .*\\)$" 1 font-lock-comment-face)
1823 ("\\([*].*\\)" 1 font-lock-comment-face)
1824 ("^\\([+]\\)" 1 font-lock-string-face)
1825 ("^\\s-*\\([.]\\w+\\>\\)" 1 font-lock-keyword-face)
1826 ("\\(\\([.]\\|_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face)
1827 ("\\('[^']+'\\)" 1 font-lock-string-face)
1828 ("\\(\"[^\"]+\"\\)" 1 font-lock-string-face))
1829 '("\\.[sS][pP]\\'"
1830 "\\.[sS][pP][iI]\\'"
1831 "\\.[sS][pP][iI][cC][eE]\\'"
1832 "\\.[iI][nN][cC]\\'")
1833 (list
1834 'generic-bracket-support
1835 ;; Make keywords case-insensitive
1836 (function
1837 (lambda()
1838 (setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
1839 "Generic mode for SPICE circuit netlist files."))
1840
1841 (when (memq 'ibis-generic-mode generic-extras-enable-list)
1842
1843 (define-generic-mode ibis-generic-mode
1844 '(?|)
1845 nil
1846 '(("[[]\\([^]]*\\)[]]" 1 font-lock-keyword-face)
1847 ("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face))
1848 '("\\.[iI][bB][sS]\\'")
1849 '(generic-bracket-support)
1850 "Generic mode for IBIS circuit netlist files."))
1851
1852 (when (memq 'astap-generic-mode generic-extras-enable-list)
1853
1854 (define-generic-mode astap-generic-mode
1855 nil
1856 '("analyze"
1857 "description"
1858 "elements"
1859 "execution"
1860 "features"
1861 "functions"
1862 "ground"
1863 "model"
1864 "outputs"
1865 "print"
1866 "run"
1867 "controls"
1868 "table")
1869 '(("^\\s-*\\([*].*\\)" 1 font-lock-comment-face)
1870 (";\\s-*\\([*].*\\)" 1 font-lock-comment-face)
1871 ("^\\s-*\\([.]\\w+\\>\\)" 1 font-lock-keyword-face)
1872 ("\\('[^']+'\\)" 1 font-lock-string-face)
1873 ("\\(\"[^\"]+\"\\)" 1 font-lock-string-face)
1874 ("[(,]\\s-*\\(\\([.]\\|_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face))
1875 '("\\.[aA][pP]\\'"
1876 "\\.[aA][sS][xX]\\'"
1877 "\\.[aA][sS][tT][aA][pP]\\'"
1878 "\\.[pP][sS][pP]\\'"
1879 "\\.[dD][eE][cC][kK]\\'"
1880 "\\.[gG][oO][dD][aA][tT][aA]")
1881 (list
1882 'generic-bracket-support
1883 ;; Make keywords case-insensitive
1884 (function
1885 (lambda()
1886 (setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
1887 "Generic mode for ASTAP circuit netlist files."))
1888
1889 (when (memq 'etc-modules-conf-generic-mode generic-extras-enable-list)
1890
1891 (define-generic-mode etc-modules-conf-generic-mode
1892 ;; List of comment characters
1893 '(?#)
1894 ;; List of keywords
1895 '("above"
1896 "alias"
1897 "below"
1898 "define"
1899 "depfile"
1900 "else"
1901 "elseif"
1902 "endif"
1903 "if"
1904 "include"
1905 "insmod_opt"
1906 "install"
1907 "keep"
1908 "options"
1909 "path"
1910 "generic_stringfile"
1911 "pcimapfile"
1912 "isapnpmapfile"
1913 "usbmapfile"
1914 "parportmapfile"
1915 "ieee1394mapfile"
1916 "pnpbiosmapfile"
1917 "probe"
1918 "probeall"
1919 "prune"
1920 "post-install"
1921 "post-remove"
1922 "pre-install"
1923 "pre-remove"
1924 "remove"
1925 "persistdir")
1926 ;; List of additional font-lock-expressions
1927 nil
1928 ;; List of additional automode-alist expressions
1929 '("/etc/modules.conf" "/etc/conf.modules")
1930 ;; List of set up functions to call
1931 nil))
1932
1933 (provide 'generic-x)
1934
1935 ;;; generic-x.el ends here