2005-04-28 09:17:06 +00:00
|
|
|
;;; generic-x.el --- A collection of generic modes
|
1998-03-17 23:49:33 +00:00
|
|
|
|
2006-12-05 07:06:08 +00:00
|
|
|
;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004,
|
2006-02-06 15:23:23 +00:00
|
|
|
;; 2005, 2006 Free Software Foundation, Inc.
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Author: Peter Breton <pbreton@cs.umb.edu>
|
|
|
|
;; Created: Tue Oct 08 1996
|
|
|
|
;; Keywords: generic, comment, font-lock
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
;; GNU Emacs is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
;; any later version.
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
2005-07-04 23:32:44 +00:00
|
|
|
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
;; Boston, MA 02110-1301, USA.
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;
|
2005-04-28 09:17:06 +00:00
|
|
|
;; This file contains a collection generic modes.
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; INSTALLATION:
|
|
|
|
;;
|
|
|
|
;; Add this line to your .emacs file:
|
|
|
|
;;
|
|
|
|
;; (require 'generic-x)
|
|
|
|
;;
|
|
|
|
;; You can decide which modes to load by setting the variable
|
2005-04-28 09:17:06 +00:00
|
|
|
;; `generic-extras-enable-list'. Its default value is platform-
|
|
|
|
;; specific. The recommended way to set this variable is through
|
|
|
|
;; customize:
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
2005-04-28 09:17:06 +00:00
|
|
|
;; M-x customize-option RET generic-extras-enable-list RET
|
|
|
|
;;
|
|
|
|
;; This lets you select generic modes from the list of available
|
|
|
|
;; modes. If you manually set `generic-extras-enable-list' in your
|
|
|
|
;; .emacs, do it BEFORE loading generic-x with (require 'generic-x).
|
|
|
|
;;
|
|
|
|
;; You can also send in new modes; if the file types are reasonably
|
|
|
|
;; common, we would like to install them.
|
1998-03-17 23:49:33 +00:00
|
|
|
;;
|
2005-04-11 08:10:23 +00:00
|
|
|
;; DEFAULT GENERIC MODE:
|
|
|
|
;;
|
|
|
|
;; This file provides a hook which automatically puts a file into
|
|
|
|
;; `default-generic-mode' if the first few lines of a file in
|
|
|
|
;; fundamental mode start with a hash comment character. To disable
|
|
|
|
;; this functionality, set the variable `generic-use-find-file-hook'
|
|
|
|
;; to nil BEFORE loading generic-x. See the variables
|
|
|
|
;; `generic-lines-to-scan' and `generic-find-file-regexp' for
|
|
|
|
;; customization options.
|
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; PROBLEMS WHEN USED WITH FOLDING MODE:
|
|
|
|
;;
|
1999-01-10 18:21:58 +00:00
|
|
|
;; [The following relates to the obsolete selective-display technique.
|
2005-04-28 09:17:06 +00:00
|
|
|
;; Folding mode should use invisible text properties instead. -- Dave
|
1999-01-10 18:21:58 +00:00
|
|
|
;; Love]
|
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; From Anders Lindgren <andersl@csd.uu.se>
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; Problem summary: Wayne Adams has found a problem when using folding
|
2005-04-28 09:17:06 +00:00
|
|
|
;; mode in conjunction with font-lock for a mode defined in
|
1998-03-17 23:49:33 +00:00
|
|
|
;; `generic-x.el'.
|
|
|
|
;;
|
|
|
|
;; The problem, as Wayne described it, was that error messages of the
|
|
|
|
;; following form appeared when both font-lock and folding are used:
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; > - various msgs including "Fontifying region...(error Stack
|
|
|
|
;; > overflow in regexp matcher)" appear
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
2005-04-28 09:17:06 +00:00
|
|
|
;; I have just tracked down the cause of the problem. The regexp's in
|
|
|
|
;; `generic-x.el' do not take into account the way that folding hides
|
|
|
|
;; sections of the buffer. The technique is known as
|
1998-03-17 23:49:33 +00:00
|
|
|
;; `selective-display' and has been available for a very long time (I
|
2005-04-28 09:17:06 +00:00
|
|
|
;; started using it back in the good old Emacs 18 days). Basically, a
|
1998-03-17 23:49:33 +00:00
|
|
|
;; section is hidden by creating one very long line were the newline
|
|
|
|
;; character (C-j) is replaced by a linefeed (C-m) character.
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; Many other hiding packages, besides folding, use the same technique,
|
|
|
|
;; the problem should occur when using them as well.
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
2005-04-28 09:17:06 +00:00
|
|
|
;; The erroneous lines in `generic-x.el' look like the following (this
|
1998-03-17 23:49:33 +00:00
|
|
|
;; example is from the `ini' section):
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
|
|
|
;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)
|
1998-03-17 23:49:33 +00:00
|
|
|
;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face)
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; The intention of these lines is to highlight lines of the following
|
|
|
|
;; form:
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
1998-03-17 23:49:33 +00:00
|
|
|
;; [foo]
|
|
|
|
;; bar = xxx
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
2005-04-28 09:17:06 +00:00
|
|
|
;; However, since the `.' regexp symbol matches the linefeed character
|
|
|
|
;; the entire folded section is searched, resulting in a regexp stack
|
1998-03-17 23:49:33 +00:00
|
|
|
;; overflow.
|
1999-10-16 03:59:43 +00:00
|
|
|
;;
|
2005-04-28 09:17:06 +00:00
|
|
|
;; Solution suggestion: Instead of using ".", use the sequence
|
|
|
|
;; "[^\n\r]". This will make the rules behave just as before, but
|
|
|
|
;; they will work together with selective-display.
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2005-04-28 09:17:06 +00:00
|
|
|
(eval-when-compile (require 'font-lock))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
1998-05-05 19:26:50 +00:00
|
|
|
(defgroup generic-x nil
|
2005-04-11 08:10:23 +00:00
|
|
|
"A collection of generic modes."
|
1998-05-05 19:26:50 +00:00
|
|
|
:prefix "generic-"
|
2005-04-11 08:10:23 +00:00
|
|
|
:group 'data
|
1998-05-17 02:09:05 +00:00
|
|
|
:version "20.3")
|
1998-05-05 19:26:50 +00:00
|
|
|
|
2005-04-11 08:10:23 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Default-Generic mode
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
(defcustom generic-use-find-file-hook t
|
|
|
|
"*If non-nil, add a hook to enter `default-generic-mode' automatically.
|
|
|
|
This is done if the first few lines of a file in fundamental mode
|
|
|
|
start with a hash comment character."
|
|
|
|
:group 'generic-x
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
|
|
(defcustom generic-lines-to-scan 3
|
|
|
|
"*Number of lines that `generic-mode-find-file-hook' looks at.
|
|
|
|
Relevant when deciding whether to enter Default-Generic mode automatically.
|
|
|
|
This variable should be set to a small positive number."
|
|
|
|
:group 'generic-x
|
|
|
|
:type 'integer)
|
|
|
|
|
|
|
|
(defcustom generic-find-file-regexp "^#"
|
|
|
|
"*Regular expression used by `generic-mode-find-file-hook'.
|
|
|
|
Files in fundamental mode whose first few lines contain a match
|
|
|
|
for this regexp, should be put into Default-Generic mode instead.
|
|
|
|
The number of lines tested for the matches is specified by the
|
|
|
|
value of the variable `generic-lines-to-scan', which see."
|
|
|
|
:group 'generic-x
|
|
|
|
:type 'regexp)
|
|
|
|
|
|
|
|
(defcustom generic-ignore-files-regexp "[Tt][Aa][Gg][Ss]\\'"
|
|
|
|
"*Regular expression used by `generic-mode-find-file-hook'.
|
|
|
|
Files whose names match this regular expression should not be put
|
|
|
|
into Default-Generic mode, even if they have lines which match
|
|
|
|
the regexp in `generic-find-file-regexp'. If the value is nil,
|
|
|
|
`generic-mode-find-file-hook' does not check the file names."
|
|
|
|
:group 'generic-x
|
|
|
|
:type '(choice (const :tag "Don't check file names" nil) regexp))
|
|
|
|
|
|
|
|
;; This generic mode is always defined
|
2005-05-12 13:19:29 +00:00
|
|
|
(define-generic-mode default-generic-mode (list ?#) nil nil nil nil)
|
2005-04-11 08:10:23 +00:00
|
|
|
|
|
|
|
;; A more general solution would allow us to enter generic-mode for
|
|
|
|
;; *any* comment character, but would require us to synthesize a new
|
|
|
|
;; generic-mode on the fly. I think this gives us most of what we
|
|
|
|
;; want.
|
|
|
|
(defun generic-mode-find-file-hook ()
|
|
|
|
"Hook function to enter Default-Generic mode automatically.
|
|
|
|
|
|
|
|
Done if the first few lines of a file in Fundamental mode start
|
|
|
|
with a match for the regexp in `generic-find-file-regexp', unless
|
|
|
|
the file's name matches the regexp which is the value of the
|
|
|
|
variable `generic-ignore-files-regexp'.
|
|
|
|
|
|
|
|
This hook will be installed if the variable
|
|
|
|
`generic-use-find-file-hook' is non-nil. The variable
|
|
|
|
`generic-lines-to-scan' determines the number of lines to look at."
|
|
|
|
(when (and (eq major-mode 'fundamental-mode)
|
|
|
|
(or (null generic-ignore-files-regexp)
|
|
|
|
(not (string-match
|
|
|
|
generic-ignore-files-regexp
|
|
|
|
(file-name-sans-versions buffer-file-name)))))
|
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(when (re-search-forward generic-find-file-regexp
|
|
|
|
(save-excursion
|
|
|
|
(forward-line generic-lines-to-scan)
|
|
|
|
(point)) t)
|
|
|
|
(goto-char (point-min))
|
|
|
|
(default-generic-mode)))))
|
|
|
|
|
|
|
|
(and generic-use-find-file-hook
|
|
|
|
(add-hook 'find-file-hook 'generic-mode-find-file-hook))
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Other Generic modes
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2005-04-28 09:17:06 +00:00
|
|
|
;; If you add a generic mode to this file, put it in one of these four
|
|
|
|
;; lists as well.
|
|
|
|
|
|
|
|
(defconst generic-default-modes
|
|
|
|
'(apache-conf-generic-mode
|
|
|
|
apache-log-generic-mode
|
|
|
|
hosts-generic-mode
|
|
|
|
java-manifest-generic-mode
|
|
|
|
java-properties-generic-mode
|
|
|
|
javascript-generic-mode
|
|
|
|
show-tabs-generic-mode
|
|
|
|
vrml-generic-mode)
|
|
|
|
"List of generic modes that are defined by default.")
|
|
|
|
|
|
|
|
(defconst generic-mswindows-modes
|
|
|
|
'(bat-generic-mode
|
|
|
|
inf-generic-mode
|
|
|
|
ini-generic-mode
|
|
|
|
rc-generic-mode
|
|
|
|
reg-generic-mode
|
|
|
|
rul-generic-mode)
|
|
|
|
"List of generic modes that are defined by default on MS-Windows.")
|
|
|
|
|
|
|
|
(defconst generic-unix-modes
|
|
|
|
'(alias-generic-mode
|
|
|
|
etc-fstab-generic-mode
|
|
|
|
etc-modules-conf-generic-mode
|
|
|
|
etc-passwd-generic-mode
|
|
|
|
etc-services-generic-mode
|
|
|
|
fvwm-generic-mode
|
|
|
|
inetd-conf-generic-mode
|
|
|
|
mailagent-rules-generic-mode
|
|
|
|
mailrc-generic-mode
|
|
|
|
named-boot-generic-mode
|
|
|
|
named-database-generic-mode
|
|
|
|
prototype-generic-mode
|
|
|
|
resolve-conf-generic-mode
|
|
|
|
samba-generic-mode
|
|
|
|
x-resource-generic-mode)
|
|
|
|
"List of generic modes that are defined by default on Unix.")
|
|
|
|
|
|
|
|
(defconst generic-other-modes
|
|
|
|
'(astap-generic-mode
|
|
|
|
ibis-generic-mode
|
|
|
|
pkginfo-generic-mode
|
|
|
|
spice-generic-mode)
|
|
|
|
"List of generic mode that are not defined by default.")
|
1998-03-17 23:49:33 +00:00
|
|
|
|
1999-10-16 03:59:43 +00:00
|
|
|
(defcustom generic-define-mswindows-modes
|
2005-03-21 17:10:57 +00:00
|
|
|
(memq system-type '(windows-nt ms-dos))
|
2005-04-28 09:17:06 +00:00
|
|
|
"*Non-nil means the modes in `generic-mswindows-modes' will be defined.
|
|
|
|
This is a list of MS-Windows specific generic modes. This variable
|
|
|
|
only effects the default value of `generic-extras-enable-list'."
|
1998-03-17 23:49:33 +00:00
|
|
|
:group 'generic-x
|
2005-04-28 09:17:06 +00:00
|
|
|
:type 'boolean
|
|
|
|
:version "22.1")
|
|
|
|
(make-obsolete-variable 'generic-define-mswindows-modes 'generic-extras-enable-list "22.1")
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
(defcustom generic-define-unix-modes
|
2005-03-21 17:10:57 +00:00
|
|
|
(not (memq system-type '(windows-nt ms-dos)))
|
2005-04-28 09:17:06 +00:00
|
|
|
"*Non-nil means the modes in `generic-unix-modes' will be defined.
|
|
|
|
This is a list of Unix specific generic modes. This variable only
|
|
|
|
effects the default value of `generic-extras-enable-list'."
|
1998-03-17 23:49:33 +00:00
|
|
|
:group 'generic-x
|
2005-04-28 09:17:06 +00:00
|
|
|
:type 'boolean
|
|
|
|
:version "22.1")
|
|
|
|
(make-obsolete-variable 'generic-define-unix-modes 'generic-extras-enable-list "22.1")
|
|
|
|
|
|
|
|
(defcustom generic-extras-enable-list
|
|
|
|
(append generic-default-modes
|
|
|
|
(if generic-define-mswindows-modes generic-mswindows-modes)
|
|
|
|
(if generic-define-unix-modes generic-unix-modes)
|
|
|
|
nil)
|
|
|
|
"List of generic modes to define.
|
|
|
|
Each entry in the list should be a symbol. If you set this variable
|
|
|
|
directly, without using customize, you must reload generic-x to put
|
|
|
|
your changes into effect."
|
|
|
|
:group 'generic-x
|
|
|
|
:type (let (list)
|
|
|
|
(dolist (mode
|
|
|
|
(sort (append generic-default-modes
|
|
|
|
generic-mswindows-modes
|
|
|
|
generic-unix-modes
|
|
|
|
generic-other-modes
|
|
|
|
nil)
|
|
|
|
(lambda (a b)
|
|
|
|
(string< (symbol-name b)
|
|
|
|
(symbol-name a))))
|
|
|
|
(cons 'set list))
|
|
|
|
(push `(const ,mode) list)))
|
|
|
|
:set (lambda (s v)
|
|
|
|
(set-default s v)
|
|
|
|
(unless load-in-progress
|
|
|
|
(load "generic-x")))
|
|
|
|
:version "22.1")
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Apache
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'apache-conf-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode apache-conf-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("^\\s-*\\(<.*>\\)" 1 font-lock-constant-face)
|
|
|
|
("^\\s-*\\(\\sw+\\)\\s-" 1 font-lock-variable-name-face))
|
|
|
|
'("srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
|
|
|
'((nil "^\\([-A-Za-z0-9_]+\\)" 1)
|
|
|
|
("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1)
|
2005-03-21 17:10:57 +00:00
|
|
|
("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for Apache or HTTPD configuration files."))
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'apache-log-generic-mode generic-extras-enable-list)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode apache-log-generic-mode
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
|
|
|
nil
|
|
|
|
;; Hostname ? user date request return-code number-of-bytes
|
|
|
|
'(("^\\([-a-zA-z0-9.]+\\) - [-A-Za-z]+ \\(\\[.*\\]\\)"
|
|
|
|
(1 font-lock-constant-face)
|
2005-03-21 17:10:57 +00:00
|
|
|
(2 font-lock-variable-name-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("access_log\\'")
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for Apache log files"))
|
1999-10-16 03:59:43 +00:00
|
|
|
|
1998-03-17 23:49:33 +00:00
|
|
|
;;; Samba
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'samba-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode samba-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?\; ?#)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face)
|
2005-03-21 17:10:57 +00:00
|
|
|
("^\\s-*\\(.+\\)=\\([^\r\n]*\\)"
|
2005-03-23 10:48:20 +00:00
|
|
|
(1 font-lock-variable-name-face)
|
|
|
|
(2 font-lock-type-face)))
|
|
|
|
'("smb\\.conf\\'")
|
|
|
|
'(generic-bracket-support)
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for Samba configuration files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Fvwm
|
|
|
|
;; This is pretty basic. Also, modes for other window managers could
|
|
|
|
;; be defined as well.
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'fvwm-generic-mode generic-extras-enable-list)
|
1998-03-17 23:49:33 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode fvwm-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("AddToMenu"
|
|
|
|
"AddToFunc"
|
|
|
|
"ButtonStyle"
|
|
|
|
"EndFunction"
|
|
|
|
"EndPopup"
|
|
|
|
"Function"
|
|
|
|
"IconPath"
|
|
|
|
"Key"
|
|
|
|
"ModulePath"
|
|
|
|
"Mouse"
|
|
|
|
"PixmapPath"
|
|
|
|
"Popup"
|
|
|
|
"Style")
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'("\\.fvwmrc\\'" "\\.fvwm2rc\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for FVWM configuration files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; X Resource
|
|
|
|
;; I'm pretty sure I've seen an actual mode to do this, but I don't
|
|
|
|
;; think it's standard with Emacs
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'x-resource-generic-mode generic-extras-enable-list)
|
1998-03-17 23:49:33 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode x-resource-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?!)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("^\\([^:\n]+:\\)" 1 font-lock-variable-name-face))
|
|
|
|
'("\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for X Resource configuration files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Hosts
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'hosts-generic-mode generic-extras-enable-list)
|
1998-03-17 23:49:33 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode hosts-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("localhost")
|
|
|
|
'(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face))
|
|
|
|
'("[hH][oO][sS][tT][sS]\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for HOSTS files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Windows INF files
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'inf-generic-mode generic-extras-enable-list)
|
1998-03-17 23:49:33 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode inf-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?\;)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face))
|
|
|
|
'("\\.[iI][nN][fF]\\'")
|
|
|
|
'(generic-bracket-support)
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for MS-Windows INF files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Windows INI files
|
|
|
|
;; Should define escape character as well!
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'ini-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode ini-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?\;)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face)
|
2005-03-21 17:10:57 +00:00
|
|
|
("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$"
|
|
|
|
(1 font-lock-function-name-face)
|
|
|
|
(2 font-lock-variable-name-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("\\.[iI][nN][iI]\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
|
|
|
(setq imenu-generic-expression
|
|
|
|
'((nil "^\\[\\(.*\\)\\]" 1)
|
|
|
|
("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
|
2005-04-13 09:24:57 +00:00
|
|
|
"Generic mode for MS-Windows INI files.
|
|
|
|
You can use `ini-generic-mode-find-file-hook' to enter this mode
|
2005-05-12 13:19:29 +00:00
|
|
|
automatically for INI files whose names do not end in \".ini\".")
|
2005-04-13 09:24:57 +00:00
|
|
|
|
|
|
|
(defun ini-generic-mode-find-file-hook ()
|
|
|
|
"Hook function to enter Ini-Generic mode automatically for INI files.
|
|
|
|
Done if the first few lines of a file in Fundamental mode look
|
|
|
|
like an INI file. You can add this hook to `find-file-hook'."
|
|
|
|
(and (eq major-mode 'fundamental-mode)
|
|
|
|
(save-excursion
|
|
|
|
(goto-char (point-min))
|
|
|
|
(and (looking-at "^\\s-*\\[.*\\]")
|
|
|
|
(ini-generic-mode)))))
|
|
|
|
(defalias 'generic-mode-ini-file-find-file-hook 'ini-generic-mode-find-file-hook))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Windows REG files
|
|
|
|
;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'reg-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode reg-generic-mode
|
|
|
|
'(?\;)
|
|
|
|
'("key" "classes_root" "REGEDIT" "REGEDIT4")
|
2006-03-03 12:18:47 +00:00
|
|
|
'(("\\(\\[.*\\]\\)" 1 font-lock-constant-face)
|
2005-03-23 10:48:20 +00:00
|
|
|
("^\\([^\n\r]*\\)\\s-*=" 1 font-lock-variable-name-face))
|
2005-03-21 17:10:57 +00:00
|
|
|
'("\\.[rR][eE][gG]\\'")
|
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
|
|
|
(setq imenu-generic-expression
|
|
|
|
'((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for MS-Windows Registry files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
1998-10-06 12:19:11 +00:00
|
|
|
;;; DOS/Windows BAT files
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'bat-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode bat-generic-mode
|
|
|
|
nil
|
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
(eval-when-compile
|
1998-03-17 23:49:33 +00:00
|
|
|
(list
|
2005-03-23 10:48:20 +00:00
|
|
|
;; Make this one first in the list, otherwise comments will
|
|
|
|
;; be over-written by other variables
|
|
|
|
'("^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 font-lock-comment-face t)
|
|
|
|
'("^[ \t]*\\(::.*\\)" 1 font-lock-comment-face t)
|
|
|
|
'("^[@ \t]*\\([bB][rR][eE][aA][kK]\\|[vV][eE][rR][iI][fF][yY]\\)[ \t]+\\([oO]\\([nN]\\|[fF][fF]\\)\\)"
|
|
|
|
(1 font-lock-builtin-face)
|
|
|
|
(2 font-lock-constant-face t t))
|
|
|
|
;; Any text (except ON/OFF) following ECHO is a string.
|
|
|
|
'("^[@ \t]*\\([eE][cC][hH][oO]\\)[ \t]+\\(\\([oO]\\([nN]\\|[fF][fF]\\)\\)\\|\\([^>|\r\n]+\\)\\)"
|
|
|
|
(1 font-lock-builtin-face)
|
|
|
|
(3 font-lock-constant-face t t)
|
|
|
|
(5 font-lock-string-face t t))
|
|
|
|
;; These keywords appear as the first word on a line. (Actually, they
|
|
|
|
;; can also appear after "if ..." or "for ..." clause, but since they
|
|
|
|
;; are frequently used in simple text, we punt.)
|
|
|
|
;; In `generic-bat-mode-setup-function' we make the keywords
|
|
|
|
;; case-insensitive
|
|
|
|
(generic-make-keywords-list
|
|
|
|
'("for"
|
|
|
|
"if")
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-keyword-face "^[@ \t]*")
|
2005-03-23 10:48:20 +00:00
|
|
|
;; These keywords can be anywhere on a line
|
|
|
|
;; In `generic-bat-mode-setup-function' we make the keywords
|
|
|
|
;; case-insensitive
|
|
|
|
(generic-make-keywords-list
|
|
|
|
'("do"
|
|
|
|
"exist"
|
|
|
|
"errorlevel"
|
|
|
|
"goto"
|
|
|
|
"not")
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-keyword-face)
|
2005-03-23 10:48:20 +00:00
|
|
|
;; These are built-in commands. Only frequently-used ones are listed.
|
|
|
|
(generic-make-keywords-list
|
|
|
|
'("CALL" "call" "Call"
|
|
|
|
"CD" "cd" "Cd"
|
|
|
|
"CLS" "cls" "Cls"
|
|
|
|
"COPY" "copy" "Copy"
|
|
|
|
"DEL" "del" "Del"
|
|
|
|
"ECHO" "echo" "Echo"
|
|
|
|
"MD" "md" "Md"
|
|
|
|
"PATH" "path" "Path"
|
|
|
|
"PAUSE" "pause" "Pause"
|
2005-05-17 15:55:16 +00:00
|
|
|
"PROMPT" "prompt" "Prompt"
|
2005-03-23 10:48:20 +00:00
|
|
|
"RD" "rd" "Rd"
|
|
|
|
"REN" "ren" "Ren"
|
|
|
|
"SET" "set" "Set"
|
|
|
|
"START" "start" "Start"
|
|
|
|
"SHIFT" "shift" "Shift")
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-builtin-face "[ \t|\n]")
|
2005-03-23 10:48:20 +00:00
|
|
|
'("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t)
|
|
|
|
'("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t)
|
|
|
|
'("\\(%[0-9]\\)" 1 font-lock-variable-name-face t)
|
|
|
|
'("\\(/[^/ \"\t\n]+\\)" 1 font-lock-type-face)
|
|
|
|
'("[\t ]+\\([+-][^\t\n\" ]+\\)" 1 font-lock-type-face)
|
|
|
|
'("[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
|
|
|
|
(1 font-lock-keyword-face)
|
|
|
|
(2 font-lock-function-name-face nil t))
|
|
|
|
'("[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?"
|
|
|
|
(1 font-lock-builtin-face)
|
|
|
|
(2 font-lock-variable-name-face t t))))
|
|
|
|
'("\\.[bB][aA][tT]\\'"
|
2006-06-23 12:41:15 +00:00
|
|
|
"\\.[cC][mM][dD]\\'"
|
2005-03-23 10:48:20 +00:00
|
|
|
"\\`[cC][oO][nN][fF][iI][gG]\\."
|
|
|
|
"\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.")
|
|
|
|
'(generic-bat-mode-setup-function)
|
2006-06-23 12:41:15 +00:00
|
|
|
"Generic mode for MS-Windows batch files.")
|
2005-03-21 17:10:57 +00:00
|
|
|
|
|
|
|
(defvar bat-generic-mode-syntax-table nil
|
2005-04-28 09:17:06 +00:00
|
|
|
"Syntax table in use in `bat-generic-mode' buffers.")
|
2005-03-21 17:10:57 +00:00
|
|
|
|
|
|
|
(defvar bat-generic-mode-keymap (make-sparse-keymap)
|
|
|
|
"Keymap for bet-generic-mode.")
|
|
|
|
|
|
|
|
(defun bat-generic-mode-compile ()
|
|
|
|
"Run the current BAT file in a compilation buffer."
|
|
|
|
(interactive)
|
|
|
|
(let ((compilation-buffer-name-function
|
|
|
|
(function
|
|
|
|
(lambda(ign)
|
|
|
|
(concat "*" (buffer-file-name) "*")))))
|
|
|
|
(compile
|
|
|
|
(concat (w32-shell-name) " -c " (buffer-file-name)))))
|
|
|
|
|
2005-04-13 09:24:57 +00:00
|
|
|
(eval-when-compile (require 'comint))
|
2005-03-21 17:10:57 +00:00
|
|
|
(defun bat-generic-mode-run-as-comint ()
|
|
|
|
"Run the current BAT file in a comint buffer."
|
|
|
|
(interactive)
|
|
|
|
(require 'comint)
|
|
|
|
(let* ((file (buffer-file-name))
|
|
|
|
(buf-name (concat "*" file "*")))
|
|
|
|
(save-excursion
|
|
|
|
(set-buffer
|
|
|
|
(get-buffer-create buf-name))
|
|
|
|
(erase-buffer)
|
|
|
|
(comint-mode)
|
|
|
|
(comint-exec
|
|
|
|
buf-name
|
|
|
|
file
|
|
|
|
(w32-shell-name)
|
|
|
|
nil
|
|
|
|
(list "-c" file))
|
|
|
|
(display-buffer buf-name))))
|
|
|
|
|
|
|
|
(define-key bat-generic-mode-keymap "\C-c\C-c" 'bat-generic-mode-compile)
|
|
|
|
|
|
|
|
;; Make underscores count as words
|
|
|
|
(unless bat-generic-mode-syntax-table
|
|
|
|
(setq bat-generic-mode-syntax-table (make-syntax-table))
|
2005-03-24 09:15:21 +00:00
|
|
|
(modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
|
2005-03-21 17:10:57 +00:00
|
|
|
|
2005-03-24 09:15:21 +00:00
|
|
|
;; bat-generic-mode doesn't use the comment functionality of
|
|
|
|
;; define-generic-mode because it has a three-letter comment-string,
|
|
|
|
;; so we do it here manually instead
|
2005-03-21 17:10:57 +00:00
|
|
|
(defun generic-bat-mode-setup-function ()
|
2005-03-23 10:48:20 +00:00
|
|
|
(make-local-variable 'parse-sexp-ignore-comments)
|
|
|
|
(make-local-variable 'comment-start)
|
|
|
|
(make-local-variable 'comment-start-skip)
|
|
|
|
(make-local-variable 'comment-end)
|
|
|
|
(setq imenu-generic-expression '((nil "^:\\(\\sw+\\)" 1))
|
2005-03-21 17:10:57 +00:00
|
|
|
parse-sexp-ignore-comments t
|
2005-03-23 10:48:20 +00:00
|
|
|
comment-end ""
|
|
|
|
comment-start "REM "
|
|
|
|
comment-start-skip "[Rr][Ee][Mm] *")
|
|
|
|
(set-syntax-table bat-generic-mode-syntax-table)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; Make keywords case-insensitive
|
2005-03-24 09:15:21 +00:00
|
|
|
(setq font-lock-defaults '(generic-font-lock-keywords nil t))
|
2005-03-21 17:10:57 +00:00
|
|
|
(use-local-map bat-generic-mode-keymap)))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Mailagent
|
2005-03-23 10:48:20 +00:00
|
|
|
;; Mailagent is a Unix mail filtering program. Anyone wanna do a
|
|
|
|
;; generic mode for procmail?
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode mailagent-rules-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
|
|
|
|
'(("^\\(\\sw+\\)\\s-*=" 1 font-lock-variable-name-face)
|
|
|
|
("\\s-/\\([^/]+\\)/[i, \t\n]" 1 font-lock-constant-face))
|
|
|
|
'("\\.rules\\'")
|
2005-03-24 09:15:21 +00:00
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
|
|
|
(setq imenu-generic-expression
|
|
|
|
'((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for Mailagent rules files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Solaris/Sys V prototype files
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'prototype-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode prototype-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
|
|
|
'(("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$"
|
|
|
|
(2 font-lock-constant-face)
|
|
|
|
(3 font-lock-keyword-face))
|
|
|
|
("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
|
|
|
|
(1 font-lock-constant-face)
|
|
|
|
(2 font-lock-keyword-face)
|
|
|
|
(3 font-lock-variable-name-face))
|
|
|
|
("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$"
|
|
|
|
(1 font-lock-keyword-face)
|
|
|
|
(3 font-lock-variable-name-face))
|
|
|
|
("^\\(!\\s-*\\sw+\\)=\\([^\n\r]*\\)$"
|
|
|
|
(1 font-lock-keyword-face)
|
|
|
|
(2 font-lock-variable-name-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("prototype\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for Sys V prototype files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Solaris/Sys V pkginfo files
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'pkginfo-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode pkginfo-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
|
|
|
'(("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
|
|
|
|
(1 font-lock-keyword-face)
|
|
|
|
(2 font-lock-variable-name-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("pkginfo\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for Sys V pkginfo files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Javascript mode
|
1999-10-16 03:59:43 +00:00
|
|
|
;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU]
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'javascript-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode javascript-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'("//" ("/*" . "*/"))
|
|
|
|
'("break"
|
|
|
|
"case"
|
|
|
|
"continue"
|
|
|
|
"default"
|
|
|
|
"delete"
|
|
|
|
"do"
|
|
|
|
"else"
|
|
|
|
"export"
|
|
|
|
"for"
|
|
|
|
"function"
|
|
|
|
"if"
|
|
|
|
"import"
|
|
|
|
"in"
|
|
|
|
"new"
|
|
|
|
"return"
|
|
|
|
"switch"
|
|
|
|
"this"
|
|
|
|
"typeof"
|
|
|
|
"var"
|
|
|
|
"void"
|
|
|
|
"while"
|
|
|
|
"with"
|
|
|
|
;; words reserved for ECMA extensions below
|
|
|
|
"catch"
|
|
|
|
"class"
|
|
|
|
"const"
|
|
|
|
"debugger"
|
|
|
|
"enum"
|
|
|
|
"extends"
|
|
|
|
"finally"
|
|
|
|
"super"
|
|
|
|
"throw"
|
|
|
|
"try"
|
|
|
|
;; Java Keywords reserved by JavaScript
|
|
|
|
"abstract"
|
|
|
|
"boolean"
|
|
|
|
"byte"
|
|
|
|
"char"
|
|
|
|
"double"
|
|
|
|
"false"
|
|
|
|
"final"
|
|
|
|
"float"
|
|
|
|
"goto"
|
|
|
|
"implements"
|
|
|
|
"instanceof"
|
|
|
|
"int"
|
|
|
|
"interface"
|
|
|
|
"long"
|
|
|
|
"native"
|
|
|
|
"null"
|
|
|
|
"package"
|
|
|
|
"private"
|
|
|
|
"protected"
|
|
|
|
"public"
|
|
|
|
"short"
|
|
|
|
"static"
|
|
|
|
"synchronized"
|
|
|
|
"throws"
|
|
|
|
"transient"
|
|
|
|
"true")
|
|
|
|
'(("^\\s-*function\\s-+\\([A-Za-z0-9_]+\\)"
|
|
|
|
(1 font-lock-function-name-face))
|
|
|
|
("^\\s-*var\\s-+\\([A-Za-z0-9_]+\\)"
|
|
|
|
(1 font-lock-variable-name-face)))
|
|
|
|
'("\\.js\\'")
|
1998-03-17 23:49:33 +00:00
|
|
|
(list
|
1999-10-16 03:59:43 +00:00
|
|
|
(function
|
1998-03-17 23:49:33 +00:00
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
|
|
|
'((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)
|
2005-03-21 17:10:57 +00:00
|
|
|
("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for JavaScript files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; VRML files
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'vrml-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode vrml-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("DEF"
|
|
|
|
"NULL"
|
|
|
|
"USE"
|
|
|
|
"Viewpoint"
|
|
|
|
"ambientIntensity"
|
|
|
|
"appearance"
|
|
|
|
"children"
|
|
|
|
"color"
|
|
|
|
"coord"
|
|
|
|
"coordIndex"
|
|
|
|
"creaseAngle"
|
|
|
|
"diffuseColor"
|
|
|
|
"emissiveColor"
|
|
|
|
"fieldOfView"
|
|
|
|
"geometry"
|
|
|
|
"info"
|
|
|
|
"material"
|
|
|
|
"normal"
|
|
|
|
"orientation"
|
|
|
|
"position"
|
|
|
|
"shininess"
|
|
|
|
"specularColor"
|
|
|
|
"texCoord"
|
|
|
|
"texture"
|
|
|
|
"textureTransform"
|
|
|
|
"title"
|
|
|
|
"transparency"
|
|
|
|
"type")
|
|
|
|
'(("USE\\s-+\\([-A-Za-z0-9_]+\\)"
|
|
|
|
(1 font-lock-constant-face))
|
|
|
|
("DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
|
|
|
|
(1 font-lock-type-face)
|
|
|
|
(2 font-lock-constant-face))
|
|
|
|
("^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{"
|
|
|
|
(1 font-lock-function-name-face))
|
|
|
|
("^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
|
|
|
|
(2 font-lock-variable-name-face)))
|
|
|
|
'("\\.wrl\\'")
|
1998-03-17 23:49:33 +00:00
|
|
|
(list
|
1999-10-16 03:59:43 +00:00
|
|
|
(function
|
1998-03-17 23:49:33 +00:00
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
1998-03-17 23:49:33 +00:00
|
|
|
'((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
|
1999-10-16 03:59:43 +00:00
|
|
|
("*Definitions*"
|
1998-03-17 23:49:33 +00:00
|
|
|
"DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
|
2005-03-21 17:10:57 +00:00
|
|
|
1))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic Mode for VRML files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Java Manifests
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'java-manifest-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode java-manifest-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("Name"
|
|
|
|
"Digest-Algorithms"
|
|
|
|
"Manifest-Version"
|
|
|
|
"Required-Version"
|
|
|
|
"Signature-Version"
|
|
|
|
"Magic"
|
|
|
|
"Java-Bean"
|
|
|
|
"Depends-On")
|
1998-03-17 23:49:33 +00:00
|
|
|
'(("^Name:\\s-+\\([^\n\r]*\\)$"
|
|
|
|
(1 font-lock-variable-name-face))
|
|
|
|
("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
|
2005-03-21 17:10:57 +00:00
|
|
|
(2 font-lock-constant-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
|
1998-03-17 23:49:33 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for Java Manifest files"))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Java properties files
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'java-properties-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode java-properties-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?! ?#)
|
1998-03-17 23:49:33 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
(eval-when-compile
|
|
|
|
(let ((java-properties-key
|
|
|
|
"\\(\\([-A-Za-z0-9_\\./]\\|\\(\\\\[ =:]\\)\\)+\\)")
|
|
|
|
(java-properties-value
|
|
|
|
"\\([^\r\n]*\\)"))
|
|
|
|
;; Property and value can be separated in a number of different ways:
|
|
|
|
;; * whitespace
|
|
|
|
;; * an equal sign
|
|
|
|
;; * a colon
|
|
|
|
(mapcar
|
|
|
|
(function
|
|
|
|
(lambda (elt)
|
|
|
|
(list
|
|
|
|
(concat "^" java-properties-key elt java-properties-value "$")
|
|
|
|
'(1 font-lock-constant-face)
|
|
|
|
'(4 font-lock-variable-name-face))))
|
|
|
|
;; These are the separators
|
|
|
|
'(":\\s-*" "\\s-+" "\\s-*=\\s-*"))))
|
1998-03-17 23:49:33 +00:00
|
|
|
nil
|
1999-09-08 07:32:49 +00:00
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
2005-03-21 17:10:57 +00:00
|
|
|
'((nil "^\\([^#! \t\n\r=:]+\\)" 1))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for Java properties files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; C shell alias definitions
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'alias-generic-mode generic-extras-enable-list)
|
1998-05-05 19:26:50 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode alias-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("alias" "unalias")
|
1998-03-17 23:49:33 +00:00
|
|
|
'(("^alias\\s-+\\([-A-Za-z0-9_]+\\)\\s-+"
|
|
|
|
(1 font-lock-variable-name-face))
|
|
|
|
("^unalias\\s-+\\([-A-Za-z0-9_]+\\)\\s-*$"
|
2005-03-21 17:10:57 +00:00
|
|
|
(1 font-lock-variable-name-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("alias\\'")
|
1998-03-17 23:49:33 +00:00
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
2005-03-21 17:10:57 +00:00
|
|
|
'((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for C Shell alias files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;;; Windows RC files
|
|
|
|
;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'rc-generic-mode generic-extras-enable-list)
|
|
|
|
|
|
|
|
(define-generic-mode rc-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
;; '(?\/)
|
|
|
|
'("//")
|
2005-03-21 17:10:57 +00:00
|
|
|
'("ACCELERATORS"
|
|
|
|
"AUTO3STATE"
|
|
|
|
"AUTOCHECKBOX"
|
|
|
|
"AUTORADIOBUTTON"
|
|
|
|
"BITMAP"
|
|
|
|
"BOTTOMMARGIN"
|
|
|
|
"BUTTON"
|
|
|
|
"CAPTION"
|
|
|
|
"CHARACTERISTICS"
|
|
|
|
"CHECKBOX"
|
|
|
|
"CLASS"
|
|
|
|
"COMBOBOX"
|
|
|
|
"CONTROL"
|
|
|
|
"CTEXT"
|
|
|
|
"CURSOR"
|
|
|
|
"DEFPUSHBUTTON"
|
|
|
|
"DESIGNINFO"
|
|
|
|
"DIALOG"
|
|
|
|
"DISCARDABLE"
|
|
|
|
"EDITTEXT"
|
|
|
|
"EXSTYLE"
|
|
|
|
"FONT"
|
|
|
|
"GROUPBOX"
|
|
|
|
"GUIDELINES"
|
|
|
|
"ICON"
|
|
|
|
"LANGUAGE"
|
|
|
|
"LEFTMARGIN"
|
|
|
|
"LISTBOX"
|
|
|
|
"LTEXT"
|
|
|
|
"MENUITEM SEPARATOR"
|
|
|
|
"MENUITEM"
|
|
|
|
"MENU"
|
|
|
|
"MOVEABLE"
|
|
|
|
"POPUP"
|
|
|
|
"PRELOAD"
|
|
|
|
"PURE"
|
|
|
|
"PUSHBOX"
|
|
|
|
"PUSHBUTTON"
|
|
|
|
"RADIOBUTTON"
|
|
|
|
"RCDATA"
|
|
|
|
"RIGHTMARGIN"
|
|
|
|
"RTEXT"
|
|
|
|
"SCROLLBAR"
|
|
|
|
"SEPARATOR"
|
|
|
|
"STATE3"
|
|
|
|
"STRINGTABLE"
|
|
|
|
"STYLE"
|
|
|
|
"TEXTINCLUDE"
|
|
|
|
"TOOLBAR"
|
|
|
|
"TOPMARGIN"
|
|
|
|
"VERSIONINFO"
|
|
|
|
"VERSION")
|
|
|
|
;; the choice of what tokens go where is somewhat arbitrary,
|
|
|
|
;; as is the choice of which value tokens are included, as
|
|
|
|
;; the choice of face for each token group
|
2005-03-23 10:48:20 +00:00
|
|
|
(eval-when-compile
|
|
|
|
(list
|
2005-03-21 17:10:57 +00:00
|
|
|
(generic-make-keywords-list
|
2005-03-23 10:48:20 +00:00
|
|
|
'("FILEFLAGSMASK"
|
|
|
|
"FILEFLAGS"
|
|
|
|
"FILEOS"
|
|
|
|
"FILESUBTYPE"
|
|
|
|
"FILETYPE"
|
|
|
|
"FILEVERSION"
|
|
|
|
"PRODUCTVERSION")
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-type-face)
|
2005-03-21 17:10:57 +00:00
|
|
|
(generic-make-keywords-list
|
2005-03-23 10:48:20 +00:00
|
|
|
'("BEGIN"
|
|
|
|
"BLOCK"
|
|
|
|
"END"
|
|
|
|
"VALUE")
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-function-name-face)
|
2005-03-23 10:48:20 +00:00
|
|
|
'("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
|
|
|
|
'("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
|
|
|
|
'("^#[ \t]*\\(elif\\|if\\)\\>"
|
|
|
|
("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
|
|
|
|
(1 font-lock-constant-face)
|
|
|
|
(2 font-lock-variable-name-face nil t)))
|
|
|
|
'("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
|
|
|
|
(1 font-lock-constant-face)
|
|
|
|
(2 font-lock-variable-name-face nil t))))
|
2005-04-11 23:34:04 +00:00
|
|
|
'("\\.[rR][cC]\\'")
|
2005-03-23 10:48:20 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for MS-Windows Resource files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
1998-05-05 19:26:50 +00:00
|
|
|
;; InstallShield RUL files
|
1998-03-17 23:49:33 +00:00
|
|
|
;; Contributed by Alfred.Correira@Pervasive.Com
|
2003-03-22 13:00:38 +00:00
|
|
|
;; Bugfixes by "Rolf Sandau" <Rolf.Sandau@marconi.com>
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'rul-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-23 10:48:20 +00:00
|
|
|
(eval-when-compile
|
|
|
|
|
1998-05-05 19:26:50 +00:00
|
|
|
;;; build the regexp strings using regexp-opt
|
2005-03-23 10:48:20 +00:00
|
|
|
(defconst installshield-statement-keyword-list
|
|
|
|
'("abort"
|
|
|
|
"begin"
|
|
|
|
"call"
|
|
|
|
"case"
|
|
|
|
"declare"
|
|
|
|
"default"
|
|
|
|
"downto"
|
|
|
|
"elseif"
|
|
|
|
"else"
|
|
|
|
"endfor"
|
|
|
|
"endif"
|
|
|
|
"endswitch"
|
|
|
|
"endwhile"
|
|
|
|
"end"
|
|
|
|
"exit"
|
|
|
|
"external"
|
|
|
|
"for"
|
|
|
|
"function"
|
|
|
|
;; "goto" -- handled elsewhere
|
|
|
|
"if"
|
|
|
|
"program"
|
|
|
|
"prototype"
|
|
|
|
"repeat"
|
|
|
|
"return"
|
|
|
|
"step"
|
|
|
|
"switch"
|
|
|
|
"then"
|
|
|
|
"to"
|
|
|
|
"typedef"
|
|
|
|
"until"
|
|
|
|
"void"
|
|
|
|
"while")
|
1998-05-05 19:26:50 +00:00
|
|
|
"Statement keywords used in InstallShield 3 and 5.")
|
|
|
|
|
2005-03-23 10:48:20 +00:00
|
|
|
(defconst installshield-system-functions-list
|
|
|
|
'("AddFolderIcon"
|
|
|
|
"AddProfString"
|
|
|
|
"AddressString"
|
|
|
|
"AppCommand"
|
|
|
|
"AskDestPath"
|
|
|
|
"AskOptions"
|
|
|
|
"AskPath"
|
|
|
|
"AskText"
|
|
|
|
"AskYesNo"
|
|
|
|
"BatchDeleteEx"
|
|
|
|
"BatchFileLoad"
|
|
|
|
"BatchFileSave"
|
|
|
|
"BatchFind"
|
|
|
|
"BatchGetFileName"
|
|
|
|
"BatchMoveEx"
|
|
|
|
"BatchSetFileName"
|
|
|
|
"ChangeDirectory"
|
|
|
|
"CloseFile"
|
|
|
|
"CmdGetHwndDlg"
|
|
|
|
"ComponentAddItem" ; differs between IS3 and IS5
|
|
|
|
"ComponentCompareSizeRequired" ; IS5 only
|
|
|
|
"ComponentDialog"
|
|
|
|
"ComponentError" ; IS5 only
|
|
|
|
"ComponentFileEnum" ; IS5 only
|
|
|
|
"ComponentFileInfo" ; IS5 only
|
|
|
|
"ComponentFilterLanguage" ; IS5 only
|
|
|
|
"ComponentFilterOS" ; IS5 only
|
|
|
|
"ComponentGetData" ; IS5 only
|
|
|
|
"ComponentGetItemInfo" ; IS3 only
|
|
|
|
"ComponentGetItemSize" ; differs between IS3 and IS5
|
|
|
|
"ComponentIsItemSelected" ; differs between IS3 and IS5
|
|
|
|
"ComponentListItems"
|
|
|
|
"ComponentMoveData" ; IS5 only
|
|
|
|
"ComponentSelectItem" ; differs between IS3 and IS5
|
|
|
|
"ComponentSetData" ; IS5 only
|
|
|
|
"ComponentSetItemInfo" ; IS3 only
|
|
|
|
"ComponentSetTarget" ; IS5 only
|
|
|
|
"ComponentSetupTypeEnum" ; IS5 only
|
|
|
|
"ComponentSetupTypeGetData" ; IS5 only
|
|
|
|
"ComponentSetupTypeSet" ; IS5 only
|
|
|
|
"ComponentTotalSize"
|
|
|
|
"ComponentValidate" ; IS5 only
|
|
|
|
"CompressAdd" ; IS3 only
|
|
|
|
"CompressDel" ; IS3 only
|
|
|
|
"CompressEnum" ; IS3 only
|
|
|
|
"CompressGet" ; IS3 only
|
|
|
|
"CompressInfo" ; IS3 only
|
|
|
|
"CopyFile"
|
|
|
|
"CreateDir"
|
|
|
|
"CreateFile"
|
|
|
|
"CreateProgramFolder"
|
|
|
|
"DeinstallSetReference" ; IS5 only
|
|
|
|
"DeinstallStart"
|
|
|
|
"Delay"
|
|
|
|
"DeleteDir"
|
|
|
|
"DeleteFile"
|
|
|
|
"DialogSetInfo"
|
|
|
|
"Disable"
|
|
|
|
"DoInstall"
|
|
|
|
"Do"
|
|
|
|
"Enable"
|
|
|
|
"EnterDisk"
|
|
|
|
"ExistsDir"
|
|
|
|
"ExistsDisk"
|
|
|
|
"ExitProgMan"
|
|
|
|
"EzBatchAddPath"
|
|
|
|
"EzBatchAddString"
|
|
|
|
"EzBatchReplace"
|
|
|
|
"EzConfigAddDriver"
|
|
|
|
"EzConfigAddString"
|
|
|
|
"EzConfigGetValue"
|
|
|
|
"EzConfigSetValue"
|
|
|
|
"EzDefineDialog"
|
|
|
|
"FileCompare"
|
|
|
|
"FileDeleteLine"
|
|
|
|
"FileGrep"
|
|
|
|
"FileInsertLine"
|
|
|
|
"FileSetBeginDefine" ; IS3 only
|
|
|
|
"FileSetEndDefine" ; IS3 only
|
|
|
|
"FileSetPerformEz" ; IS3 only
|
|
|
|
"FileSetPerform" ; IS3 only
|
|
|
|
"FileSetReset" ; IS3 only
|
|
|
|
"FileSetRoot" ; IS3 only
|
|
|
|
"FindAllDirs"
|
|
|
|
"FindAllFiles"
|
|
|
|
"FindFile"
|
|
|
|
"FindWindow"
|
|
|
|
"GetDiskSpace"
|
|
|
|
"GetDisk"
|
|
|
|
"GetEnvVar"
|
|
|
|
"GetExtents"
|
|
|
|
"GetFileInfo"
|
|
|
|
"GetLine"
|
|
|
|
"GetProfInt"
|
|
|
|
"GetProfString"
|
|
|
|
"GetSystemInfo"
|
|
|
|
"GetValidDrivesList"
|
|
|
|
"GetVersion"
|
|
|
|
"GetWindowHandle"
|
|
|
|
"InstallationInfo"
|
|
|
|
"Is"
|
|
|
|
"LaunchApp"
|
|
|
|
"LaunchAppAndWait"
|
|
|
|
"ListAddItem"
|
|
|
|
"ListAddString"
|
|
|
|
"ListCount"
|
|
|
|
"ListCreate"
|
|
|
|
"ListDestroy"
|
|
|
|
"ListFindItem"
|
|
|
|
"ListFindString"
|
|
|
|
"ListGetFirstItem"
|
|
|
|
"ListGetFirstString"
|
|
|
|
"ListGetNextItem"
|
|
|
|
"ListGetNextString"
|
|
|
|
"ListReadFromFile"
|
|
|
|
"ListSetCurrentItem"
|
|
|
|
"ListSetNextItem"
|
|
|
|
"ListSetNextString"
|
|
|
|
"ListSetIndex"
|
|
|
|
"ListWriteToFile"
|
|
|
|
"LongPathToQuote"
|
|
|
|
"LongPathToShortPath"
|
|
|
|
"MessageBox"
|
|
|
|
"NumToStr"
|
|
|
|
"OpenFileMode"
|
|
|
|
"OpenFile"
|
|
|
|
"ParsePath"
|
|
|
|
"PathAdd"
|
|
|
|
"PathDelete"
|
|
|
|
"PathFind"
|
|
|
|
"PathGet"
|
|
|
|
"PathMove"
|
|
|
|
"PathSet"
|
|
|
|
"Path"
|
|
|
|
"PlaceBitmap"
|
|
|
|
"PlaceWindow"
|
|
|
|
"PlayMMedia" ; IS5 only
|
|
|
|
"ProgDefGroupType"
|
|
|
|
"RegDBCreateKeyEx"
|
|
|
|
"RegDBDeleteValue"
|
|
|
|
"RegDBGetItem"
|
|
|
|
"RegDBKeyExist"
|
|
|
|
"RegDBSetItem"
|
|
|
|
"RegDBGetKeyValueEx"
|
|
|
|
"RegDBSetKeyValueEx"
|
|
|
|
"RegDBSetDefaultRoot"
|
|
|
|
"RenameFile"
|
|
|
|
"ReplaceFolderIcon"
|
|
|
|
"ReplaceProfString"
|
|
|
|
"SdAskDestPath"
|
|
|
|
"SdAskOptions"
|
|
|
|
"SdAskOptionsList"
|
|
|
|
"SdBitmap"
|
|
|
|
"SdCloseDlg"
|
|
|
|
"SdComponentAdvCheckSpace"
|
|
|
|
"SdComponentAdvInit"
|
|
|
|
"SdComponentAdvUpdateSpace"
|
|
|
|
"SdComponentDialog"
|
|
|
|
"SdComponentDialog2"
|
|
|
|
"SdComponentDialogAdv"
|
|
|
|
"SdComponentDialogEx"
|
|
|
|
"SdComponentDlgCheckSpace"
|
|
|
|
"SdComponentMult"
|
|
|
|
"SdConfirmNewDir"
|
|
|
|
"SdConfirmRegistration"
|
|
|
|
"SdDiskSpace"
|
|
|
|
"SdDisplayTopics"
|
|
|
|
"SdDoStdButton"
|
|
|
|
"SdEnablement"
|
|
|
|
"SdError"
|
|
|
|
"SdFinish"
|
|
|
|
"SdFinishInit32"
|
|
|
|
"SdFinishReboot"
|
|
|
|
"SdGeneralInit"
|
|
|
|
"SdGetItemName"
|
|
|
|
"SdGetTextExtent"
|
|
|
|
"SdGetUserCompanyInfo"
|
|
|
|
"SdInit"
|
|
|
|
"SdIsShellExplorer"
|
|
|
|
"SdIsStdButton"
|
|
|
|
"SdLicense"
|
|
|
|
"SdMakeName"
|
|
|
|
"SdOptionInit"
|
|
|
|
"SdOptionSetState"
|
|
|
|
"SdOptionsButtons"
|
|
|
|
"SdOptionsButtonsInit"
|
|
|
|
"SdPlugInProductName"
|
|
|
|
"SdProductName"
|
|
|
|
"SdRegEnableButton"
|
|
|
|
"SdRegExEnableButton"
|
|
|
|
"SdRegisterUser"
|
|
|
|
"SdRegisterUserEx"
|
|
|
|
"SdRemoveEndSpace"
|
|
|
|
"SdSelectFolder"
|
|
|
|
"SdSetSequentialItems"
|
|
|
|
"SdSetStatic"
|
|
|
|
"SdSetupTypeEx" ; IS5 only
|
|
|
|
"SdSetupType"
|
|
|
|
"SdShowAnyDialog"
|
|
|
|
"SdShowDlgEdit1"
|
|
|
|
"SdShowDlgEdit2"
|
|
|
|
"SdShowDlgEdit3"
|
|
|
|
"SdShowFileMods"
|
|
|
|
"SdShowInfoList"
|
|
|
|
"SdShowMsg"
|
|
|
|
"SdStartCopy"
|
|
|
|
"SdUnInit"
|
|
|
|
"SdUpdateComponentSelection"
|
|
|
|
"SdWelcome"
|
|
|
|
"SendMessage"
|
|
|
|
"SetColor"
|
|
|
|
"SetFont"
|
|
|
|
"SetDialogTitle"
|
|
|
|
"SetDisplayEffect" ; IS5 only
|
|
|
|
"SetFileInfo"
|
|
|
|
"SetForegroundWindow"
|
|
|
|
"SetStatusWindow"
|
|
|
|
"SetTitle"
|
|
|
|
"SetupType"
|
|
|
|
"ShowProgramFolder"
|
|
|
|
"Split" ; IS3 only
|
|
|
|
"SprintfBox"
|
|
|
|
"Sprintf"
|
|
|
|
"StatusUpdate"
|
|
|
|
"StrCompare"
|
|
|
|
"StrFind"
|
|
|
|
"StrGetTokens"
|
|
|
|
"StrLength"
|
|
|
|
"StrRemoveLastSlash"
|
|
|
|
"StrToLower"
|
|
|
|
"StrToNum"
|
|
|
|
"StrToUpper"
|
|
|
|
"StrSub"
|
|
|
|
"VarRestore"
|
|
|
|
"VarSave"
|
|
|
|
"VerCompare"
|
|
|
|
"VerGetFileVersion"
|
|
|
|
"WaitOnDialog"
|
|
|
|
"Welcome"
|
|
|
|
"WriteLine"
|
|
|
|
"WriteProfString"
|
|
|
|
"XCopyFile")
|
1998-05-05 19:26:50 +00:00
|
|
|
"System functions defined in InstallShield 3 and 5.")
|
|
|
|
|
2005-03-23 10:48:20 +00:00
|
|
|
(defconst installshield-system-variables-list
|
|
|
|
'("BATCH_INSTALL"
|
|
|
|
"CMDLINE"
|
|
|
|
"COMMONFILES"
|
|
|
|
"CORECOMPONENTHANDLING"
|
|
|
|
"DIALOGCACHE"
|
|
|
|
"ERRORFILENAME"
|
|
|
|
"FOLDER_DESKTOP"
|
|
|
|
"FOLDER_PROGRAMS"
|
|
|
|
"FOLDER_STARTMENU"
|
|
|
|
"FOLDER_STARTUP"
|
|
|
|
"INFOFILENAME"
|
|
|
|
"ISRES"
|
|
|
|
"ISUSER"
|
|
|
|
"ISVERSION"
|
|
|
|
"MEDIA"
|
|
|
|
"MODE"
|
|
|
|
"PROGRAMFILES"
|
|
|
|
"SELECTED_LANGUAGE"
|
|
|
|
"SRCDIR"
|
|
|
|
"SRCDISK"
|
|
|
|
"SUPPORTDIR"
|
|
|
|
"TARGETDIR"
|
|
|
|
"TARGETDISK"
|
|
|
|
"UNINST"
|
|
|
|
"WINDIR"
|
|
|
|
"WINDISK"
|
|
|
|
"WINMAJOR"
|
|
|
|
"WINSYSDIR"
|
|
|
|
"WINSYSDISK")
|
1998-05-05 19:26:50 +00:00
|
|
|
"System variables used in InstallShield 3 and 5.")
|
|
|
|
|
2005-03-23 10:48:20 +00:00
|
|
|
(defconst installshield-types-list
|
|
|
|
'("BOOL"
|
|
|
|
"BYREF"
|
|
|
|
"CHAR"
|
|
|
|
"HIWORD"
|
|
|
|
"HWND"
|
|
|
|
"INT"
|
|
|
|
"LIST"
|
|
|
|
"LONG"
|
|
|
|
"LOWORD"
|
|
|
|
"LPSTR"
|
|
|
|
"NUMBER"
|
|
|
|
"NUMBERLIST"
|
|
|
|
"POINTER"
|
|
|
|
"QUAD"
|
|
|
|
"RGB"
|
|
|
|
"SHORT"
|
|
|
|
"STRINGLIST"
|
|
|
|
"STRING")
|
1998-05-05 19:26:50 +00:00
|
|
|
"Type keywords used in InstallShield 3 and 5.")
|
|
|
|
|
|
|
|
;;; some might want to skip highlighting these to improve performance
|
2005-03-23 10:48:20 +00:00
|
|
|
(defconst installshield-funarg-constants-list
|
|
|
|
'("AFTER"
|
|
|
|
"APPEND"
|
|
|
|
"ALLCONTENTS"
|
|
|
|
"BACKBUTTON"
|
|
|
|
"BACKGROUNDCAPTION"
|
|
|
|
"BACKGROUND"
|
|
|
|
"BACK"
|
|
|
|
"BASEMEMORY"
|
|
|
|
"BEFORE"
|
|
|
|
"BIOS"
|
|
|
|
"BITMAPICON"
|
|
|
|
"BK_BLUE"
|
|
|
|
"BK_GREEN"
|
|
|
|
"BK_RED"
|
|
|
|
"BLUE"
|
|
|
|
"BOOTUPDRIVE"
|
|
|
|
"CANCEL"
|
|
|
|
"CDROM_DRIVE"
|
|
|
|
"CDROM"
|
|
|
|
"CHECKBOX95"
|
|
|
|
"CHECKBOX"
|
|
|
|
"CHECKLINE"
|
|
|
|
"CHECKMARK"
|
|
|
|
"COLORS"
|
|
|
|
"COMMANDEX"
|
|
|
|
"COMMAND"
|
|
|
|
"COMP_NORMAL"
|
|
|
|
"COMP_UPDATE_DATE"
|
|
|
|
"COMP_UPDATE_SAME"
|
|
|
|
"COMP_UPDATE_VERSION"
|
|
|
|
"COMPACT"
|
|
|
|
"CONTINUE"
|
|
|
|
"CPU"
|
|
|
|
"CUSTOM"
|
|
|
|
"DATE"
|
|
|
|
"DEFWINDOWMODE"
|
|
|
|
"DIR_WRITEABLE"
|
|
|
|
"DIRECTORY"
|
|
|
|
"DISABLE"
|
|
|
|
"DISK_TOTALSPACE"
|
|
|
|
"DISK"
|
|
|
|
"DLG_OPTIONS"
|
|
|
|
"DLG_PATH"
|
|
|
|
"DLG_TEXT"
|
|
|
|
"DLG_ASK_YESNO"
|
|
|
|
"DLG_ENTER_DISK"
|
|
|
|
"DLG_ERR"
|
|
|
|
"DLG_INFO_ALTIMAGE"
|
|
|
|
"DLG_INFO_CHECKSELECTION"
|
|
|
|
"DLG_INFO_KUNITS"
|
|
|
|
"DLG_INFO_USEDECIMAL"
|
|
|
|
"DLG_MSG_INFORMATION"
|
|
|
|
"DLG_MSG_SEVERE"
|
|
|
|
"DLG_MSG_WARNING"
|
|
|
|
"DLG_STATUS"
|
|
|
|
"DLG_WARNING"
|
|
|
|
"DLG_USER_CAPTION"
|
|
|
|
"DRIVE"
|
|
|
|
"ENABLE"
|
|
|
|
"END_OF_FILE"
|
|
|
|
"END_OF_LIST"
|
|
|
|
"ENVSPACE"
|
|
|
|
"EQUALS"
|
|
|
|
"EXCLUDE_SUBDIR"
|
|
|
|
"EXCLUSIVE"
|
|
|
|
"EXISTS"
|
|
|
|
"EXIT"
|
|
|
|
"EXTENDED_MEMORY"
|
|
|
|
"EXTENSION_ONLY"
|
|
|
|
"FAILIFEXISTS"
|
|
|
|
"FALSE"
|
|
|
|
"FEEDBACK_FULL"
|
|
|
|
"FILE_ATTR_ARCHIVED"
|
|
|
|
"FILE_ATTR_DIRECTORY"
|
|
|
|
"FILE_ATTR_HIDDEN"
|
|
|
|
"FILE_ATTR_NORMAL"
|
|
|
|
"FILE_ATTR_READONLY"
|
|
|
|
"FILE_ATTR_SYSTEM"
|
|
|
|
"FILE_ATTRIBUTE"
|
|
|
|
"FILE_DATE"
|
|
|
|
"FILE_LINE_LENGTH"
|
|
|
|
"FILE_MODE_APPEND"
|
|
|
|
"FILE_MODE_BINARYREADONLY"
|
|
|
|
"FILE_MODE_BINARY"
|
|
|
|
"FILE_MODE_NORMAL"
|
|
|
|
"FILE_NO_VERSION"
|
|
|
|
"FILE_NOT_FOUND"
|
|
|
|
"FILE_SIZE"
|
|
|
|
"FILE_TIME"
|
|
|
|
"FILENAME_ONLY"
|
|
|
|
"FILENAME"
|
|
|
|
"FIXED_DRIVE"
|
|
|
|
"FOLDER_DESKTOP"
|
|
|
|
"FOLDER_PROGRAMS"
|
|
|
|
"FOLDER_STARTMENU"
|
|
|
|
"FOLDER_STARTUP"
|
|
|
|
"FREEENVSPACE"
|
|
|
|
"FULLWINDOWMODE"
|
|
|
|
"FULL"
|
|
|
|
"FONT_TITLE"
|
|
|
|
"GREATER_THAN"
|
|
|
|
"GREEN"
|
|
|
|
"HKEY_CLASSES_ROOT"
|
|
|
|
"HKEY_CURRENT_USER"
|
|
|
|
"HKEY_LOCAL_MACHINE"
|
|
|
|
"HKEY_USERS"
|
|
|
|
"HOURGLASS"
|
|
|
|
"INCLUDE_SUBDIR"
|
|
|
|
"INDVFILESTATUS"
|
|
|
|
"INFORMATION"
|
|
|
|
"IS_WINDOWSNT"
|
|
|
|
"IS_WINDOWS95"
|
|
|
|
"IS_WINDOWS"
|
|
|
|
"IS_WIN32S"
|
|
|
|
"ISTYPE"
|
|
|
|
"LANGUAGE_DRV"
|
|
|
|
"LANGUAGE"
|
|
|
|
"LESS_THAN"
|
|
|
|
"LIST_NULL"
|
|
|
|
"LISTFIRST"
|
|
|
|
"LISTNEXT"
|
|
|
|
"LOCKEDFILE"
|
|
|
|
"LOGGING"
|
|
|
|
"LOWER_LEFT"
|
|
|
|
"LOWER_RIGHT"
|
|
|
|
"MAGENTA"
|
|
|
|
"MOUSE_DRV"
|
|
|
|
"MOUSE"
|
|
|
|
"NETWORK_DRV"
|
|
|
|
"NETWORK"
|
|
|
|
"NEXT"
|
|
|
|
"NONEXCLUSIVE"
|
|
|
|
"NORMALMODE"
|
|
|
|
"NOSET"
|
|
|
|
"NOTEXISTS"
|
|
|
|
"NOWAIT"
|
|
|
|
"NO"
|
|
|
|
"OFF"
|
|
|
|
"ONLYDIR"
|
|
|
|
"ON"
|
|
|
|
"OSMAJOR"
|
|
|
|
"OSMINOR"
|
|
|
|
"OS"
|
|
|
|
"OTHER_FAILURE"
|
|
|
|
"PARALLEL"
|
|
|
|
"PARTIAL"
|
|
|
|
"PATH_EXISTS"
|
|
|
|
"PATH"
|
|
|
|
"RED"
|
|
|
|
"REGDB_APPPATH_DEFAULT"
|
|
|
|
"REGDB_APPPATH"
|
|
|
|
"REGDB_BINARY"
|
|
|
|
"REGDB_ERR_CONNECTIONEXISTS"
|
|
|
|
"REGDB_ERR_CORRUPTEDREGSITRY"
|
|
|
|
"REGDB_ERR_INITIALIZATION"
|
|
|
|
"REGDB_ERR_INVALIDHANDLE"
|
|
|
|
"REGDB_ERR_INVALIDNAME"
|
|
|
|
"REGDB_NUMBER"
|
|
|
|
"REGDB_STRING_EXPAND"
|
|
|
|
"REGDB_STRING_MULTI"
|
|
|
|
"REGDB_STRING"
|
|
|
|
"REGDB_UNINSTALL_NAME"
|
|
|
|
"REMOTE_DRIVE"
|
|
|
|
"REMOVALE_DRIVE"
|
|
|
|
"REPLACE_ITEM"
|
|
|
|
"REPLACE"
|
|
|
|
"RESET"
|
|
|
|
"RESTART"
|
|
|
|
"ROOT"
|
|
|
|
"SELFREGISTER"
|
|
|
|
"SERIAL"
|
|
|
|
"SET"
|
|
|
|
"SEVERE"
|
|
|
|
"SHAREDFILE"
|
|
|
|
"SHARE"
|
|
|
|
"SILENTMODE"
|
|
|
|
"SRCTARGETDIR"
|
|
|
|
"STATUSBAR"
|
|
|
|
"STATUSDLG"
|
|
|
|
"STATUSOLD"
|
|
|
|
"STATUS"
|
|
|
|
"STYLE_NORMAL"
|
|
|
|
"SW_MAXIMIZE"
|
|
|
|
"SW_MINIMIZE"
|
|
|
|
"SW_RESTORE"
|
|
|
|
"SW_SHOW"
|
|
|
|
"SYS_BOOTMACHINE"
|
|
|
|
"TIME"
|
|
|
|
"TRUE"
|
|
|
|
"TYPICAL"
|
|
|
|
"UPPER_LEFT"
|
|
|
|
"UPPER_RIGHT"
|
|
|
|
"VALID_PATH"
|
|
|
|
"VERSION"
|
|
|
|
"VIDEO"
|
|
|
|
"VOLUMELABEL"
|
|
|
|
"YELLOW"
|
|
|
|
"YES"
|
|
|
|
"WAIT"
|
|
|
|
"WARNING"
|
|
|
|
"WINMAJOR"
|
|
|
|
"WINMINOR"
|
|
|
|
"WIN32SINSTALLED"
|
|
|
|
"WIN32SMAJOR"
|
|
|
|
"WIN32SMINOR")
|
|
|
|
"Function argument constants used in InstallShield 3 and 5."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(defvar rul-generic-mode-syntax-table nil
|
2005-04-28 09:17:06 +00:00
|
|
|
"Syntax table to use in `rul-generic-mode' buffers.")
|
2005-03-21 17:10:57 +00:00
|
|
|
|
|
|
|
(setq rul-generic-mode-syntax-table
|
|
|
|
(make-syntax-table c++-mode-syntax-table))
|
|
|
|
|
2005-03-23 10:48:20 +00:00
|
|
|
(modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
|
|
|
|
(modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
|
2005-03-21 17:10:57 +00:00
|
|
|
|
|
|
|
(modify-syntax-entry ?/ ". 124b" rul-generic-mode-syntax-table)
|
|
|
|
(modify-syntax-entry ?* ". 23" rul-generic-mode-syntax-table)
|
|
|
|
|
|
|
|
;; here manually instead
|
|
|
|
(defun generic-rul-mode-setup-function ()
|
2005-03-23 10:48:20 +00:00
|
|
|
(make-local-variable 'parse-sexp-ignore-comments)
|
|
|
|
(make-local-variable 'comment-start)
|
|
|
|
(make-local-variable 'comment-start-skip)
|
|
|
|
(make-local-variable 'comment-end)
|
2005-03-21 17:10:57 +00:00
|
|
|
(setq imenu-generic-expression
|
|
|
|
'((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))
|
|
|
|
parse-sexp-ignore-comments t
|
|
|
|
comment-end "*/"
|
|
|
|
comment-start "/*"
|
|
|
|
;;; comment-end ""
|
|
|
|
;;; comment-start "//"
|
|
|
|
;;; comment-start-skip ""
|
|
|
|
)
|
2005-03-23 10:48:20 +00:00
|
|
|
;; (set-syntax-table rul-generic-mode-syntax-table)
|
2005-03-21 17:10:57 +00:00
|
|
|
(setq font-lock-syntax-table rul-generic-mode-syntax-table))
|
|
|
|
|
|
|
|
;; moved mode-definition behind defun-definition to be warning-free - 15.11.02/RSan
|
|
|
|
(define-generic-mode rul-generic-mode
|
|
|
|
;; Using "/*" and "*/" doesn't seem to be working right
|
2005-03-23 10:48:20 +00:00
|
|
|
'("//" ("/*" . "*/" ))
|
|
|
|
(eval-when-compile installshield-statement-keyword-list)
|
|
|
|
(eval-when-compile
|
|
|
|
(list
|
|
|
|
;; preprocessor constructs
|
|
|
|
'("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"
|
|
|
|
1 font-lock-string-face)
|
|
|
|
'("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
|
|
|
|
(1 font-lock-reference-face)
|
|
|
|
(2 font-lock-variable-name-face nil t))
|
|
|
|
;; indirect string constants
|
|
|
|
'("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face)
|
|
|
|
;; gotos
|
|
|
|
'("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face)
|
|
|
|
'("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"
|
|
|
|
(1 font-lock-keyword-face)
|
|
|
|
(2 font-lock-reference-face nil t))
|
|
|
|
;; system variables
|
|
|
|
(generic-make-keywords-list
|
|
|
|
installshield-system-variables-list
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-variable-name-face "[^_]" "[^_]")
|
2005-03-23 10:48:20 +00:00
|
|
|
;; system functions
|
|
|
|
(generic-make-keywords-list
|
|
|
|
installshield-system-functions-list
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-function-name-face "[^_]" "[^_]")
|
2005-03-23 10:48:20 +00:00
|
|
|
;; type keywords
|
|
|
|
(generic-make-keywords-list
|
|
|
|
installshield-types-list
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-type-face "[^_]" "[^_]")
|
2005-03-23 10:48:20 +00:00
|
|
|
;; function argument constants
|
|
|
|
(generic-make-keywords-list
|
|
|
|
installshield-funarg-constants-list
|
2005-03-24 09:15:21 +00:00
|
|
|
font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice?
|
2005-04-11 23:34:04 +00:00
|
|
|
'("\\.[rR][uU][lL]\\'")
|
2005-03-23 10:48:20 +00:00
|
|
|
'(generic-rul-mode-setup-function)
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for InstallShield RUL files.")
|
2005-03-21 17:10:57 +00:00
|
|
|
|
1998-03-17 23:49:33 +00:00
|
|
|
(define-skeleton rul-if
|
2005-03-21 17:10:57 +00:00
|
|
|
"Insert an if statement."
|
|
|
|
"condition: "
|
|
|
|
"if(" str ") then" \n
|
|
|
|
> _ \n
|
|
|
|
( "other condition, %s: "
|
|
|
|
> "elseif(" str ") then" \n
|
|
|
|
> \n)
|
|
|
|
> "else" \n
|
|
|
|
> \n
|
|
|
|
resume:
|
|
|
|
> "endif;")
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
(define-skeleton rul-function
|
|
|
|
"Insert a function statement."
|
|
|
|
"function: "
|
|
|
|
"function " str " ()" \n
|
|
|
|
( "local variables, %s: "
|
2005-03-21 17:10:57 +00:00
|
|
|
> " " str ";" \n)
|
1998-03-17 23:49:33 +00:00
|
|
|
> "begin" \n
|
|
|
|
> _ \n
|
|
|
|
resume:
|
2005-03-21 17:10:57 +00:00
|
|
|
> "end;"))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
|
|
|
;; Additions by ACorreir@pervasive-sw.com (Alfred Correira)
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'mailrc-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode mailrc-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("alias"
|
|
|
|
"else"
|
|
|
|
"endif"
|
|
|
|
"group"
|
|
|
|
"if"
|
|
|
|
"ignore"
|
|
|
|
"set"
|
|
|
|
"source"
|
|
|
|
"unset")
|
1998-03-17 23:49:33 +00:00
|
|
|
'(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
|
2005-03-24 09:15:21 +00:00
|
|
|
(2 font-lock-constant-face)
|
|
|
|
(3 font-lock-variable-name-face))
|
1998-03-17 23:49:33 +00:00
|
|
|
("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$"
|
2005-03-24 09:15:21 +00:00
|
|
|
(2 font-lock-constant-face)
|
|
|
|
(3 font-lock-variable-name-face))
|
2001-11-23 09:36:24 +00:00
|
|
|
("^\\s-*\\(source\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
|
|
|
|
(2 font-lock-variable-name-face)))
|
2005-03-23 10:48:20 +00:00
|
|
|
'("\\.mailrc\\'")
|
1998-03-17 23:49:33 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Mode for mailrc files."))
|
1998-03-17 23:49:33 +00:00
|
|
|
|
1999-09-08 07:32:49 +00:00
|
|
|
;; Inetd.conf
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'inetd-conf-generic-mode generic-extras-enable-list)
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode inetd-conf-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("stream"
|
|
|
|
"dgram"
|
|
|
|
"tcp"
|
|
|
|
"udp"
|
|
|
|
"wait"
|
|
|
|
"nowait"
|
|
|
|
"internal")
|
|
|
|
'(("^\\([-A-Za-z0-9_]+\\)" 1 font-lock-type-face))
|
1999-09-08 07:32:49 +00:00
|
|
|
'("/etc/inetd.conf\\'")
|
1999-10-16 03:59:43 +00:00
|
|
|
(list
|
1999-09-08 07:32:49 +00:00
|
|
|
(function
|
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
2005-05-12 13:19:29 +00:00
|
|
|
'((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
|
|
|
;; Services
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'etc-services-generic-mode generic-extras-enable-list)
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode etc-services-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("tcp"
|
|
|
|
"udp"
|
|
|
|
"ddp")
|
2005-03-21 17:10:57 +00:00
|
|
|
'(("^\\([-A-Za-z0-9_]+\\)\\s-+\\([0-9]+\\)/"
|
2005-03-23 10:48:20 +00:00
|
|
|
(1 font-lock-type-face)
|
|
|
|
(2 font-lock-variable-name-face)))
|
1999-09-08 07:32:49 +00:00
|
|
|
'("/etc/services\\'")
|
1999-10-16 03:59:43 +00:00
|
|
|
(list
|
1999-09-08 07:32:49 +00:00
|
|
|
(function
|
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
2005-05-12 13:19:29 +00:00
|
|
|
'((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
|
|
|
;; Password and Group files
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'etc-passwd-generic-mode generic-extras-enable-list)
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode etc-passwd-generic-mode
|
1999-09-08 07:32:49 +00:00
|
|
|
nil ;; No comment characters
|
2005-03-23 10:48:20 +00:00
|
|
|
'("root") ;; Only one keyword
|
|
|
|
(eval-when-compile
|
|
|
|
(list
|
|
|
|
(list
|
|
|
|
(concat
|
|
|
|
"^"
|
|
|
|
;; User name -- Never blank!
|
|
|
|
"\\([^:]+\\)"
|
|
|
|
":"
|
|
|
|
;; Password, UID and GID
|
|
|
|
(mapconcat
|
|
|
|
'identity
|
|
|
|
(make-list 3 "\\([^:]+\\)")
|
|
|
|
":")
|
|
|
|
":"
|
|
|
|
;; GECOS/Name -- might be blank
|
|
|
|
"\\([^:]*\\)"
|
|
|
|
":"
|
|
|
|
;; Home directory and shell
|
|
|
|
"\\([^:]+\\)"
|
|
|
|
":?"
|
|
|
|
"\\([^:]*\\)"
|
|
|
|
"$")
|
|
|
|
'(1 font-lock-type-face)
|
|
|
|
'(5 font-lock-variable-name-face)
|
|
|
|
'(6 font-lock-constant-face)
|
|
|
|
'(7 font-lock-warning-face))
|
|
|
|
'("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$"
|
|
|
|
(1 font-lock-type-face)
|
|
|
|
(4 font-lock-variable-name-face))))
|
1999-09-08 07:32:49 +00:00
|
|
|
'("/etc/passwd\\'" "/etc/group\\'")
|
1999-10-16 03:59:43 +00:00
|
|
|
(list
|
1999-09-08 07:32:49 +00:00
|
|
|
(function
|
|
|
|
(lambda ()
|
1999-10-16 03:59:43 +00:00
|
|
|
(setq imenu-generic-expression
|
2005-05-12 13:19:29 +00:00
|
|
|
'((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2000-10-04 04:45:55 +00:00
|
|
|
;; Fstab
|
2005-03-21 17:10:57 +00:00
|
|
|
(when (memq 'etc-fstab-generic-mode generic-extras-enable-list)
|
2000-10-04 04:45:55 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode etc-fstab-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
|
|
|
'("adfs"
|
|
|
|
"affs"
|
|
|
|
"autofs"
|
|
|
|
"coda"
|
|
|
|
"coherent"
|
|
|
|
"cramfs"
|
|
|
|
"devpts"
|
|
|
|
"efs"
|
|
|
|
"ext2"
|
|
|
|
"ext3"
|
|
|
|
"hfs"
|
|
|
|
"hpfs"
|
|
|
|
"iso9660"
|
|
|
|
"jfs"
|
|
|
|
"minix"
|
|
|
|
"msdos"
|
|
|
|
"ncpfs"
|
|
|
|
"nfs"
|
|
|
|
"ntfs"
|
|
|
|
"proc"
|
|
|
|
"qnx4"
|
|
|
|
"reiserfs"
|
|
|
|
"romfs"
|
|
|
|
"smbfs"
|
2006-02-06 10:06:56 +00:00
|
|
|
"cifs"
|
|
|
|
"usbdevfs"
|
2005-03-23 10:48:20 +00:00
|
|
|
"sysv"
|
|
|
|
"tmpfs"
|
|
|
|
"udf"
|
|
|
|
"ufs"
|
|
|
|
"umsdos"
|
|
|
|
"vfat"
|
|
|
|
"xenix"
|
|
|
|
"xfs"
|
|
|
|
"swap"
|
|
|
|
"auto"
|
|
|
|
"ignore")
|
2006-02-06 10:06:56 +00:00
|
|
|
'(("^\\([^# \t]+\\)\\s-+\\([^# \t]+\\)"
|
2005-04-11 23:34:04 +00:00
|
|
|
(1 font-lock-type-face t)
|
|
|
|
(2 font-lock-variable-name-face t)))
|
2000-10-04 04:45:55 +00:00
|
|
|
'("/etc/[v]*fstab\\'")
|
|
|
|
(list
|
|
|
|
(function
|
|
|
|
(lambda ()
|
|
|
|
(setq imenu-generic-expression
|
2006-02-06 10:06:56 +00:00
|
|
|
'((nil "^\\([^# \t]+\\)\\s-+" 1))))))))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
|
|
|
;; From Jacques Duthen <jacques.duthen@sncf.fr>
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'show-tabs-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-24 09:15:21 +00:00
|
|
|
(eval-when-compile
|
|
|
|
|
|
|
|
(defconst show-tabs-generic-mode-font-lock-defaults-1
|
2005-03-23 10:48:20 +00:00
|
|
|
'(;; trailing spaces must come before...
|
2005-06-10 08:48:28 +00:00
|
|
|
("[ \t]+$" . 'show-tabs-space)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; ...embedded tabs
|
2005-06-10 08:48:28 +00:00
|
|
|
("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab))))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-03-24 09:15:21 +00:00
|
|
|
(defconst show-tabs-generic-mode-font-lock-defaults-2
|
2005-03-23 10:48:20 +00:00
|
|
|
'(;; trailing spaces must come before...
|
2005-06-10 08:48:28 +00:00
|
|
|
("[ \t]+$" . 'show-tabs-space)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; ...tabs
|
2005-06-10 08:48:28 +00:00
|
|
|
("\t+" . 'show-tabs-tab))))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-06-10 08:48:28 +00:00
|
|
|
(defface show-tabs-tab
|
2005-03-24 09:15:21 +00:00
|
|
|
'((((class grayscale) (background light)) (:background "DimGray" :weight bold))
|
|
|
|
(((class grayscale) (background dark)) (:background "LightGray" :weight bold))
|
* mh-customize.el (mh-speedbar-selected-folder-face): Special case
high number of colors displays.
* textmodes/table.el (table-cell-face): Add special case for
displays supporting a high number of colors.
* progmodes/vhdl-mode.el (vhdl-font-lock-prompt-face)
(vhdl-font-lock-reserved-words-face)
(vhdl-speedbar-architecture-face)
(vhdl-speedbar-instantiation-face)
(vhdl-speedbar-architecture-selected-face)
(vhdl-speedbar-instantiation-selected-face): Likewise.
* progmodes/sh-script.el (sh-heredoc-face): Likewise.
* progmodes/idlw-help.el (idlwave-help-link-face): Likewise.
* progmodes/ebrowse.el (ebrowse-tree-mark-face)
(ebrowse-root-class-face, ebrowse-member-attribute-face)
(ebrowse-progress-face): Likewise.
* progmodes/compile.el (compilation-info-face): Likewise.
* progmodes/cc-fonts.el (c-invalid-face): Likewise.
* emacs-lisp/re-builder.el (reb-match-3): Likewise.
* calendar/calendar.el (diary-face): Likewise.
* woman.el (woman-italic-face, woman-bold-face)
(woman-unknown-face): Likewise.
* wid-edit.el (widget-button-pressed-face): Likewise.
* whitespace.el (whitespace-highlight-face): Likewise.
* smerge-mode.el (smerge-mine-face, smerge-base-face): Likewise.
* pcvs-info.el (cvs-marked-face): Likewise.
* info.el (info-xref): Likewise.
* ido.el (ido-subdir-face, ido-indicator-face): Likewise.
* hilit-chg.el (highlight-changes-face)
(highlight-changes-delete-face): Likewise.
* hi-lock.el (hi-yellow, hi-green, hi-blue-b, hi-green-b)
(hi-red-b): Likewise.
* generic-x.el (show-tabs-tab-face, show-tabs-space-face): Likewise.
* font-lock.el (font-lock-keyword-face)
(font-lock-function-name-face, font-lock-warning-face): Likewise.
* cus-edit.el (custom-invalid-face, custom-modified-face)
(custom-set-face, custom-changed-face, custom-variable-tag-face)
(custom-group-tag-face-1, custom-group-tag-face): Likewise.
* comint.el (comint-highlight-prompt): Likewise.
2005-04-08 14:26:13 +00:00
|
|
|
(((class color) (min-colors 88)) (:background "red1"))
|
|
|
|
(((class color)) (:background "red"))
|
2001-12-31 20:44:44 +00:00
|
|
|
(t (:weight bold)))
|
1999-09-08 07:32:49 +00:00
|
|
|
"Font Lock mode face used to highlight TABs."
|
2005-05-12 13:19:29 +00:00
|
|
|
:group 'generic-x)
|
2005-06-10 08:48:28 +00:00
|
|
|
;; backward-compatibility alias
|
|
|
|
(put 'show-tabs-tab-face 'face-alias 'show-tabs-tab)
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-06-10 08:48:28 +00:00
|
|
|
(defface show-tabs-space
|
2005-03-24 09:15:21 +00:00
|
|
|
'((((class grayscale) (background light)) (:background "DimGray" :weight bold))
|
|
|
|
(((class grayscale) (background dark)) (:background "LightGray" :weight bold))
|
* mh-customize.el (mh-speedbar-selected-folder-face): Special case
high number of colors displays.
* textmodes/table.el (table-cell-face): Add special case for
displays supporting a high number of colors.
* progmodes/vhdl-mode.el (vhdl-font-lock-prompt-face)
(vhdl-font-lock-reserved-words-face)
(vhdl-speedbar-architecture-face)
(vhdl-speedbar-instantiation-face)
(vhdl-speedbar-architecture-selected-face)
(vhdl-speedbar-instantiation-selected-face): Likewise.
* progmodes/sh-script.el (sh-heredoc-face): Likewise.
* progmodes/idlw-help.el (idlwave-help-link-face): Likewise.
* progmodes/ebrowse.el (ebrowse-tree-mark-face)
(ebrowse-root-class-face, ebrowse-member-attribute-face)
(ebrowse-progress-face): Likewise.
* progmodes/compile.el (compilation-info-face): Likewise.
* progmodes/cc-fonts.el (c-invalid-face): Likewise.
* emacs-lisp/re-builder.el (reb-match-3): Likewise.
* calendar/calendar.el (diary-face): Likewise.
* woman.el (woman-italic-face, woman-bold-face)
(woman-unknown-face): Likewise.
* wid-edit.el (widget-button-pressed-face): Likewise.
* whitespace.el (whitespace-highlight-face): Likewise.
* smerge-mode.el (smerge-mine-face, smerge-base-face): Likewise.
* pcvs-info.el (cvs-marked-face): Likewise.
* info.el (info-xref): Likewise.
* ido.el (ido-subdir-face, ido-indicator-face): Likewise.
* hilit-chg.el (highlight-changes-face)
(highlight-changes-delete-face): Likewise.
* hi-lock.el (hi-yellow, hi-green, hi-blue-b, hi-green-b)
(hi-red-b): Likewise.
* generic-x.el (show-tabs-tab-face, show-tabs-space-face): Likewise.
* font-lock.el (font-lock-keyword-face)
(font-lock-function-name-face, font-lock-warning-face): Likewise.
* cus-edit.el (custom-invalid-face, custom-modified-face)
(custom-set-face, custom-changed-face, custom-variable-tag-face)
(custom-group-tag-face-1, custom-group-tag-face): Likewise.
* comint.el (comint-highlight-prompt): Likewise.
2005-04-08 14:26:13 +00:00
|
|
|
(((class color) (min-colors 88)) (:background "yellow1"))
|
|
|
|
(((class color)) (:background "yellow"))
|
2001-12-31 20:44:44 +00:00
|
|
|
(t (:weight bold)))
|
1999-09-08 07:32:49 +00:00
|
|
|
"Font Lock mode face used to highlight spaces."
|
2005-05-12 13:19:29 +00:00
|
|
|
:group 'generic-x)
|
2005-06-10 08:48:28 +00:00
|
|
|
;; backward-compatibility alias
|
|
|
|
(put 'show-tabs-space-face 'face-alias 'show-tabs-space)
|
1999-09-08 07:32:49 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode show-tabs-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
nil ;; no comment char
|
|
|
|
nil ;; no keywords
|
2005-03-24 09:15:21 +00:00
|
|
|
(eval-when-compile show-tabs-generic-mode-font-lock-defaults-1)
|
2005-03-23 10:48:20 +00:00
|
|
|
nil ;; no auto-mode-alist
|
|
|
|
;; '(show-tabs-generic-mode-hook-fun)
|
1999-09-08 07:32:49 +00:00
|
|
|
nil
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode to show tabs and trailing spaces"))
|
1999-09-08 07:32:49 +00:00
|
|
|
|
1999-10-16 03:59:43 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; DNS modes
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'named-boot-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode named-boot-generic-mode
|
|
|
|
;; List of comment characters
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?\;)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of keywords
|
2005-03-23 10:48:20 +00:00
|
|
|
'("cache" "primary" "secondary" "forwarders" "limit" "options"
|
|
|
|
"directory" "check-names")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of additional font-lock-expressions
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face)
|
|
|
|
("^directory\\s-+\\(.*\\)" 1 font-lock-variable-name-face)
|
|
|
|
("^\\(primary\\|cache\\)\\s-+\\([.A-Za-z]+\\)\\s-+\\(.*\\)"
|
|
|
|
(2 font-lock-variable-name-face)
|
|
|
|
(3 font-lock-constant-face)))
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of additional automode-alist expressions
|
2005-03-23 10:48:20 +00:00
|
|
|
'("/etc/named.boot\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of set up functions to call
|
2005-05-12 13:19:29 +00:00
|
|
|
nil))
|
2005-04-28 09:17:06 +00:00
|
|
|
|
|
|
|
(when (memq 'named-database-generic-mode generic-extras-enable-list)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode named-database-generic-mode
|
|
|
|
;; List of comment characters
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?\;)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of keywords
|
2005-03-23 10:48:20 +00:00
|
|
|
'("IN" "NS" "CNAME" "SOA" "PTR" "MX" "A")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of additional font-lock-expressions
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face)
|
|
|
|
("^\\([.A-Za-z0-9]+\\)" 1 font-lock-variable-name-face))
|
2005-04-11 23:34:04 +00:00
|
|
|
;; List of additional auto-mode-alist expressions
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of set up functions to call
|
2005-05-12 13:19:29 +00:00
|
|
|
nil)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
|
|
|
(defvar named-database-time-string "%Y%m%d%H"
|
|
|
|
"Timestring for named serial numbers.")
|
|
|
|
|
|
|
|
(defun named-database-print-serial ()
|
|
|
|
"Print a serial number based on the current date."
|
|
|
|
(interactive)
|
2005-04-28 09:17:06 +00:00
|
|
|
(insert (format-time-string named-database-time-string (current-time)))))
|
|
|
|
|
|
|
|
(when (memq 'resolve-conf-generic-mode generic-extras-enable-list)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode resolve-conf-generic-mode
|
|
|
|
;; List of comment characters
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of keywords
|
2005-03-23 10:48:20 +00:00
|
|
|
'("nameserver" "domain" "search" "sortlist" "options")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of additional font-lock-expressions
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
2005-04-11 23:34:04 +00:00
|
|
|
;; List of additional auto-mode-alist expressions
|
2005-03-23 10:48:20 +00:00
|
|
|
'("/etc/resolv[e]?.conf\\'")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of set up functions to call
|
2005-05-12 13:19:29 +00:00
|
|
|
nil))
|
1999-10-16 03:59:43 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Modes for spice and common electrical engineering circuit netlist formats
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2005-04-28 09:17:06 +00:00
|
|
|
(when (memq 'spice-generic-mode generic-extras-enable-list)
|
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode spice-generic-mode
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'("and"
|
|
|
|
"cccs"
|
|
|
|
"ccvs"
|
|
|
|
"delay"
|
|
|
|
"nand"
|
|
|
|
"nor"
|
|
|
|
"npwl"
|
|
|
|
"or"
|
|
|
|
"par"
|
|
|
|
"ppwl"
|
|
|
|
"pwl"
|
|
|
|
"vccap"
|
|
|
|
"vccs"
|
|
|
|
"vcr"
|
|
|
|
"vcvs")
|
|
|
|
'(("^\\s-*\\([*].*\\)" 1 font-lock-comment-face)
|
|
|
|
(" \\(\\$ .*\\)$" 1 font-lock-comment-face)
|
|
|
|
("^\\(\\$ .*\\)$" 1 font-lock-comment-face)
|
|
|
|
("\\([*].*\\)" 1 font-lock-comment-face)
|
|
|
|
("^\\([+]\\)" 1 font-lock-string-face)
|
|
|
|
("^\\s-*\\([.]\\w+\\>\\)" 1 font-lock-keyword-face)
|
|
|
|
("\\(\\([.]\\|_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face)
|
|
|
|
("\\('[^']+'\\)" 1 font-lock-string-face)
|
|
|
|
("\\(\"[^\"]+\"\\)" 1 font-lock-string-face))
|
|
|
|
'("\\.[sS][pP]\\'"
|
|
|
|
"\\.[sS][pP][iI]\\'"
|
|
|
|
"\\.[sS][pP][iI][cC][eE]\\'"
|
|
|
|
"\\.[iI][nN][cC]\\'")
|
1999-10-16 03:59:43 +00:00
|
|
|
(list
|
|
|
|
'generic-bracket-support
|
|
|
|
;; Make keywords case-insensitive
|
|
|
|
(function
|
|
|
|
(lambda()
|
2005-03-24 09:15:21 +00:00
|
|
|
(setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for SPICE circuit netlist files."))
|
2005-04-28 09:17:06 +00:00
|
|
|
|
|
|
|
(when (memq 'ibis-generic-mode generic-extras-enable-list)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode ibis-generic-mode
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?|)
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'(("[[]\\([^]]*\\)[]]" 1 font-lock-keyword-face)
|
|
|
|
("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face))
|
|
|
|
'("\\.[iI][bB][sS]\\'")
|
|
|
|
'(generic-bracket-support)
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for IBIS circuit netlist files."))
|
2005-04-28 09:17:06 +00:00
|
|
|
|
|
|
|
(when (memq 'astap-generic-mode generic-extras-enable-list)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode astap-generic-mode
|
1999-10-16 03:59:43 +00:00
|
|
|
nil
|
2005-03-23 10:48:20 +00:00
|
|
|
'("analyze"
|
|
|
|
"description"
|
|
|
|
"elements"
|
|
|
|
"execution"
|
|
|
|
"features"
|
|
|
|
"functions"
|
|
|
|
"ground"
|
|
|
|
"model"
|
|
|
|
"outputs"
|
|
|
|
"print"
|
|
|
|
"run"
|
|
|
|
"controls"
|
|
|
|
"table")
|
|
|
|
'(("^\\s-*\\([*].*\\)" 1 font-lock-comment-face)
|
|
|
|
(";\\s-*\\([*].*\\)" 1 font-lock-comment-face)
|
|
|
|
("^\\s-*\\([.]\\w+\\>\\)" 1 font-lock-keyword-face)
|
|
|
|
("\\('[^']+'\\)" 1 font-lock-string-face)
|
|
|
|
("\\(\"[^\"]+\"\\)" 1 font-lock-string-face)
|
|
|
|
("[(,]\\s-*\\(\\([.]\\|_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face))
|
|
|
|
'("\\.[aA][pP]\\'"
|
|
|
|
"\\.[aA][sS][xX]\\'"
|
|
|
|
"\\.[aA][sS][tT][aA][pP]\\'"
|
|
|
|
"\\.[pP][sS][pP]\\'"
|
|
|
|
"\\.[dD][eE][cC][kK]\\'"
|
|
|
|
"\\.[gG][oO][dD][aA][tT][aA]")
|
1999-10-16 03:59:43 +00:00
|
|
|
(list
|
|
|
|
'generic-bracket-support
|
|
|
|
;; Make keywords case-insensitive
|
|
|
|
(function
|
|
|
|
(lambda()
|
2005-03-24 09:15:21 +00:00
|
|
|
(setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
|
2005-05-12 13:19:29 +00:00
|
|
|
"Generic mode for ASTAP circuit netlist files."))
|
2005-04-28 09:17:06 +00:00
|
|
|
|
|
|
|
(when (memq 'etc-modules-conf-generic-mode generic-extras-enable-list)
|
1999-10-16 03:59:43 +00:00
|
|
|
|
2005-03-21 17:10:57 +00:00
|
|
|
(define-generic-mode etc-modules-conf-generic-mode
|
|
|
|
;; List of comment characters
|
2005-03-23 10:48:20 +00:00
|
|
|
'(?#)
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of keywords
|
2005-03-23 10:48:20 +00:00
|
|
|
'("above"
|
|
|
|
"alias"
|
|
|
|
"below"
|
|
|
|
"define"
|
|
|
|
"depfile"
|
|
|
|
"else"
|
|
|
|
"elseif"
|
|
|
|
"endif"
|
|
|
|
"if"
|
|
|
|
"include"
|
|
|
|
"insmod_opt"
|
|
|
|
"install"
|
|
|
|
"keep"
|
|
|
|
"options"
|
|
|
|
"path"
|
|
|
|
"generic_stringfile"
|
|
|
|
"pcimapfile"
|
|
|
|
"isapnpmapfile"
|
|
|
|
"usbmapfile"
|
|
|
|
"parportmapfile"
|
|
|
|
"ieee1394mapfile"
|
|
|
|
"pnpbiosmapfile"
|
|
|
|
"probe"
|
|
|
|
"probeall"
|
|
|
|
"prune"
|
|
|
|
"post-install"
|
|
|
|
"post-remove"
|
|
|
|
"pre-install"
|
|
|
|
"pre-remove"
|
|
|
|
"remove"
|
|
|
|
"persistdir")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of additional font-lock-expressions
|
2003-03-22 13:00:38 +00:00
|
|
|
nil
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of additional automode-alist expressions
|
2005-03-23 10:48:20 +00:00
|
|
|
'("/etc/modules.conf" "/etc/conf.modules")
|
2005-03-21 17:10:57 +00:00
|
|
|
;; List of set up functions to call
|
2005-05-12 13:19:29 +00:00
|
|
|
nil))
|
1999-10-16 03:59:43 +00:00
|
|
|
|
1998-03-17 23:49:33 +00:00
|
|
|
(provide 'generic-x)
|
|
|
|
|
2003-09-01 15:45:59 +00:00
|
|
|
;;; arch-tag: cde692a5-9ff6-4506-9999-c67999c2bdb5
|
1998-03-17 23:49:33 +00:00
|
|
|
;;; generic-x.el ends here
|