1 ;;; generic-x.el --- Extra Modes for generic-mode
3 ;; Copyright (C) 1997, 1998 Free Software Foundation, Inc.
5 ;; Author: Peter Breton <pbreton@cs.umb.edu>
6 ;; Created: Tue Oct 08 1996
7 ;; Keywords: generic, comment, font-lock
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
28 ;; This file contains some pre-defined generic-modes.
32 ;; Add this line to your .emacs file:
34 ;; (require 'generic-x)
36 ;; You can decide which modes to load by setting the variable
37 ;; `generic-extras-enable-list'. Some platform-specific modes are
38 ;; affected by the variables `generic-define-mswindows-modes' and
39 ;; `generic-define-unix-modes' (which see).
41 ;; You can also send in new modes; if the file types a reasonably common,
42 ;; we would like to install them.
44 ;; PROBLEMS WHEN USED WITH FOLDING MODE:
46 ;; [The following relates to the obsolete selective-display technique.
47 ;; Folding mode should use invisible text properties instead. -- Dave
50 ;; From Anders Lindgren <andersl@csd.uu.se>
52 ;; Problem summary: Wayne Adams has found a problem when using folding
53 ;; mode in conjuction with font-lock for a mode defined in
56 ;; The problem, as Wayne described it, was that error messages of the
57 ;; following form appeared when both font-lock and folding are used:
59 ;; > - various msgs including "Fontifying region...(error Stack
60 ;; > overflow in regexp matcher)" appear
62 ;; I have just tracked down the cause of the problem. The regexp:s in
63 ;; `generic-x.el' does not take into account the way that folding
64 ;; hides sections of the buffer. The technique is known as
65 ;; `selective-display' and has been available for a very long time (I
66 ;; started using it back in the good old' Emacs 18 days). Basically, a
67 ;; section is hidden by creating one very long line were the newline
68 ;; character (C-j) is replaced by a linefeed (C-m) character.
70 ;; Many other hiding packages, besides folding, use the same technique,
71 ;; the problem should occur when using them as well.
73 ;; The erroronous lines in `generic-extras' look like the following (this
74 ;; example is from the `ini' section):
76 ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)
77 ;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face)
79 ;; The intention of these lines is to highlight lines of the following
85 ;; However, since the `.' regexp symbol match the linefeed character the
86 ;; entire folded section is searched, resulting in a regexp stack
89 ;; Solution suggestion 2: Instead of using ".", use the sequence
90 ;; "[^\n\r]". This will make the rules behave just as before, but they
91 ;; will work together with selective-display.
98 (defgroup generic-x nil
99 "Extra modes for generic mode."
104 (defcustom generic-extras-enable-list nil
105 "*List of generic modes to enable by default.
106 Each entry in the list should be a symbol.
107 The variables `generic-define-mswindows-modes' and `generic-define-unix-modes'
108 also affect which generic modes are defined.
109 Please note that if you set this variable after generic-x is loaded,
110 you must reload generic-x to enable the specified modes."
115 (defcustom generic-define-mswindows-modes
116 (memq system-type (list 'windows-nt 'ms-dos))
117 "*If non-nil, some MS-Windows specific generic modes will be defined."
122 (defcustom generic-define-unix-modes
123 (not (memq system-type (list 'windows-nt 'ms-dos)))
124 "*If non-nil, some Unix specific generic modes will be defined."
129 (and generic-define-mswindows-modes
130 (setq generic-extras-enable-list
131 (append (list 'bat-generic-mode 'ini-generic-mode
132 'inf-generic-mode 'rc-generic-mode
133 'reg-generic-mode 'rul-generic-mode
134 'hosts-generic-mode 'apache-generic-mode)
135 generic-extras-enable-list)))
137 (and generic-define-unix-modes
138 (setq generic-extras-enable-list
139 (append (list 'apache-generic-mode 'samba-generic-mode
140 'hosts-generic-mode 'fvwm-generic-mode
141 'x-resource-generic-mode
144 generic-extras-enable-list)))
146 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
152 (memq 'apache-generic-mode generic-extras-enable-list)
154 (define-generic-mode 'apache-generic-mode
157 '(("^\\(<.*>\\)" 1 'font-lock-reference-face)
158 ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face))
159 (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'")
161 "Generic mode for Apache or HTTPD configuration files."))
165 (memq 'samba-generic-mode generic-extras-enable-list)
167 (define-generic-mode 'samba-generic-mode
170 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face))
171 (list "smb\\.conf\\'")
172 (list 'generic-bracket-support)
173 "Generic mode for Samba configuration files."))
176 ;; This is pretty basic. Also, modes for other window managers could
177 ;; be defined as well.
179 (memq 'fvwm-generic-mode generic-extras-enable-list)
181 (define-generic-mode 'fvwm-generic-mode
199 (list "\\.fvwmrc\\'" "\\.fvwm2rc\\'")
201 "Generic mode for FVWM configuration files."))
204 ;; I'm pretty sure I've seen an actual mode to do this, but I don't
205 ;; think it's standard with Emacs
207 (memq 'x-resource-generic-mode generic-extras-enable-list)
209 (define-generic-mode 'x-resource-generic-mode
212 '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face))
213 (list "\\.Xdefaults\\'" "\\.Xresources\\'")
215 "Generic mode for X Resource configuration files."))
219 (memq 'hosts-generic-mode generic-extras-enable-list)
221 (define-generic-mode 'hosts-generic-mode
224 '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-reference-face))
225 (list "[hH][oO][sS][tT][sS]\\'")
227 "Generic mode for HOSTS files."))
229 ;;; Windows INF files
231 (memq 'inf-generic-mode generic-extras-enable-list)
233 (define-generic-mode 'inf-generic-mode
236 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face))
237 (list "\\.[iI][nN][fF]\\'")
238 (list 'generic-bracket-support)
239 "Generic mode for MS-Windows INF files."))
241 ;;; Windows INI files
242 ;; Should define escape character as well!
244 (memq 'ini-generic-mode generic-extras-enable-list)
246 (define-generic-mode 'ini-generic-mode
249 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)
250 ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$"
251 (1 font-lock-function-name-face)
252 (2 font-lock-variable-name-face)))
253 (list "\\.[iI][nN][iI]\\'")
257 (setq imenu-generic-expression
258 '((nil "^\\[\\(.*\\)\\]" 1)
259 ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))
261 "Generic mode for MS-Windows INI files."))
263 ;;; Windows REG files
264 ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
266 (memq 'reg-generic-mode generic-extras-enable-list)
268 (define-generic-mode 'reg-generic-mode
270 '("key" "classes_root" "REGEDIT" "REGEDIT4")
271 '(("\\(\\[.*]\\)" 1 'font-lock-reference-face)
272 ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face))
273 '("\\.[rR][eE][gG]\\'")
277 (setq imenu-generic-expression
278 '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
279 "Generic mode for MS-Windows Registry files."))
281 ;;; DOS/Windows BAT files
282 (if (not (memq 'bat-generic-mode generic-extras-enable-list))
284 (define-generic-mode 'bat-generic-mode
288 ;; Make this one first in the list, otherwise comments will
289 ;; be over-written by other variables
290 (list "^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 'font-lock-comment-face t)
291 (list "^[ \t]*\\(::-.*\\)" 1 'font-lock-comment-face t)
293 "^[@ \t]*\\([bB][rR][eE][aA][kK]\\|[vV][eE][rR][iI][fF][yY]\\)[ \t]+\\([oO]\\([nN]\\|[fF][fF]\\)\\)"
294 '(1 font-lock-builtin-face)
295 '(2 font-lock-constant-face 'append t))
296 ;; Any text (except ON/OFF) following ECHO is a string.
298 "^[@ \t]*\\([eE][cC][hH][oO]\\)[ \t]+\\(\\([oO]\\([nN]\\|[fF][fF]\\)\\)\\|\\([^>|\r\n]+\\)\\)"
299 '(1 font-lock-builtin-face)
300 '(3 font-lock-constant-face t t)
301 '(5 font-lock-string-face t t))
302 ;; These keywords appear as the first word on a line. (Actually, they
303 ;; can also appear after "if ..." or "for ..." clause, but since they
304 ;; are frequently used in simple text, we punt.)
305 (generic-make-keywords-list
310 'font-lock-keyword-face "^[@ \t]*")
311 ;; These keywords can be anywhere on a line
312 (generic-make-keywords-list
315 "EXIST" "exist" "Exist"
316 "ERRORLEVEL" "errorlevel" "ErrorLevel" "Errorlevel"
317 "GOTO" "goto" "GoTo" "Goto"
319 ) 'font-lock-keyword-face "[ \t|\n]")
320 ; These are built-in commands. Only frequently-used ones are listed.
321 (generic-make-keywords-list
331 "PAUSE" "pause" "Pause"
332 "PROMPT" "prompt" "Prompt"
336 "START" "start" "Start"
337 "SHIFT" "shift" "Shift"
338 ) 'font-lock-builtin-face "[ \t|\n]")
339 (list "^[ \t]*\\(:\\sw+\\)" 1 'font-lock-function-name-face t)
340 (list "\\(%\\sw+%\\)" 1 'font-lock-variable-name-face t)
341 (list "\\(%[0-9]\\)" 1 'font-lock-variable-name-face t)
342 (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face)
343 (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face)
344 (list "[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
345 '(1 font-lock-keyword-face)
346 '(2 font-lock-function-name-face nil t))
347 (list "[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?"
348 '(1 font-lock-builtin-face)
349 '(2 font-lock-variable-name-face t t))
354 "\\`[cC][oO][nN][fF][iI][gG]\\."
355 "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\." )
356 (list 'generic-bat-mode-setup-function)
357 "Generic mode for MS-Windows BAT files.")
359 (defvar bat-generic-mode-syntax-table nil
360 "Syntax table in use in bat-generic-mode buffers.")
362 ;; Make underscores count as words
363 (if bat-generic-mode-syntax-table
365 (setq bat-generic-mode-syntax-table (make-syntax-table))
366 (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
368 ;; bat-generic-mode doesn't use the comment functionality of generic-mode
369 ;; because it has a three-letter comment-string, so we do it
370 ;; here manually instead
371 (defun generic-bat-mode-setup-function ()
372 (make-local-variable 'parse-sexp-ignore-comments)
373 (make-local-variable 'comment-start)
374 (make-local-variable 'comment-start-skip)
375 (make-local-variable 'comment-end)
376 (setq imenu-generic-expression '((nil "^:\\(\\sw+\\)" 1))
377 parse-sexp-ignore-comments t
380 comment-start-skip "[Rr][Ee][Mm] *"
382 (set-syntax-table bat-generic-mode-syntax-table)
387 ;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode
390 (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
392 (define-generic-mode 'mailagent-rules-generic-mode
394 (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
395 '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face)
396 ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-reference-face))
398 (list 'mailagent-rules-setup-function)
399 "Mode for Mailagent rules files.")
401 (defun mailagent-rules-setup-function ()
402 (make-local-variable 'imenu-generic-expression)
403 (setq imenu-generic-expression
404 '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))
407 ;; Solaris/Sys V prototype files
409 (memq 'prototype-generic-mode generic-extras-enable-list)
411 (define-generic-mode 'prototype-generic-mode
415 ("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$"
416 (2 font-lock-reference-face)
417 (3 font-lock-keyword-face))
418 ("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
419 (1 font-lock-reference-face)
420 (2 font-lock-keyword-face)
421 (3 font-lock-variable-name-face))
422 ("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$"
423 (1 font-lock-keyword-face)
424 (3 font-lock-variable-name-face))
425 ("^\\(!\\s-*\\sw+\\)=\\([^\n\r]*\\)$"
426 (1 font-lock-keyword-face)
427 (2 font-lock-variable-name-face))
429 (list "prototype\\'")
431 "Mode for Sys V prototype files."))
433 ;; Solaris/Sys V pkginfo files
435 (memq 'pkginfo-generic-mode generic-extras-enable-list)
437 (define-generic-mode 'pkginfo-generic-mode
441 ("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
442 (1 font-lock-keyword-face)
443 (2 font-lock-variable-name-face))
447 "Mode for Sys V pkginfo files."))
450 (define-generic-mode 'javascript-generic-mode
462 (list "^\\s-*function\\s-+\\([A-Za-z0-9]+\\)"
463 '(1 font-lock-function-name-face))
464 (list "^\\s-*var\\s-+\\([A-Za-z0-9]+\\)"
465 '(1 font-lock-variable-name-face))
471 (setq imenu-generic-expression
472 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))
474 "Mode for JavaScript files.")
477 (define-generic-mode 'vrml-generic-mode
510 (list "USE\\s-+\\([-A-Za-z0-9_]+\\)"
511 '(1 font-lock-reference-face))
512 (list "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
513 '(1 font-lock-type-face)
514 '(2 font-lock-reference-face))
515 (list "^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{"
516 '(1 font-lock-function-name-face))
518 "^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
519 '(2 font-lock-variable-name-face))
525 (setq imenu-generic-expression
526 '((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
528 "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
531 "Generic Mode for VRML files.")
534 (define-generic-mode 'java-manifest-generic-mode
546 '(("^Name:\\s-+\\([^\n\r]*\\)$"
547 (1 font-lock-variable-name-face))
548 ("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
549 (2 font-lock-reference-face))
551 (list "manifest\\.mf\\'")
553 "Mode for Java Manifest files")
555 ;; Java properties files
556 (define-generic-mode 'java-properties-generic-mode
559 ;; Property and value can be separated with whitespace or an equal sign
560 '(("^\\([\\.A-Za-z0-9_]+\\)\\(\\s-+\\|\\(\\s-*=\\s-*\\)\\)\\([^\r\n]*\\)$"
561 (1 font-lock-reference-face) (4 font-lock-variable-name-face)))
564 "Mode for Java properties files.")
566 ;; C shell alias definitions
568 (memq 'alias-generic-mode generic-extras-enable-list)
570 (define-generic-mode 'alias-generic-mode
572 (list "alias" "unalias")
573 '(("^alias\\s-+\\([-A-Za-z0-9_]+\\)\\s-+"
574 (1 font-lock-variable-name-face))
575 ("^unalias\\s-+\\([-A-Za-z0-9_]+\\)\\s-*$"
576 (1 font-lock-variable-name-face))
582 (setq imenu-generic-expression
583 '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2)))
585 "Mode for C Shell alias files.")
589 ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
591 (memq 'rc-generic-mode generic-extras-enable-list)
593 (define-generic-mode 'rc-generic-mode
649 ;; the choice of what tokens go where is somewhat arbitrary,
650 ;; as is the choice of which value tokens are included, as
651 ;; the choice of face for each token group
653 (generic-make-keywords-list
662 ) 'font-lock-type-face)
663 (generic-make-keywords-list
669 ) 'font-lock-function-name-face)
670 '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
671 '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
672 '("^#[ \t]*\\(elif\\|if\\)\\>"
673 ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
674 (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)))
675 '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
676 (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)))
677 (list "\\.[rR][cC]$")
679 "Generic mode for MS-Windows Resource files."))
681 ;; InstallShield RUL files
682 ;; Contributed by Alfred.Correira@Pervasive.Com
684 (memq 'rul-generic-mode generic-extras-enable-list)
685 ;;; build the regexp strings using regexp-opt
686 (defvar installshield-statement-keyword-list
706 ;; "goto" -- handled elsewhere
721 "Statement keywords used in InstallShield 3 and 5.")
723 (defvar installshield-system-functions-list
743 "ComponentAddItem" ; differs between IS3 and IS5
744 "ComponentCompareSizeRequired" ; IS5 only
746 "ComponentError" ; IS5 only
747 "ComponentFileEnum" ; IS5 only
748 "ComponentFileInfo" ; IS5 only
749 "ComponentFilterLanguage" ; IS5 only
750 "ComponentFilterOS" ; IS5 only
751 "ComponentGetData" ; IS5 only
752 "ComponentGetItemInfo" ; IS3 only
753 "ComponentGetItemSize" ; differs between IS3 and IS5
754 "ComponentIsItemSelected" ; differs between IS3 and IS5
756 "ComponentMoveData" ; IS5 only
757 "ComponentSelectItem" ; differs between IS3 and IS5
758 "ComponentSetData" ; IS5 only
759 "ComponentSetItemInfo" ; IS3 only
760 "ComponentSetTarget" ; IS5 only
761 "ComponentSetupTypeEnum" ; IS5 only
762 "ComponentSetupTypeGetData" ; IS5 only
763 "ComponentSetupTypeSet" ; IS5 only
765 "ComponentValidate" ; IS5 only
766 "CompressAdd" ; IS3 only
767 "CompressDel" ; IS3 only
768 "CompressEnum" ; IS3 only
769 "CompressGet" ; IS3 only
770 "CompressInfo" ; IS3 only
774 "CreateProgramFolder"
775 "DeinstallSetReference" ; IS5 only
801 "FileSetBeginDefine" ; IS3 only
802 "FileSetEndDefine" ; IS3 only
803 "FileSetPerformEz" ; IS3 only
804 "FileSetPerform" ; IS3 only
805 "FileSetReset" ; IS3 only
806 "FileSetRoot" ; IS3 only
842 "LongPathToShortPath"
857 "PlayMMedia" ; IS5 only
866 "RegDBSetDefaultRoot"
875 "SdComponentAdvCheckSpace"
877 "SdComponentAdvUpdateSpace"
880 "SdComponentDialogAdv"
881 "SdComponentDialogEx"
882 "SdComponentDlgCheckSpace"
885 "SdConfirmRegistration"
897 "SdGetUserCompanyInfo"
906 "SdOptionsButtonsInit"
907 "SdPlugInProductName"
910 "SdRegExEnableButton"
915 "SdSetSequentialItems"
917 "SdSetupTypeEx" ; IS5 only
928 "SdUpdateComponentSelection"
934 "SetDisplayEffect" ; IS5 only
936 "SetForegroundWindow"
963 "System functions defined in InstallShield 3 and 5.")
965 (defvar installshield-system-variables-list
968 "CORECOMPONENTHANDLING"
986 "System variables used in InstallShield 3 and 5.")
988 (defvar installshield-types-list
1007 "Type keywords used in InstallShield 3 and 5.")
1009 ;;; some might want to skip highlighting these to improve performance
1010 (defvar installshield-funarg-constants-list
1041 "COMP_UPDATE_VERSION"
1060 "DLG_INFO_CHECKSELECTION"
1062 "DLG_INFO_USEDECIMAL"
1063 "DLG_MSG_INFORMATION"
1084 "FILE_ATTR_ARCHIVED"
1085 "FILE_ATTR_DIRECTORY"
1088 "FILE_ATTR_READONLY"
1094 "FILE_MODE_BINARYREADONLY"
1156 "REGDB_APPPATH_DEFAULT"
1159 "REGDB_ERR_CONNECTIONEXISTS"
1160 "REGDB_ERR_CORRUPTEDREGSITRY"
1161 "REGDB_ERR_INITIALIZATION"
1162 "REGDB_ERR_INVALIDHANDLE"
1163 "REGDB_ERR_INVALIDNAME"
1165 "REGDB_STRING_EXPAND"
1166 "REGDB_STRING_MULTI"
1168 "REGDB_UNINSTALL_NAME"
1212 "Function argument constants used in InstallShield 3 and 5.")
1214 (define-generic-mode 'rul-generic-mode
1215 ;; Using "/*" and "*/" doesn't seem to be working right
1217 installshield-statement-keyword-list
1219 ;; preprocessor constructs
1220 '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"
1221 1 font-lock-string-face)
1222 '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
1223 (1 font-lock-reference-face)
1224 (2 font-lock-variable-name-face nil t))
1225 ;; indirect string constants
1226 '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face)
1228 '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face)
1229 '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"
1230 (1 font-lock-keyword-face)
1231 (2 font-lock-reference-face nil t))
1233 (generic-make-keywords-list
1234 installshield-system-variables-list
1235 'font-lock-variable-name-face "[^_]" "[^_]")
1237 (generic-make-keywords-list
1238 installshield-system-functions-list
1239 'font-lock-function-name-face "[^_]" "[^_]")
1241 (generic-make-keywords-list
1242 installshield-types-list
1243 'font-lock-type-face "[^_]" "[^_]")
1244 ;; function argument constants
1245 (generic-make-keywords-list
1246 installshield-funarg-constants-list
1247 'font-lock-variable-name-face "[^_]" "[^_]") ; is this face the best choice?
1249 (list "\\.[rR][uU][lL]$")
1253 (setq imenu-generic-expression
1254 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))
1256 "Generic mode for InstallShield RUL files.")
1258 (define-skeleton rul-if
1259 "Insert an if statement."
1261 "if(" str ") then" \n
1263 ( "other condition, %s: "
1264 > "elseif(" str ") then" \n
1272 (define-skeleton rul-function
1273 "Insert a function statement."
1275 "function " str " ()" \n
1276 ( "local variables, %s: "
1285 ;; Additions by ACorreir@pervasive-sw.com (Alfred Correira)
1286 (define-generic-mode 'mailrc-generic-mode
1298 '(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
1299 (2 font-lock-reference-face) (3 font-lock-variable-name-face))
1300 ("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$"
1301 (2 font-lock-reference-face) (3 font-lock-variable-name-face)))
1302 (list "\\.mailrc\\'")
1304 "Mode for mailrc files.")
1306 (provide 'generic-x)
1308 ;;; generic-x.el ends here