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 ;; From Anders Lindgren <andersl@csd.uu.se>
48 ;; Problem summary: Wayne Adams has found a problem when using folding
49 ;; mode in conjuction with font-lock for a mode defined in
52 ;; The problem, as Wayne described it, was that error messages of the
53 ;; following form appeared when both font-lock and folding are used:
55 ;; > - various msgs including "Fontifying region...(error Stack
56 ;; > overflow in regexp matcher)" appear
58 ;; I have just tracked down the cause of the problem. The regexp:s in
59 ;; `generic-x.el' does not take into account the way that folding
60 ;; hides sections of the buffer. The technique is known as
61 ;; `selective-display' and has been available for a very long time (I
62 ;; started using it back in the good old' Emacs 18 days). Basically, a
63 ;; section is hidden by creating one very long line were the newline
64 ;; character (C-j) is replaced by a linefeed (C-m) character.
66 ;; Many other hiding packages, besides folding, use the same technique,
67 ;; the problem should occur when using them as well.
69 ;; The erroronous lines in `generic-extras' look like the following (this
70 ;; example is from the `ini' section):
72 ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)
73 ;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face)
75 ;; The intention of these lines is to highlight lines of the following
81 ;; However, since the `.' regexp symbol match the linefeed character the
82 ;; entire folded section is searched, resulting in a regexp stack
85 ;; Solution suggestion 2: Instead of using ".", use the sequence
86 ;; "[^\n\r]". This will make the rules behave just as before, but they
87 ;; will work together with selective-display.
94 (defgroup generic-x nil
95 "Extra modes for generic mode."
100 (defcustom generic-extras-enable-list nil
101 "*List of generic modes to enable by default.
102 Each entry in the list should be a symbol.
103 The variables `generic-define-mswindows-modes' and `generic-define-unix-modes'
104 also affect which generic modes are defined.
105 Please note that if you set this variable after generic-x is loaded,
106 you must reload generic-x to enable the specified modes."
111 (defcustom generic-define-mswindows-modes
112 (memq system-type (list 'windows-nt 'ms-dos))
113 "*If non-nil, some MS-Windows specific generic modes will be defined."
118 (defcustom generic-define-unix-modes
119 (not (memq system-type (list 'windows-nt 'ms-dos)))
120 "*If non-nil, some Unix specific generic modes will be defined."
125 (and generic-define-mswindows-modes
126 (setq generic-extras-enable-list
127 (append (list 'bat-generic-mode 'ini-generic-mode
128 'inf-generic-mode 'rc-generic-mode
129 'reg-generic-mode 'rul-generic-mode
130 'hosts-generic-mode 'apache-generic-mode)
131 generic-extras-enable-list)))
133 (and generic-define-unix-modes
134 (setq generic-extras-enable-list
135 (append (list 'apache-generic-mode 'samba-generic-mode
136 'hosts-generic-mode 'fvwm-generic-mode
137 'x-resource-generic-mode
140 generic-extras-enable-list)))
142 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
144 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
148 (memq 'apache-generic-mode generic-extras-enable-list)
150 (define-generic-mode 'apache-generic-mode
153 '(("^\\(<.*>\\)" 1 'font-lock-reference-face)
154 ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face))
155 (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'")
157 "Generic mode for Apache or HTTPD configuration files."))
161 (memq 'samba-generic-mode generic-extras-enable-list)
163 (define-generic-mode 'samba-generic-mode
166 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face))
167 (list "smb\\.conf\\'")
168 (list 'generic-bracket-support)
169 "Generic mode for Samba configuration files."))
172 ;; This is pretty basic. Also, modes for other window managers could
173 ;; be defined as well.
175 (memq 'fvwm-generic-mode generic-extras-enable-list)
177 (define-generic-mode 'fvwm-generic-mode
195 (list "\\.fvwmrc\\'" "\\.fvwm2rc\\'")
197 "Generic mode for FVWM configuration files."))
200 ;; I'm pretty sure I've seen an actual mode to do this, but I don't
201 ;; think it's standard with Emacs
203 (memq 'x-resource-generic-mode generic-extras-enable-list)
205 (define-generic-mode 'x-resource-generic-mode
208 '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face))
209 (list "\\.Xdefaults\\'" "\\.Xresources\\'")
211 "Generic mode for X Resource configuration files."))
215 (memq 'hosts-generic-mode generic-extras-enable-list)
217 (define-generic-mode 'hosts-generic-mode
220 '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-reference-face))
221 (list "[hH][oO][sS][tT][sS]\\'")
223 "Generic mode for HOSTS files."))
225 ;;; Windows INF files
227 (memq 'inf-generic-mode generic-extras-enable-list)
229 (define-generic-mode 'inf-generic-mode
232 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face))
233 (list "\\.[iI][nN][fF]\\'")
234 (list 'generic-bracket-support)
235 "Generic mode for MS-Windows INF files."))
237 ;;; Windows INI files
238 ;; Should define escape character as well!
240 (memq 'ini-generic-mode generic-extras-enable-list)
242 (define-generic-mode 'ini-generic-mode
245 '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)
246 ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$"
247 (1 font-lock-function-name-face)
248 (2 font-lock-variable-name-face)))
249 (list "\\.[iI][nN][iI]\\'")
253 (setq imenu-generic-expression
254 '((nil "^\\[\\(.*\\)\\]" 1)
255 ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))
257 "Generic mode for MS-Windows INI files."))
259 ;;; Windows REG files
260 ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
262 (memq 'reg-generic-mode generic-extras-enable-list)
264 (define-generic-mode 'reg-generic-mode
266 '("key" "classes_root" "REGEDIT" "REGEDIT4")
267 '(("\\(\\[.*]\\)" 1 'font-lock-reference-face)
268 ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face))
269 '("\\.[rR][eE][gG]\\'")
273 (setq imenu-generic-expression
274 '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
275 "Generic mode for MS-Windows Registry files."))
277 ;;; Windows BAT files
278 (if (not (memq 'bat-generic-mode generic-extras-enable-list))
280 (define-generic-mode 'bat-generic-mode
284 ;; Make this one first in the list, otherwise comments will
285 ;; be over-written by other variables
286 (list "^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 'font-lock-comment-face t)
287 (list "^[ \t]*\\(::-.*\\)" 1 'font-lock-comment-face t)
288 ;; These keywords appear as the first word on a line
289 (generic-make-keywords-list
296 "[pP][aA][uU][sS][eE]"
297 "[pP][rR][oO][mM][pP][tT]"
299 "[sS][tT][aA][rR][tT]"
301 'font-lock-keyword-face "^[@ \t]*")
302 ;; These keywords can be anywhere on a line
303 (generic-make-keywords-list
305 "[eE][xX][iI][sS][tT]"
306 "[eE][rR][rR][oO][rR][lL][eE][vV][eE][lL]"
309 ) 'font-lock-keyword-face)
310 (list "^[ \t]*\\(:\\sw+\\)" 1 'font-lock-function-name-face t)
311 (list "\\(%\\sw+%\\)" 1 'font-lock-reference-face)
312 (list "\\(%[0-9]\\)" 1 'font-lock-reference-face)
313 (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face)
314 (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face)
315 (list "\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
316 '(1 font-lock-keyword-face)
317 '(2 font-lock-function-name-face nil t))
320 (list "\\.[bB][aA][tT]\\'" "CONFIG\\." "AUTOEXEC\\." )
321 (list 'generic-bat-mode-setup-function)
322 "Generic mode for MS-Windows BAT files.")
324 (defvar bat-generic-mode-syntax-table nil
325 "Syntax table in use in bat-generic-mode buffers.")
327 ;; Make underscores count as words
328 (if bat-generic-mode-syntax-table
330 (setq bat-generic-mode-syntax-table (make-syntax-table))
331 (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
333 ;; bat-generic-mode doesn't use the comment functionality of generic-mode
334 ;; because it has a three-letter comment-string, so we do it
335 ;; here manually instead
336 (defun generic-bat-mode-setup-function ()
337 (make-local-variable 'parse-sexp-ignore-comments)
338 (make-local-variable 'comment-start)
339 (make-local-variable 'comment-start-skip)
340 (make-local-variable 'comment-end)
341 (setq imenu-generic-expression '((nil "^:\\(\\sw+\\)" 1))
342 parse-sexp-ignore-comments t
345 comment-start-skip "[Rr][Ee][Mm] *"
347 (set-syntax-table bat-generic-mode-syntax-table)
352 ;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode
355 (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
357 (define-generic-mode 'mailagent-rules-generic-mode
359 (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
360 '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face)
361 ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-reference-face))
363 (list 'mailagent-rules-setup-function)
364 "Mode for Mailagent rules files.")
366 (defun mailagent-rules-setup-function ()
367 (make-local-variable 'imenu-generic-expression)
368 (setq imenu-generic-expression
369 '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))
372 ;; Solaris/Sys V prototype files
374 (memq 'prototype-generic-mode generic-extras-enable-list)
376 (define-generic-mode 'prototype-generic-mode
380 ("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$"
381 (2 font-lock-reference-face)
382 (3 font-lock-keyword-face))
383 ("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
384 (1 font-lock-reference-face)
385 (2 font-lock-keyword-face)
386 (3 font-lock-variable-name-face))
387 ("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$"
388 (1 font-lock-keyword-face)
389 (3 font-lock-variable-name-face))
390 ("^\\(!\\s-*\\sw+\\)=\\([^\n\r]*\\)$"
391 (1 font-lock-keyword-face)
392 (2 font-lock-variable-name-face))
394 (list "prototype\\'")
396 "Mode for Sys V prototype files."))
398 ;; Solaris/Sys V pkginfo files
400 (memq 'pkginfo-generic-mode generic-extras-enable-list)
402 (define-generic-mode 'pkginfo-generic-mode
406 ("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
407 (1 font-lock-keyword-face)
408 (2 font-lock-variable-name-face))
412 "Mode for Sys V pkginfo files."))
415 (define-generic-mode 'javascript-generic-mode
427 (list "^\\s-*function\\s-+\\([A-Za-z0-9]+\\)"
428 '(1 font-lock-function-name-face))
429 (list "^\\s-*var\\s-+\\([A-Za-z0-9]+\\)"
430 '(1 font-lock-variable-name-face))
436 (setq imenu-generic-expression
437 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))
439 "Mode for JavaScript files.")
442 (define-generic-mode 'vrml-generic-mode
475 (list "USE\\s-+\\([-A-Za-z0-9_]+\\)"
476 '(1 font-lock-reference-face))
477 (list "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
478 '(1 font-lock-type-face)
479 '(2 font-lock-reference-face))
480 (list "^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{"
481 '(1 font-lock-function-name-face))
483 "^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
484 '(2 font-lock-variable-name-face))
490 (setq imenu-generic-expression
491 '((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
493 "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
496 "Generic Mode for VRML files.")
499 (define-generic-mode 'java-manifest-generic-mode
511 '(("^Name:\\s-+\\([^\n\r]*\\)$"
512 (1 font-lock-variable-name-face))
513 ("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
514 (2 font-lock-reference-face))
516 (list "manifest\\.mf\\'")
518 "Mode for Java Manifest files")
520 ;; Java properties files
521 (define-generic-mode 'java-properties-generic-mode
524 ;; Property and value can be separated with whitespace or an equal sign
525 '(("^\\([\\.A-Za-z0-9_]+\\)\\(\\s-+\\|\\(\\s-*=\\s-*\\)\\)\\([^\r\n]*\\)$"
526 (1 font-lock-reference-face) (4 font-lock-variable-name-face)))
529 "Mode for Java properties files.")
531 ;; C shell alias definitions
533 (memq 'alias-generic-mode generic-extras-enable-list)
535 (define-generic-mode 'alias-generic-mode
537 (list "alias" "unalias")
538 '(("^alias\\s-+\\([-A-Za-z0-9_]+\\)\\s-+"
539 (1 font-lock-variable-name-face))
540 ("^unalias\\s-+\\([-A-Za-z0-9_]+\\)\\s-*$"
541 (1 font-lock-variable-name-face))
547 (setq imenu-generic-expression
548 '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2)))
550 "Mode for C Shell alias files.")
554 ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
556 (memq 'rc-generic-mode generic-extras-enable-list)
558 (define-generic-mode 'rc-generic-mode
614 ;; the choice of what tokens go where is somewhat arbitrary,
615 ;; as is the choice of which value tokens are included, as
616 ;; the choice of face for each token group
618 (generic-make-keywords-list
627 ) 'font-lock-type-face)
628 (generic-make-keywords-list
634 ) 'font-lock-function-name-face)
635 '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
636 '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
637 '("^#[ \t]*\\(elif\\|if\\)\\>"
638 ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
639 (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)))
640 '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
641 (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)))
642 (list "\\.[rR][cC]$")
644 "Generic mode for MS-Windows Resource files."))
646 ;; InstallShield RUL files
647 ;; Contributed by Alfred.Correira@Pervasive.Com
649 (memq 'rul-generic-mode generic-extras-enable-list)
650 ;;; build the regexp strings using regexp-opt
651 (defvar installshield-statement-keyword-list
671 ;; "goto" -- handled elsewhere
686 "Statement keywords used in InstallShield 3 and 5.")
688 (defvar installshield-system-functions-list
708 "ComponentAddItem" ; differs between IS3 and IS5
709 "ComponentCompareSizeRequired" ; IS5 only
711 "ComponentError" ; IS5 only
712 "ComponentFileEnum" ; IS5 only
713 "ComponentFileInfo" ; IS5 only
714 "ComponentFilterLanguage" ; IS5 only
715 "ComponentFilterOS" ; IS5 only
716 "ComponentGetData" ; IS5 only
717 "ComponentGetItemInfo" ; IS3 only
718 "ComponentGetItemSize" ; differs between IS3 and IS5
719 "ComponentIsItemSelected" ; differs between IS3 and IS5
721 "ComponentMoveData" ; IS5 only
722 "ComponentSelectItem" ; differs between IS3 and IS5
723 "ComponentSetData" ; IS5 only
724 "ComponentSetItemInfo" ; IS3 only
725 "ComponentSetTarget" ; IS5 only
726 "ComponentSetupTypeEnum" ; IS5 only
727 "ComponentSetupTypeGetData" ; IS5 only
728 "ComponentSetupTypeSet" ; IS5 only
730 "ComponentValidate" ; IS5 only
731 "CompressAdd" ; IS3 only
732 "CompressDel" ; IS3 only
733 "CompressEnum" ; IS3 only
734 "CompressGet" ; IS3 only
735 "CompressInfo" ; IS3 only
739 "CreateProgramFolder"
740 "DeinstallSetReference" ; IS5 only
766 "FileSetBeginDefine" ; IS3 only
767 "FileSetEndDefine" ; IS3 only
768 "FileSetPerformEz" ; IS3 only
769 "FileSetPerform" ; IS3 only
770 "FileSetReset" ; IS3 only
771 "FileSetRoot" ; IS3 only
807 "LongPathToShortPath"
822 "PlayMMedia" ; IS5 only
831 "RegDBSetDefaultRoot"
840 "SdComponentAdvCheckSpace"
842 "SdComponentAdvUpdateSpace"
845 "SdComponentDialogAdv"
846 "SdComponentDialogEx"
847 "SdComponentDlgCheckSpace"
850 "SdConfirmRegistration"
862 "SdGetUserCompanyInfo"
871 "SdOptionsButtonsInit"
872 "SdPlugInProductName"
875 "SdRegExEnableButton"
880 "SdSetSequentialItems"
882 "SdSetupTypeEx" ; IS5 only
893 "SdUpdateComponentSelection"
899 "SetDisplayEffect" ; IS5 only
901 "SetForegroundWindow"
928 "System functions defined in InstallShield 3 and 5.")
930 (defvar installshield-system-variables-list
933 "CORECOMPONENTHANDLING"
951 "System variables used in InstallShield 3 and 5.")
953 (defvar installshield-types-list
972 "Type keywords used in InstallShield 3 and 5.")
974 ;;; some might want to skip highlighting these to improve performance
975 (defvar installshield-funarg-constants-list
1006 "COMP_UPDATE_VERSION"
1025 "DLG_INFO_CHECKSELECTION"
1027 "DLG_INFO_USEDECIMAL"
1028 "DLG_MSG_INFORMATION"
1049 "FILE_ATTR_ARCHIVED"
1050 "FILE_ATTR_DIRECTORY"
1053 "FILE_ATTR_READONLY"
1059 "FILE_MODE_BINARYREADONLY"
1121 "REGDB_APPPATH_DEFAULT"
1124 "REGDB_ERR_CONNECTIONEXISTS"
1125 "REGDB_ERR_CORRUPTEDREGSITRY"
1126 "REGDB_ERR_INITIALIZATION"
1127 "REGDB_ERR_INVALIDHANDLE"
1128 "REGDB_ERR_INVALIDNAME"
1130 "REGDB_STRING_EXPAND"
1131 "REGDB_STRING_MULTI"
1133 "REGDB_UNINSTALL_NAME"
1177 "Function argument constants used in InstallShield 3 and 5.")
1179 (define-generic-mode 'rul-generic-mode
1180 ;; Using "/*" and "*/" doesn't seem to be working right
1182 installshield-statement-keyword-list
1184 ;; preprocessor constructs
1185 '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"
1186 1 font-lock-string-face)
1187 '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
1188 (1 font-lock-reference-face)
1189 (2 font-lock-variable-name-face nil t))
1190 ;; indirect string constants
1191 '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face)
1193 '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face)
1194 '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"
1195 (1 font-lock-keyword-face)
1196 (2 font-lock-reference-face nil t))
1198 (generic-make-keywords-list
1199 installshield-system-variables-list
1200 'font-lock-variable-name-face "[^_]" "[^_]")
1202 (generic-make-keywords-list
1203 installshield-system-functions-list
1204 'font-lock-function-name-face "[^_]" "[^_]")
1206 (generic-make-keywords-list
1207 installshield-types-list
1208 'font-lock-type-face "[^_]" "[^_]")
1209 ;; function argument constants
1210 (generic-make-keywords-list
1211 installshield-funarg-constants-list
1212 'font-lock-variable-name-face "[^_]" "[^_]") ; is this face the best choice?
1214 (list "\\.[rR][uU][lL]$")
1218 (setq imenu-generic-expression
1219 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))
1221 "Generic mode for InstallShield RUL files.")
1223 (define-skeleton rul-if
1224 "Insert an if statement."
1226 "if(" str ") then" \n
1228 ( "other condition, %s: "
1229 > "elseif(" str ") then" \n
1237 (define-skeleton rul-function
1238 "Insert a function statement."
1240 "function " str " ()" \n
1241 ( "local variables, %s: "
1250 ;; Additions by ACorreir@pervasive-sw.com (Alfred Correira)
1251 (define-generic-mode 'mailrc-generic-mode
1263 '(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
1264 (2 font-lock-reference-face) (3 font-lock-variable-name-face))
1265 ("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$"
1266 (2 font-lock-reference-face) (3 font-lock-variable-name-face)))
1267 (list "\\.mailrc\\'")
1269 "Mode for mailrc files.")
1271 (provide 'generic-x)
1273 ;;; generic-x.el ends here