+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; 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.")
+
+(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"
+ "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)
+ )
+ (list "\\.[sS][pP]\\'"
+ "\\.[sS][pP][iI]\\'"
+ "\\.[sS][pP][iI][cC][eE]\\'"
+ "\\.[iI][nN][cC]\\'")
+ (list
+ 'generic-bracket-support
+ ;; 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"
+ "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)
+ )
+ (list "\\.[aA][pP]\\'"
+ "\\.[aA][sS][xX]\\'"
+ "\\.[aA][sS][tT][aA][pP]\\'"
+ "\\.[pP][sS][pP]\\'"
+ "\\.[dD][eE][cC][kK]\\'"
+ "\\.[gG][oO][dD][aA][tT][aA]")
+ (list
+ 'generic-bracket-support
+ ;; Make keywords case-insensitive
+ (function
+ (lambda()
+ (setq font-lock-defaults (list 'generic-font-lock-defaults nil t))))
+ )
+ "Generic mode for ASTAP circuit netlist files."
+ )
+
+