[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/generic-x.el
From: |
Lute Kamstra |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/generic-x.el |
Date: |
Mon, 21 Mar 2005 12:10:57 -0500 |
Index: emacs/lisp/generic-x.el
diff -c emacs/lisp/generic-x.el:1.22 emacs/lisp/generic-x.el:1.23
*** emacs/lisp/generic-x.el:1.22 Mon Dec 29 11:20:42 2003
--- emacs/lisp/generic-x.el Mon Mar 21 17:10:57 2005
***************
*** 1,6 ****
! ;;; generic-x.el --- Extra Modes for generic-mode -*- no-byte-compile: t -*-
! ;; Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc.
;; Author: Peter Breton <address@hidden>
;; Created: Tue Oct 08 1996
--- 1,6 ----
! ;;; generic-x.el --- Extra Modes for generic-mode
! ;; Copyright (C) 1997, 1998, 2003, 2005 Free Software Foundation, Inc.
;; Author: Peter Breton <address@hidden>
;; Created: Tue Oct 08 1996
***************
*** 34,40 ****
;; (require 'generic-x)
;;
;; You can decide which modes to load by setting the variable
! ;; `generic-extras-enable-list'. Some platform-specific modes are
;; affected by the variables `generic-define-mswindows-modes' and
;; `generic-define-unix-modes' (which see).
;;
--- 34,40 ----
;; (require 'generic-x)
;;
;; You can decide which modes to load by setting the variable
! ;; `generic-extras-enable-list'. Some platform-specific modes are
;; affected by the variables `generic-define-mswindows-modes' and
;; `generic-define-unix-modes' (which see).
;;
***************
*** 92,98 ****
;;; Code:
- (require 'generic)
(require 'font-lock)
(defgroup generic-x nil
--- 92,97 ----
***************
*** 103,155 ****
(defcustom generic-extras-enable-list nil
"*List of generic modes to enable by default.
! Each entry in the list should be a symbol.
! The variables `generic-define-mswindows-modes' and `generic-define-unix-modes'
! also affect which generic modes are defined.
! Please note that if you set this variable after generic-x is loaded,
! you must reload generic-x to enable the specified modes."
:group 'generic-x
! :type '(repeat sexp)
! )
(defcustom generic-define-mswindows-modes
! (memq system-type (list 'windows-nt 'ms-dos))
"*If non-nil, some MS-Windows specific generic modes will be defined."
:group 'generic-x
! :type 'boolean
! )
(defcustom generic-define-unix-modes
! (not (memq system-type (list 'windows-nt 'ms-dos)))
"*If non-nil, some Unix specific generic modes will be defined."
:group 'generic-x
! :type 'boolean
! )
(and generic-define-mswindows-modes
! (setq generic-extras-enable-list
! (append (list 'bat-generic-mode 'ini-generic-mode
! 'inf-generic-mode 'rc-generic-mode
! 'reg-generic-mode 'rul-generic-mode
! 'hosts-generic-mode
! 'apache-conf-generic-mode
! 'apache-log-generic-mode
! )
! generic-extras-enable-list)))
(and generic-define-unix-modes
(setq generic-extras-enable-list
(append (list 'apache-conf-generic-mode
'apache-log-generic-mode
'samba-generic-mode
! 'hosts-generic-mode 'fvwm-generic-mode
'x-resource-generic-mode
'alias-generic-mode
'inetd-conf-generic-mode
'etc-services-generic-mode
'etc-passwd-generic-mode
! 'etc-fstab-generic-mode
! )
generic-extras-enable-list)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- 102,153 ----
(defcustom generic-extras-enable-list nil
"*List of generic modes to enable by default.
! Each entry in the list should be a symbol. The variables
! `generic-define-mswindows-modes' and `generic-define-unix-modes'
! also affect which generic modes are defined. Please note that if
! you set this variable after generic-x is loaded, you must reload
! generic-x to enable the specified modes."
:group 'generic-x
! :type '(repeat sexp))
(defcustom generic-define-mswindows-modes
! (memq system-type '(windows-nt ms-dos))
"*If non-nil, some MS-Windows specific generic modes will be defined."
:group 'generic-x
! :type 'boolean)
(defcustom generic-define-unix-modes
! (not (memq system-type '(windows-nt ms-dos)))
"*If non-nil, some Unix specific generic modes will be defined."
:group 'generic-x
! :type 'boolean)
(and generic-define-mswindows-modes
! (setq generic-extras-enable-list
! (append (list 'bat-generic-mode
! 'ini-generic-mode
! 'inf-generic-mode
! 'rc-generic-mode
! 'reg-generic-mode
! 'rul-generic-mode
! 'hosts-generic-mode
! 'apache-conf-generic-mode
! 'apache-log-generic-mode)
! generic-extras-enable-list)))
(and generic-define-unix-modes
(setq generic-extras-enable-list
(append (list 'apache-conf-generic-mode
'apache-log-generic-mode
'samba-generic-mode
! 'hosts-generic-mode
! 'fvwm-generic-mode
'x-resource-generic-mode
'alias-generic-mode
'inetd-conf-generic-mode
'etc-services-generic-mode
'etc-passwd-generic-mode
! 'etc-fstab-generic-mode)
generic-extras-enable-list)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
***************
*** 157,538 ****
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Apache
! (and
! (memq 'apache-conf-generic-mode generic-extras-enable-list)
! (define-generic-mode 'apache-conf-generic-mode
! (list ?#)
! nil
! '(("^\\s-*\\(<.*>\\)" 1 'font-lock-constant-face)
! ("^\\s-*\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face))
! (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'")
! (list
! (function
! (lambda ()
(setq imenu-generic-expression
'((nil "^\\([-A-Za-z0-9_]+\\)" 1)
("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1)
! ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1)
! ))
! )))
! "Generic mode for Apache or HTTPD configuration files."))
! (and
! (memq 'apache-log-generic-mode generic-extras-enable-list)
! (define-generic-mode 'apache-log-generic-mode
nil
nil
;; Hostname ? user date request return-code number-of-bytes
'(("^\\([-a-zA-z0-9.]+\\) - [-A-Za-z]+ \\(\\[.*\\]\\)"
(1 font-lock-constant-face)
! (2 font-lock-variable-name-face))
! )
(list "access_log\\'")
nil
"Mode for Apache log files"))
;;; Samba
! (and
! (memq 'samba-generic-mode generic-extras-enable-list)
! (define-generic-mode 'samba-generic-mode
! (list ?\; ?#)
! nil
! '(
! ("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)
! ("^\\s-*\\(.+\\)=\\([^\r\n]*\\)"
! (1 'font-lock-variable-name-face)
! (2 'font-lock-type-face))
! )
! (list "smb\\.conf\\'")
! (list 'generic-bracket-support)
! "Generic mode for Samba configuration files."))
;;; Fvwm
;; This is pretty basic. Also, modes for other window managers could
;; be defined as well.
! (and
! (memq 'fvwm-generic-mode generic-extras-enable-list)
! (define-generic-mode 'fvwm-generic-mode
! (list ?#)
! (list
! "AddToMenu"
! "AddToFunc"
! "ButtonStyle"
! "EndFunction"
! "EndPopup"
! "Function"
! "IconPath"
! "Key"
! "ModulePath"
! "Mouse"
! "PixmapPath"
! "Popup"
! "Style"
! )
! nil
! (list "\\.fvwmrc\\'" "\\.fvwm2rc\\'")
! nil
! "Generic mode for FVWM configuration files."))
;;; 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
! (and
! (memq 'x-resource-generic-mode generic-extras-enable-list)
! (define-generic-mode 'x-resource-generic-mode
! (list ?!)
! nil
! '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face))
! (list "\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'")
! nil
! "Generic mode for X Resource configuration files."))
;;; Hosts
! (and
! (memq 'hosts-generic-mode generic-extras-enable-list)
! (define-generic-mode 'hosts-generic-mode
! (list ?#)
! (list "localhost")
! '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face))
! (list "[hH][oO][sS][tT][sS]\\'")
! nil
! "Generic mode for HOSTS files."))
;;; Windows INF files
! (and
! (memq 'inf-generic-mode generic-extras-enable-list)
! (define-generic-mode 'inf-generic-mode
! (list ?\;)
! nil
! '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face))
! (list "\\.[iI][nN][fF]\\'")
! (list 'generic-bracket-support)
! "Generic mode for MS-Windows INF files."))
;;; Windows INI files
;; Should define escape character as well!
! (and
! (memq 'ini-generic-mode generic-extras-enable-list)
! (define-generic-mode 'ini-generic-mode
! (list ?\;)
! nil
! '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)
! ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$"
! (1 font-lock-function-name-face)
! (2 font-lock-variable-name-face)))
! (list "\\.[iI][nN][iI]\\'")
! (list
! (function
! (lambda ()
! (setq imenu-generic-expression
! '((nil "^\\[\\(.*\\)\\]" 1)
! ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))
! )))
! "Generic mode for MS-Windows INI files."))
;;; Windows REG files
;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
! (and
! (memq 'reg-generic-mode generic-extras-enable-list)
! (define-generic-mode 'reg-generic-mode
! '(?\;)
! '("key" "classes_root" "REGEDIT" "REGEDIT4")
! '(("\\(\\[.*]\\)" 1 'font-lock-constant-face)
! ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face))
! '("\\.[rR][eE][gG]\\'")
! (list
! (function
! (lambda ()
! (setq imenu-generic-expression
! '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
! "Generic mode for MS-Windows Registry files."))
;;; DOS/Windows BAT files
! (if (not (memq 'bat-generic-mode generic-extras-enable-list))
! nil
! (define-generic-mode 'bat-generic-mode
! nil
! nil
! (list
! ;; Make this one first in the list, otherwise comments will
! ;; be over-written by other variables
! (list "^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 'font-lock-comment-face t)
! (list "^[ \t]*\\(::.*\\)" 1
'font-lock-comment-face t)
! (list
! "^[@ \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.
! (list
! "^[@ \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
! (list
! "for"
! "if"
! )
! 'font-lock-keyword-face "^[@ \t]*")
! ;; These keywords can be anywhere on a line
! ;; In `generic-bat-mode-setup-function' we make the keywords
! ;; case-insensitive
! (generic-make-keywords-list
! (list
! "do"
! "exist"
! "errorlevel"
! "goto"
! "not"
! ) 'font-lock-keyword-face)
! ;; These are built-in commands. Only frequently-used ones are listed.
! (generic-make-keywords-list
! (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"
! "PROMPT" "prompt" "Prompt"
! "RD" "rd" "Rd"
! "REN" "ren" "Ren"
! "SET" "set" "Set"
! "START" "start" "Start"
! "SHIFT" "shift" "Shift"
! ) 'font-lock-builtin-face "[ \t|\n]")
! (list "^[ \t]*\\(:\\sw+\\)" 1 'font-lock-function-name-face t)
! (list "\\(%\\sw+%\\)" 1 'font-lock-variable-name-face t)
! (list "\\(%[0-9]\\)" 1 'font-lock-variable-name-face t)
! (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face)
! (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face)
! (list "[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
! '(1 font-lock-keyword-face)
! '(2 font-lock-function-name-face nil t))
! (list "[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?"
! '(1 font-lock-builtin-face)
! '(2 font-lock-variable-name-face t t))
! )
(list
! "\\.[bB][aA][tT]\\'"
! "\\`[cC][oO][nN][fF][iI][gG]\\."
! "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\." )
! (list 'generic-bat-mode-setup-function)
! "Generic mode for MS-Windows BAT files.")
!
! (defvar bat-generic-mode-syntax-table nil
! "Syntax table in use in bat-generic-mode buffers.")
!
! (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)))))
!
! (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
! (if bat-generic-mode-syntax-table
! nil
! (setq bat-generic-mode-syntax-table (make-syntax-table))
! (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
!
! ;; bat-generic-mode doesn't use the comment functionality of generic-mode
! ;; because it has a three-letter comment-string, so we do it
! ;; here manually instead
! (defun generic-bat-mode-setup-function ()
! (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))
! parse-sexp-ignore-comments t
! comment-end ""
! comment-start "REM "
! comment-start-skip "[Rr][Ee][Mm] *"
! )
! (set-syntax-table bat-generic-mode-syntax-table)
! ;; Make keywords case-insensitive
! (setq font-lock-defaults (list 'generic-font-lock-defaults nil t))
! (use-local-map bat-generic-mode-keymap)
! )
! )
;;; Mailagent
;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode
;; for procmail?
! (and
! (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
! (define-generic-mode 'mailagent-rules-generic-mode
! (list ?#)
! (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
! '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face)
! ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-constant-face))
! (list "\\.rules\\'")
! (list 'mailagent-rules-setup-function)
! "Mode for Mailagent rules files.")
(defun mailagent-rules-setup-function ()
! (make-local-variable 'imenu-generic-expression)
! (setq imenu-generic-expression
! '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))
! )
;; Solaris/Sys V prototype files
! (and
! (memq 'prototype-generic-mode generic-extras-enable-list)
! (define-generic-mode 'prototype-generic-mode
! (list ?#)
! 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))
! )
! (list "prototype\\'")
! nil
! "Mode for Sys V prototype files."))
;; Solaris/Sys V pkginfo files
! (and
! (memq 'pkginfo-generic-mode generic-extras-enable-list)
! (define-generic-mode 'pkginfo-generic-mode
! (list ?#)
! nil
! '(
! ("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
! (1 font-lock-keyword-face)
! (2 font-lock-variable-name-face))
! )
! (list "pkginfo\\'")
! nil
! "Mode for Sys V pkginfo files."))
;; Javascript mode
;; Includes extra keywords from Armando Singer address@hidden
! (define-generic-mode 'javascript-generic-mode
(list "//" '("/*" . "*/"))
(list
"break"
--- 155,499 ----
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Apache
! (when (memq 'apache-conf-generic-mode generic-extras-enable-list)
! (define-generic-mode apache-conf-generic-mode
! (list ?#)
! nil
! '(("^\\s-*\\(<.*>\\)" 1 'font-lock-constant-face)
! ("^\\s-*\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face))
! (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'")
! (list
! (function
! (lambda ()
(setq imenu-generic-expression
'((nil "^\\([-A-Za-z0-9_]+\\)" 1)
("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1)
! ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1))))))
! "Generic mode for Apache or HTTPD configuration files."))
! (when (memq 'apache-log-generic-mode generic-extras-enable-list)
! (define-generic-mode apache-log-generic-mode
nil
nil
;; Hostname ? user date request return-code number-of-bytes
'(("^\\([-a-zA-z0-9.]+\\) - [-A-Za-z]+ \\(\\[.*\\]\\)"
(1 font-lock-constant-face)
! (2 font-lock-variable-name-face)))
(list "access_log\\'")
nil
"Mode for Apache log files"))
;;; Samba
! (when (memq 'samba-generic-mode generic-extras-enable-list)
! (define-generic-mode samba-generic-mode
! (list ?\; ?#)
! nil
! '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)
! ("^\\s-*\\(.+\\)=\\([^\r\n]*\\)"
! (1 'font-lock-variable-name-face)
! (2 'font-lock-type-face)))
! (list "smb\\.conf\\'")
! (list 'generic-bracket-support)
! "Generic mode for Samba configuration files."))
;;; Fvwm
;; This is pretty basic. Also, modes for other window managers could
;; be defined as well.
! (when (memq 'fvwm-generic-mode generic-extras-enable-list)
! (define-generic-mode fvwm-generic-mode
! (list ?#)
! (list
! "AddToMenu"
! "AddToFunc"
! "ButtonStyle"
! "EndFunction"
! "EndPopup"
! "Function"
! "IconPath"
! "Key"
! "ModulePath"
! "Mouse"
! "PixmapPath"
! "Popup"
! "Style")
! nil
! (list "\\.fvwmrc\\'" "\\.fvwm2rc\\'")
! nil
! "Generic mode for FVWM configuration files."))
;;; 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
! (when (memq 'x-resource-generic-mode generic-extras-enable-list)
! (define-generic-mode x-resource-generic-mode
! (list ?!)
! nil
! '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face))
! (list "\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'")
! nil
! "Generic mode for X Resource configuration files."))
;;; Hosts
! (when (memq 'hosts-generic-mode generic-extras-enable-list)
! (define-generic-mode hosts-generic-mode
! (list ?#)
! (list "localhost")
! '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face))
! (list "[hH][oO][sS][tT][sS]\\'")
! nil
! "Generic mode for HOSTS files."))
;;; Windows INF files
! (when (memq 'inf-generic-mode generic-extras-enable-list)
! (define-generic-mode inf-generic-mode
! (list ?\;)
! nil
! '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face))
! (list "\\.[iI][nN][fF]\\'")
! (list 'generic-bracket-support)
! "Generic mode for MS-Windows INF files."))
;;; Windows INI files
;; Should define escape character as well!
! (when (memq 'ini-generic-mode generic-extras-enable-list)
! (define-generic-mode ini-generic-mode
! (list ?\;)
! nil
! '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)
! ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$"
! (1 font-lock-function-name-face)
! (2 font-lock-variable-name-face)))
! (list "\\.[iI][nN][iI]\\'")
! (list
! (function
! (lambda ()
! (setq imenu-generic-expression
! '((nil "^\\[\\(.*\\)\\]" 1)
! ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
! "Generic mode for MS-Windows INI files."))
;;; Windows REG files
;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
! (when (memq 'reg-generic-mode generic-extras-enable-list)
! (define-generic-mode reg-generic-mode
! '(?\;)
! '("key" "classes_root" "REGEDIT" "REGEDIT4")
! '(("\\(\\[.*]\\)" 1 'font-lock-constant-face)
! ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face))
! '("\\.[rR][eE][gG]\\'")
! (list
! (function
! (lambda ()
! (setq imenu-generic-expression
! '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
! "Generic mode for MS-Windows Registry files."))
;;; DOS/Windows BAT files
! (when (memq 'bat-generic-mode generic-extras-enable-list)
! (define-generic-mode bat-generic-mode
! nil
! nil
! (list
! ;; Make this one first in the list, otherwise comments will
! ;; be over-written by other variables
! (list "^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 'font-lock-comment-face t)
! (list "^[ \t]*\\(::.*\\)" 1 'font-lock-comment-face t)
! (list
! "^[@ \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.
! (list
! "^[@ \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
! (list
! "for"
! "if")
! 'font-lock-keyword-face "^[@ \t]*")
! ;; These keywords can be anywhere on a line
! ;; In `generic-bat-mode-setup-function' we make the keywords
! ;; case-insensitive
! (generic-make-keywords-list
! (list
! "do"
! "exist"
! "errorlevel"
! "goto"
! "not")
! 'font-lock-keyword-face)
! ;; These are built-in commands. Only frequently-used ones are listed.
! (generic-make-keywords-list
(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"
! "PROMPT" "prompt" "Prompt"
! "RD" "rd" "Rd"
! "REN" "ren" "Ren"
! "SET" "set" "Set"
! "START" "start" "Start"
! "SHIFT" "shift" "Shift")
! 'font-lock-builtin-face "[ \t|\n]")
! (list "^[ \t]*\\(:\\sw+\\)" 1 'font-lock-function-name-face t)
! (list "\\(%\\sw+%\\)" 1 'font-lock-variable-name-face t)
! (list "\\(%[0-9]\\)" 1 'font-lock-variable-name-face t)
! (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face)
! (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face)
! (list "[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?"
! '(1 font-lock-keyword-face)
! '(2 font-lock-function-name-face nil t))
! (list "[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?"
! '(1 font-lock-builtin-face)
! '(2 font-lock-variable-name-face t t)))
! (list
! "\\.[bB][aA][tT]\\'"
! "\\`[cC][oO][nN][fF][iI][gG]\\."
! "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\." )
! (list 'generic-bat-mode-setup-function)
! "Generic mode for MS-Windows BAT files.")
!
! (defvar bat-generic-mode-syntax-table nil
! "Syntax table in use in bat-generic-mode buffers.")
!
! (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)))))
!
! (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))
! (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table))
!
! ;; bat-generic-mode doesn't use the comment functionality of generic-mode
! ;; because it has a three-letter comment-string, so we do it
! ;; here manually instead
! (defun generic-bat-mode-setup-function ()
! (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))
! parse-sexp-ignore-comments t
! comment-end ""
! comment-start "REM "
! comment-start-skip "[Rr][Ee][Mm] *")
! (set-syntax-table bat-generic-mode-syntax-table)
! ;; Make keywords case-insensitive
! (setq font-lock-defaults (list 'generic-font-lock-defaults nil t))
! (use-local-map bat-generic-mode-keymap)))
;;; Mailagent
;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode
;; for procmail?
! (when (memq 'mailagent-rules-generic-mode generic-extras-enable-list)
! (define-generic-mode mailagent-rules-generic-mode
! (list ?#)
! (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT")
! '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face)
! ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-constant-face))
! (list "\\.rules\\'")
! (list 'mailagent-rules-setup-function)
! "Mode for Mailagent rules files.")
(defun mailagent-rules-setup-function ()
! (make-local-variable 'imenu-generic-expression)
! (setq imenu-generic-expression
! '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1)))))
;; Solaris/Sys V prototype files
! (when (memq 'prototype-generic-mode generic-extras-enable-list)
! (define-generic-mode prototype-generic-mode
! (list ?#)
! 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)))
! (list "prototype\\'")
! nil
! "Mode for Sys V prototype files."))
;; Solaris/Sys V pkginfo files
! (when (memq 'pkginfo-generic-mode generic-extras-enable-list)
! (define-generic-mode pkginfo-generic-mode
! (list ?#)
! nil
! '(("^\\([A-Za-z_]+\\)=\\([^\n\r]*\\)$"
! (1 font-lock-keyword-face)
! (2 font-lock-variable-name-face)))
! (list "pkginfo\\'")
! nil
! "Mode for Sys V pkginfo files."))
;; Javascript mode
;; Includes extra keywords from Armando Singer address@hidden
! (define-generic-mode javascript-generic-mode
(list "//" '("/*" . "*/"))
(list
"break"
***************
*** 594,620 ****
"synchronized"
"throws"
"transient"
! "true"
! )
(list
(list "^\\s-*function\\s-+\\([A-Za-z0-9_]+\\)"
! '(1 font-lock-function-name-face))
! (list "^\\s-*var\\s-+\\([A-Za-z0-9_]+\\)"
! '(1 font-lock-variable-name-face))
! )
(list "\\.js\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
'((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)
! ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1)
! ))
! )))
"Mode for JavaScript files.")
;; VRML files
! (define-generic-mode 'vrml-generic-mode
(list ?#)
(list
"DEF"
--- 555,577 ----
"synchronized"
"throws"
"transient"
! "true")
(list
(list "^\\s-*function\\s-+\\([A-Za-z0-9_]+\\)"
! '(1 font-lock-function-name-face))
! (list "^\\s-*var\\s-+\\([A-Za-z0-9_]+\\)"
! '(1 font-lock-variable-name-face)))
(list "\\.js\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
'((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)
! ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1))))))
"Mode for JavaScript files.")
;; VRML files
! (define-generic-mode vrml-generic-mode
(list ?#)
(list
"DEF"
***************
*** 644,651 ****
"textureTransform"
"title"
"transparency"
! "type"
! )
(list
(list "USE\\s-+\\([-A-Za-z0-9_]+\\)"
'(1 font-lock-constant-face))
--- 601,607 ----
"textureTransform"
"title"
"transparency"
! "type")
(list
(list "USE\\s-+\\([-A-Za-z0-9_]+\\)"
'(1 font-lock-constant-face))
***************
*** 656,663 ****
'(1 font-lock-function-name-face))
(list
"^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
! '(2 font-lock-variable-name-face))
! )
(list "\\.wrl\\'")
(list
(function
--- 612,618 ----
'(1 font-lock-function-name-face))
(list
"^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)"
! '(2 font-lock-variable-name-face)))
(list "\\.wrl\\'")
(list
(function
***************
*** 666,677 ****
'((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
("*Definitions*"
"DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
! 1)))
! )))
"Generic Mode for VRML files.")
;; Java Manifests
! (define-generic-mode 'java-manifest-generic-mode
(list ?#)
(list
"Name"
--- 621,631 ----
'((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1)
("*Definitions*"
"DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
! 1))))))
"Generic Mode for VRML files.")
;; Java Manifests
! (define-generic-mode java-manifest-generic-mode
(list ?#)
(list
"Name"
***************
*** 681,706 ****
"Signature-Version"
"Magic"
"Java-Bean"
! "Depends-On"
! )
'(("^Name:\\s-+\\([^\n\r]*\\)$"
(1 font-lock-variable-name-face))
("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
! (2 font-lock-constant-face))
! )
(list "[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
nil
"Mode for Java Manifest files")
;; Java properties files
! (define-generic-mode 'java-properties-generic-mode
(list ?! ?#)
nil
(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
--- 635,657 ----
"Signature-Version"
"Magic"
"Java-Bean"
! "Depends-On")
'(("^Name:\\s-+\\([^\n\r]*\\)$"
(1 font-lock-variable-name-face))
("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$"
! (2 font-lock-constant-face)))
(list "[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
nil
"Mode for Java Manifest files")
;; Java properties files
! (define-generic-mode java-properties-generic-mode
(list ?! ?#)
nil
(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
***************
*** 711,853 ****
(list
(concat "^" java-properties-key elt java-properties-value "$")
'(1 font-lock-constant-face)
! '(4 font-lock-variable-name-face)
! )))
;; These are the separators
! (list ":\\s-*" "\\s-+" "\\s-*=\\s-*")
! )
! )
nil
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([^#! \t\n\r=:]+\\)" 1)))
! )))
"Mode for Java properties files.")
;; C shell alias definitions
! (and
! (memq 'alias-generic-mode generic-extras-enable-list)
! (define-generic-mode 'alias-generic-mode
(list ?#)
(list "alias" "unalias")
'(("^alias\\s-+\\([-A-Za-z0-9_]+\\)\\s-+"
(1 font-lock-variable-name-face))
("^unalias\\s-+\\([-A-Za-z0-9_]+\\)\\s-*$"
! (1 font-lock-variable-name-face))
! )
(list "alias\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2)))
! )))
! "Mode for C Shell alias files.")
! )
;;; Windows RC files
;; Contributed by address@hidden (Alfred Correira)
! (and
! (memq 'rc-generic-mode generic-extras-enable-list)
! (define-generic-mode 'rc-generic-mode
! ;; (list ?\/)
! (list "//")
! '("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
! (list
! (eval-when-compile
! (generic-make-keywords-list
! (list
! "FILEFLAGSMASK"
! "FILEFLAGS"
! "FILEOS"
! "FILESUBTYPE"
! "FILETYPE"
! "FILEVERSION"
! "PRODUCTVERSION"
! ) 'font-lock-type-face))
! (eval-when-compile
! (generic-make-keywords-list
! (list
! "BEGIN"
! "BLOCK"
! "END"
! "VALUE"
! ) 'font-lock-function-name-face))
! '("^#[ \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)))
! (list "\\.[rR][cC]$")
! nil
! "Generic mode for MS-Windows Resource files."))
;; InstallShield RUL files
;; Contributed by address@hidden
;; Bugfixes by "Rolf Sandau" <address@hidden>
! (and
! (memq 'rul-generic-mode generic-extras-enable-list)
;;; build the regexp strings using regexp-opt
(defvar installshield-statement-keyword-list
(list
--- 662,794 ----
(list
(concat "^" java-properties-key elt java-properties-value "$")
'(1 font-lock-constant-face)
! '(4 font-lock-variable-name-face))))
;; These are the separators
! (list ":\\s-*" "\\s-+" "\\s-*=\\s-*")))
nil
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([^#! \t\n\r=:]+\\)" 1))))))
"Mode for Java properties files.")
;; C shell alias definitions
! (when (memq 'alias-generic-mode generic-extras-enable-list)
! (define-generic-mode alias-generic-mode
(list ?#)
(list "alias" "unalias")
'(("^alias\\s-+\\([-A-Za-z0-9_]+\\)\\s-+"
(1 font-lock-variable-name-face))
("^unalias\\s-+\\([-A-Za-z0-9_]+\\)\\s-*$"
! (1 font-lock-variable-name-face)))
(list "alias\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))))))
! "Mode for C Shell alias files."))
;;; Windows RC files
;; Contributed by address@hidden (Alfred Correira)
! (when (memq 'rc-generic-mode generic-extras-enable-list)
! (define-generic-mode rc-generic-mode
! ;; (list ?\/)
! (list "//")
! '("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
! (list
! (eval-when-compile
! (generic-make-keywords-list
! (list
! "FILEFLAGSMASK"
! "FILEFLAGS"
! "FILEOS"
! "FILESUBTYPE"
! "FILETYPE"
! "FILEVERSION"
! "PRODUCTVERSION")
! 'font-lock-type-face))
! (eval-when-compile
! (generic-make-keywords-list
! (list
! "BEGIN"
! "BLOCK"
! "END"
! "VALUE")
! 'font-lock-function-name-face))
! '("^#[ \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)))
! (list "\\.[rR][cC]$")
! nil
! "Generic mode for MS-Windows Resource files."))
;; InstallShield RUL files
;; Contributed by address@hidden
;; Bugfixes by "Rolf Sandau" <address@hidden>
! (when (memq 'rul-generic-mode generic-extras-enable-list)
!
;;; build the regexp strings using regexp-opt
(defvar installshield-statement-keyword-list
(list
***************
*** 882,889 ****
"typedef"
"until"
"void"
! "while"
! )
"Statement keywords used in InstallShield 3 and 5.")
(defvar installshield-system-functions-list
--- 823,829 ----
"typedef"
"until"
"void"
! "while")
"Statement keywords used in InstallShield 3 and 5.")
(defvar installshield-system-functions-list
***************
*** 907,945 ****
"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"
--- 847,885 ----
"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"
***************
*** 965,976 ****
"FileDeleteLine"
"FileGrep"
"FileInsertLine"
! "FileSetBeginDefine" ; IS3 only
! "FileSetEndDefine" ; IS3 only
! "FileSetPerformEz" ; IS3 only
! "FileSetPerform" ; IS3 only
! "FileSetReset" ; IS3 only
! "FileSetRoot" ; IS3 only
"FindAllDirs"
"FindAllFiles"
"FindFile"
--- 905,916 ----
"FileDeleteLine"
"FileGrep"
"FileInsertLine"
! "FileSetBeginDefine" ; IS3 only
! "FileSetEndDefine" ; IS3 only
! "FileSetPerformEz" ; IS3 only
! "FileSetPerform" ; IS3 only
! "FileSetReset" ; IS3 only
! "FileSetRoot" ; IS3 only
"FindAllDirs"
"FindAllFiles"
"FindFile"
***************
*** 1024,1030 ****
"Path"
"PlaceBitmap"
"PlaceWindow"
! "PlayMMedia" ; IS5 only
"ProgDefGroupType"
"RegDBCreateKeyEx"
"RegDBDeleteValue"
--- 964,970 ----
"Path"
"PlaceBitmap"
"PlaceWindow"
! "PlayMMedia" ; IS5 only
"ProgDefGroupType"
"RegDBCreateKeyEx"
"RegDBDeleteValue"
***************
*** 1084,1090 ****
"SdSelectFolder"
"SdSetSequentialItems"
"SdSetStatic"
! "SdSetupTypeEx" ; IS5 only
"SdSetupType"
"SdShowAnyDialog"
"SdShowDlgEdit1"
--- 1024,1030 ----
"SdSelectFolder"
"SdSetSequentialItems"
"SdSetStatic"
! "SdSetupTypeEx" ; IS5 only
"SdSetupType"
"SdShowAnyDialog"
"SdShowDlgEdit1"
***************
*** 1101,1114 ****
"SetColor"
"SetFont"
"SetDialogTitle"
! "SetDisplayEffect" ; IS5 only
"SetFileInfo"
"SetForegroundWindow"
"SetStatusWindow"
"SetTitle"
"SetupType"
"ShowProgramFolder"
! "Split" ; IS3 only
"SprintfBox"
"Sprintf"
"StatusUpdate"
--- 1041,1054 ----
"SetColor"
"SetFont"
"SetDialogTitle"
! "SetDisplayEffect" ; IS5 only
"SetFileInfo"
"SetForegroundWindow"
"SetStatusWindow"
"SetTitle"
"SetupType"
"ShowProgramFolder"
! "Split" ; IS3 only
"SprintfBox"
"Sprintf"
"StatusUpdate"
***************
*** 1129,1136 ****
"Welcome"
"WriteLine"
"WriteProfString"
! "XCopyFile"
! )
"System functions defined in InstallShield 3 and 5.")
(defvar installshield-system-variables-list
--- 1069,1075 ----
"Welcome"
"WriteLine"
"WriteProfString"
! "XCopyFile")
"System functions defined in InstallShield 3 and 5.")
(defvar installshield-system-variables-list
***************
*** 1163,1170 ****
"WINDISK"
"WINMAJOR"
"WINSYSDIR"
! "WINSYSDISK"
! )
"System variables used in InstallShield 3 and 5.")
(defvar installshield-types-list
--- 1102,1108 ----
"WINDISK"
"WINMAJOR"
"WINSYSDIR"
! "WINSYSDISK")
"System variables used in InstallShield 3 and 5.")
(defvar installshield-types-list
***************
*** 1186,1193 ****
"RGB"
"SHORT"
"STRINGLIST"
! "STRING"
! )
"Type keywords used in InstallShield 3 and 5.")
;;; some might want to skip highlighting these to improve performance
--- 1124,1130 ----
"RGB"
"SHORT"
"STRINGLIST"
! "STRING")
"Type keywords used in InstallShield 3 and 5.")
;;; some might want to skip highlighting these to improve performance
***************
*** 1397,1507 ****
"WINMINOR"
"WIN32SINSTALLED"
"WIN32SMAJOR"
! "WIN32SMINOR"
! )
"Function argument constants used in InstallShield 3 and 5.")
! (progn
! (defvar rul-generic-mode-syntax-table nil
! "Syntax table to use in rul-generic-mode buffers.")
!
! (setq rul-generic-mode-syntax-table
! (make-syntax-table c++-mode-syntax-table))
!
! (modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
! (modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
!
! (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 ()
! (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 "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))
! parse-sexp-ignore-comments t
! comment-end "*/"
! comment-start "/*"
! ;; comment-end ""
! ;; comment-start "//"
! ;; comment-start-skip ""
! )
! ;; (set-syntax-table rul-generic-mode-syntax-table)
! (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
! (list "//" '("/*" . "*/" ))
! installshield-statement-keyword-list
! (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
! 'font-lock-variable-name-face "[^_]" "[^_]")
! ;; system functions
! (generic-make-keywords-list
! installshield-system-functions-list
! 'font-lock-function-name-face "[^_]" "[^_]")
! ;; type keywords
! (generic-make-keywords-list
! installshield-types-list
! 'font-lock-type-face "[^_]" "[^_]")
! ;; function argument constants
! (generic-make-keywords-list
! installshield-funarg-constants-list
! 'font-lock-variable-name-face "[^_]" "[^_]") ; is this face the best
choice?
! )
! (list "\\.[rR][uU][lL]$")
! (list 'generic-rul-mode-setup-function)
! "Generic mode for InstallShield RUL files.")
! )
(define-skeleton rul-if
! "Insert an if statement."
! "condition: "
! "if(" str ") then" \n
! > _ \n
! ( "other condition, %s: "
! > "elseif(" str ") then" \n
! > \n)
! > "else" \n
! > \n
! resume:
! > "endif;"
! )
(define-skeleton rul-function
"Insert a function statement."
"function: "
"function " str " ()" \n
( "local variables, %s: "
! > " " str ";" \n)
> "begin" \n
> _ \n
resume:
! > "end;")
!
! )
;; Additions by address@hidden (Alfred Correira)
! (define-generic-mode 'mailrc-generic-mode
(list ?#)
(list
"alias"
--- 1334,1437 ----
"WINMINOR"
"WIN32SINSTALLED"
"WIN32SMAJOR"
! "WIN32SMINOR")
"Function argument constants used in InstallShield 3 and 5.")
! (defvar rul-generic-mode-syntax-table nil
! "Syntax table to use in rul-generic-mode buffers.")
!
! (setq rul-generic-mode-syntax-table
! (make-syntax-table c++-mode-syntax-table))
!
! (modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
! (modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
!
! (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 ()
! (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 "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))
! parse-sexp-ignore-comments t
! comment-end "*/"
! comment-start "/*"
! ;;; comment-end ""
! ;;; comment-start "//"
! ;;; comment-start-skip ""
! )
! ;; (set-syntax-table rul-generic-mode-syntax-table)
! (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
! (list "//" '("/*" . "*/" ))
! installshield-statement-keyword-list
! (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
! 'font-lock-variable-name-face "[^_]" "[^_]")
! ;; system functions
! (generic-make-keywords-list
! installshield-system-functions-list
! 'font-lock-function-name-face "[^_]" "[^_]")
! ;; type keywords
! (generic-make-keywords-list
! installshield-types-list
! 'font-lock-type-face "[^_]" "[^_]")
! ;; function argument constants
! (generic-make-keywords-list
! installshield-funarg-constants-list
! 'font-lock-variable-name-face "[^_]" "[^_]")) ; is this face the best
choice?
! (list "\\.[rR][uU][lL]$")
! (list 'generic-rul-mode-setup-function)
! "Generic mode for InstallShield RUL files.")
!
(define-skeleton rul-if
! "Insert an if statement."
! "condition: "
! "if(" str ") then" \n
! > _ \n
! ( "other condition, %s: "
! > "elseif(" str ") then" \n
! > \n)
! > "else" \n
! > \n
! resume:
! > "endif;")
(define-skeleton rul-function
"Insert a function statement."
"function: "
"function " str " ()" \n
( "local variables, %s: "
! > " " str ";" \n)
> "begin" \n
> _ \n
resume:
! > "end;"))
;; Additions by address@hidden (Alfred Correira)
! (define-generic-mode mailrc-generic-mode
(list ?#)
(list
"alias"
***************
*** 1512,1519 ****
"ignore"
"set"
"source"
! "unset"
! )
'(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
(2 font-lock-constant-face) (3 font-lock-variable-name-face))
("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$"
--- 1442,1448 ----
"ignore"
"set"
"source"
! "unset")
'(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$"
(2 font-lock-constant-face) (3 font-lock-variable-name-face))
("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$"
***************
*** 1525,1534 ****
"Mode for mailrc files.")
;; Inetd.conf
! (and
! (memq 'inetd-conf-generic-mode generic-extras-enable-list)
! (define-generic-mode 'inetd-conf-generic-mode
(list ?#)
(list
"stream"
--- 1454,1462 ----
"Mode for mailrc files.")
;; Inetd.conf
! (when (memq 'inetd-conf-generic-mode generic-extras-enable-list)
! (define-generic-mode inetd-conf-generic-mode
(list ?#)
(list
"stream"
***************
*** 1537,1678 ****
"udp"
"wait"
"nowait"
! "internal"
! )
! '(
! ("^\\([-A-Za-z0-9_]+\\)"
! 1 'font-lock-type-face)
! )
'("/etc/inetd.conf\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([-A-Za-z0-9_]+\\)" 1)))
! )))
! )
! )
;; Services
! (and
! (memq 'etc-services-generic-mode generic-extras-enable-list)
! (define-generic-mode 'etc-services-generic-mode
(list ?#)
(list
"tcp"
"udp"
! "ddp"
! )
! '(
! ("^\\([-A-Za-z0-9_]+\\)\\s-+\\([0-9]+\\)/"
(1 'font-lock-type-face)
! (2 'font-lock-variable-name-face)
! )
! )
'("/etc/services\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([-A-Za-z0-9_]+\\)" 1)))
! )))
! )
! )
;; Password and Group files
! (and
! (memq 'etc-passwd-generic-mode generic-extras-enable-list)
! (define-generic-mode 'etc-passwd-generic-mode
nil ;; No comment characters
(list "root") ;; Only one keyword
(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)
! )
! )
'("/etc/passwd\\'" "/etc/group\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([-A-Za-z0-9_]+\\):" 1)))
! )))
! )
! )
;; Fstab
! (and
! (memq 'etc-fstab-generic-mode generic-extras-enable-list)
! (define-generic-mode 'etc-fstab-generic-mode
(list ?#)
(list
"ext2"
! "fd"
"iso9660"
"nfs"
"proc"
! "swap"
"ufs"
! )
! '(
! ("^\\([/-A-Za-z0-9_]+\\)\\s-+\\([/-A-Za-z0-9_]+\\)"
(1 'font-lock-type-face)
! (2 'font-lock-variable-name-face)
! )
! )
'("/etc/[v]*fstab\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1)))
! )))
! )
! )
;; From Jacques Duthen <address@hidden>
(defvar show-tabs-generic-mode-font-lock-defaults-1
! '( ;; trailing spaces must come before...
! ("[ \t]+$" . 'show-tabs-space-face)
! ;; ...embedded tabs
! ("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab-face))))
(defvar show-tabs-generic-mode-font-lock-defaults-2
! '( ;; trailing spaces must come before...
! ("[ \t]+$" . 'show-tabs-space-face)
! ;; ...tabs
! ("\t+" . 'show-tabs-tab-face)))
(defface show-tabs-tab-face
'((((class grayscale) (background light)) (:foreground "LightGray" :weight
bold))
--- 1465,1603 ----
"udp"
"wait"
"nowait"
! "internal")
! '(("^\\([-A-Za-z0-9_]+\\)"
! 1 'font-lock-type-face))
'("/etc/inetd.conf\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
;; Services
! (when (memq 'etc-services-generic-mode generic-extras-enable-list)
! (define-generic-mode etc-services-generic-mode
(list ?#)
(list
"tcp"
"udp"
! "ddp")
! '(("^\\([-A-Za-z0-9_]+\\)\\s-+\\([0-9]+\\)/"
(1 'font-lock-type-face)
! (2 'font-lock-variable-name-face)))
'("/etc/services\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
;; Password and Group files
! (when (memq 'etc-passwd-generic-mode generic-extras-enable-list)
! (define-generic-mode etc-passwd-generic-mode
nil ;; No comment characters
(list "root") ;; Only one keyword
(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)))
'("/etc/passwd\\'" "/etc/group\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))))
;; Fstab
! (when (memq 'etc-fstab-generic-mode generic-extras-enable-list)
! (define-generic-mode etc-fstab-generic-mode
(list ?#)
(list
+ "adfs"
+ "affs"
+ "autofs"
+ "coda"
+ "coherent"
+ "cramfs"
+ "devpts"
+ "efs"
"ext2"
! "ext3"
! "hfs"
! "hpfs"
"iso9660"
+ "jfs"
+ "minix"
+ "msdos"
+ "ncpfs"
"nfs"
+ "ntfs"
"proc"
! "qnx4"
! "reiserfs"
! "romfs"
! "smbfs"
! "sysv"
! "tmpfs"
! "udf"
"ufs"
! "umsdos"
! "vfat"
! "xenix"
! "xfs"
! "swap"
! "auto"
! "ignore")
! '(("^\\([/-A-Za-z0-9_]+\\)\\s-+\\([/-A-Za-z0-9_]+\\)"
(1 'font-lock-type-face)
! (2 'font-lock-variable-name-face)))
'("/etc/[v]*fstab\\'")
(list
(function
(lambda ()
(setq imenu-generic-expression
! '((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1))))))))
;; From Jacques Duthen <address@hidden>
(defvar show-tabs-generic-mode-font-lock-defaults-1
! '( ;; trailing spaces must come before...
! ("[ \t]+$" . 'show-tabs-space-face)
! ;; ...embedded tabs
! ("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab-face))))
(defvar show-tabs-generic-mode-font-lock-defaults-2
! '( ;; trailing spaces must come before...
! ("[ \t]+$" . 'show-tabs-space-face)
! ;; ...tabs
! ("\t+" . 'show-tabs-tab-face)))
(defface show-tabs-tab-face
'((((class grayscale) (background light)) (:foreground "LightGray" :weight
bold))
***************
*** 1692,1701 ****
"Font Lock mode face used to highlight spaces."
:group 'show-tabs)
! (define-generic-mode 'show-tabs-generic-mode
() ;; no comment char
() ;; no keywords
! show-tabs-generic-mode-font-lock-defaults-1
() ;; no auto-mode-alist
;; (list 'show-tabs-generic-mode-hook-fun)
nil
--- 1617,1626 ----
"Font Lock mode face used to highlight spaces."
:group 'show-tabs)
! (define-generic-mode show-tabs-generic-mode
() ;; no comment char
() ;; no keywords
! show-tabs-generic-mode-font-lock-defaults-1
() ;; no auto-mode-alist
;; (list 'show-tabs-generic-mode-hook-fun)
nil
***************
*** 1705,1745 ****
;; DNS modes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
! (define-generic-mode 'named-boot-generic-mode
! ;;List of comment characters
! (list ?\;)
! ;;List of keywords
(list "cache" "primary" "secondary" "forwarders" "limit" "options"
"directory" "check-names")
! ;;List of additional font-lock-expressions
(list
(list "\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face)
(list "^directory\\s-+\\(.*\\)" 1 'font-lock-variable-name-face)
(list "^\\(primary\\|cache\\)\\s-+\\([.A-Za-z]+\\)\\s-+\\(.*\\)"
(list 2 'font-lock-variable-name-face)
! (list 3 'font-lock-constant-face))
! )
! ;;List of additional automode-alist expressions
(list "/etc/named.boot\\'")
! ;;List of set up functions to call
! nil
! )
! (define-generic-mode 'named-database-generic-mode
! ;;List of comment characters
(list ?\;)
! ;;List of keywords
(list "IN" "NS" "CNAME" "SOA" "PTR" "MX" "A")
! ;;List of additional font-lock-expressions
(list
(list "\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face)
! (list "^\\([.A-Za-z0-9]+\\)" 1 'font-lock-variable-name-face)
! )
! ;;List of additional automode-alist expressions
! nil
! ;;List of set up functions to call
nil
! )
(defvar named-database-time-string "%Y%m%d%H"
"Timestring for named serial numbers.")
--- 1630,1666 ----
;; DNS modes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
! (define-generic-mode named-boot-generic-mode
! ;; List of comment characters
! (list ?\;)
! ;; List of keywords
(list "cache" "primary" "secondary" "forwarders" "limit" "options"
"directory" "check-names")
! ;; List of additional font-lock-expressions
(list
(list "\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face)
(list "^directory\\s-+\\(.*\\)" 1 'font-lock-variable-name-face)
(list "^\\(primary\\|cache\\)\\s-+\\([.A-Za-z]+\\)\\s-+\\(.*\\)"
(list 2 'font-lock-variable-name-face)
! (list 3 'font-lock-constant-face)))
! ;; List of additional automode-alist expressions
(list "/etc/named.boot\\'")
! ;; List of set up functions to call
! nil)
! (define-generic-mode named-database-generic-mode
! ;; List of comment characters
(list ?\;)
! ;; List of keywords
(list "IN" "NS" "CNAME" "SOA" "PTR" "MX" "A")
! ;; List of additional font-lock-expressions
(list
(list "\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face)
! (list "^\\([.A-Za-z0-9]+\\)" 1 'font-lock-variable-name-face))
! ;; List of additional automode-alist expressions
nil
! ;; List of set up functions to call
! nil)
(defvar named-database-time-string "%Y%m%d%H"
"Timestring for named serial numbers.")
***************
*** 1747,1773 ****
(defun named-database-print-serial ()
"Print a serial number based on the current date."
(interactive)
! (insert (format-time-string named-database-time-string (current-time)))
! )
! (define-generic-mode 'resolve-conf-generic-mode
! ;;List of comment characters
(list ?#)
! ;;List of keywords
(list "nameserver" "domain" "search" "sortlist" "options")
! ;;List of additional font-lock-expressions
nil
! ;;List of additional automode-alist expressions
(list "/etc/resolv[e]?.conf\\'")
! ;;List of set up functions to call
! nil
! )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Modes for spice and common electrical engineering circuit netlist formats
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
! (define-generic-mode 'spice-generic-mode
nil
(list
"and"
--- 1668,1692 ----
(defun named-database-print-serial ()
"Print a serial number based on the current date."
(interactive)
! (insert (format-time-string named-database-time-string (current-time))))
! (define-generic-mode resolve-conf-generic-mode
! ;; List of comment characters
(list ?#)
! ;; List of keywords
(list "nameserver" "domain" "search" "sortlist" "options")
! ;; List of additional font-lock-expressions
nil
! ;; List of additional automode-alist expressions
(list "/etc/resolv[e]?.conf\\'")
! ;; List of set up functions to call
! nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Modes for spice and common electrical engineering circuit netlist formats
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
! (define-generic-mode spice-generic-mode
nil
(list
"and"
***************
*** 1784,1791 ****
"vccap"
"vccs"
"vcr"
! "vcvs"
! )
'(
("^\\s-*\\([*].*\\)" 1 'font-lock-comment-face)
(" \\(\\$ .*\\)$" 1 'font-lock-comment-face)
--- 1703,1709 ----
"vccap"
"vccs"
"vcr"
! "vcvs")
'(
("^\\s-*\\([*].*\\)" 1 'font-lock-comment-face)
(" \\(\\$ .*\\)$" 1 'font-lock-comment-face)
***************
*** 1795,1802 ****
("^\\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)
! )
(list "\\.[sS][pP]\\'"
"\\.[sS][pP][iI]\\'"
"\\.[sS][pP][iI][cC][eE]\\'"
--- 1713,1719 ----
("^\\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))
(list "\\.[sS][pP]\\'"
"\\.[sS][pP][iI]\\'"
"\\.[sS][pP][iI][cC][eE]\\'"
***************
*** 1806,1829 ****
;; Make keywords case-insensitive
(function
(lambda()
! (setq font-lock-defaults (list 'generic-font-lock-defaults nil t))))
! )
! "Generic mode for SPICE circuit netlist files."
! )
! (define-generic-mode 'ibis-generic-mode
(list ?|)
nil
'(
("[[]\\([^]]*\\)[]]" 1 'font-lock-keyword-face)
! ("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 'font-lock-variable-name-face)
! )
(list "\\.[iI][bB][sS]\\'")
(list 'generic-bracket-support)
! "Generic mode for IBIS circuit netlist files."
! )
! (define-generic-mode 'astap-generic-mode
nil
(list
"analyze"
--- 1723,1742 ----
;; Make keywords case-insensitive
(function
(lambda()
! (setq font-lock-defaults (list 'generic-font-lock-defaults nil t)))))
! "Generic mode for SPICE circuit netlist files.")
! (define-generic-mode ibis-generic-mode
(list ?|)
nil
'(
("[[]\\([^]]*\\)[]]" 1 'font-lock-keyword-face)
! ("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 'font-lock-variable-name-face))
(list "\\.[iI][bB][sS]\\'")
(list 'generic-bracket-support)
! "Generic mode for IBIS circuit netlist files.")
! (define-generic-mode astap-generic-mode
nil
(list
"analyze"
***************
*** 1838,1853 ****
"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)
! )
(list "\\.[aA][pP]\\'"
"\\.[aA][sS][xX]\\'"
"\\.[aA][sS][tT][aA][pP]\\'"
--- 1751,1763 ----
"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))
(list "\\.[aA][pP]\\'"
"\\.[aA][sS][xX]\\'"
"\\.[aA][sS][tT][aA][pP]\\'"
***************
*** 1859,1873 ****
;; Make keywords case-insensitive
(function
(lambda()
! (setq font-lock-defaults (list 'generic-font-lock-defaults nil t))))
! )
! "Generic mode for ASTAP circuit netlist files."
! )
! (define-generic-mode 'etc-modules-conf-generic-mode
! ;;List of comment characters
(list ?#)
! ;;List of keywords
(list
"above"
"alias"
--- 1769,1781 ----
;; Make keywords case-insensitive
(function
(lambda()
! (setq font-lock-defaults (list 'generic-font-lock-defaults nil t)))))
! "Generic mode for ASTAP circuit netlist files.")
! (define-generic-mode etc-modules-conf-generic-mode
! ;; List of comment characters
(list ?#)
! ;; List of keywords
(list
"above"
"alias"
***************
*** 1900,1912 ****
"pre-remove"
"remove"
"persistdir")
! ;;List of additional font-lock-expressions
nil
! ;;List of additional automode-alist expressions
(list "/etc/modules.conf" "/etc/conf.modules")
! ;;List of set up functions to call
! nil
! )
(provide 'generic-x)
--- 1808,1819 ----
"pre-remove"
"remove"
"persistdir")
! ;; List of additional font-lock-expressions
nil
! ;; List of additional automode-alist expressions
(list "/etc/modules.conf" "/etc/conf.modules")
! ;; List of set up functions to call
! nil)
(provide 'generic-x)
- [Emacs-diffs] Changes to emacs/lisp/generic-x.el,
Lute Kamstra <=