gdritter repos ndbl-mode / 4d4158d
... Getty Ritter 8 years ago
1 changed file(s) with 33 addition(s) and 0 deletion(s). Collapse all Expand all
1 ;; ndbl-mode.el --- a simple major mode for editing GIDL files.
2
3 ;; Version: 20150507.0000
4 ;; Author: Getty Ritter
5 ;; Url: http://github.com/aisamanra/ndbl-mode
6
7 (setq ndbl-font-lock
8 '(( "\"\\([^\\]\\|\\\\[\\\"]\\)*\""
9 . font-lock-string-face )
10 ( "\\([^ \n\t\r=]+\\)="
11 1 font-lock-variable-name-face )
12 ( "=" . font-lock-builtin-face )))
13
14 (defvar ndbl-syntax-table nil "Syntax table for `ndbl-mode'.")
15 (setq ndbl-syntax-table
16 (let ((table (make-syntax-table)))
17 (modify-syntax-entry ?# "< b" table)
18 (modify-syntax-entry ?\n "> b" table)
19
20 table))
21
22 (define-derived-mode ndbl-mode prog-mode
23 "NDBL mode is a major mode for editing NDBL files"
24 :syntax-table ndbl-syntax-table
25
26 (setq font-lock-defaults '(ndbl-font-lock))
27 (setq mode-name "NDBL mode")
28 (setq comment-start "#")
29 (setq comment-end ""))
30
31 (provide 'ndbl-mode)
32
33 ;;; ndbl-mode.el ends here