emacs: add agw-lithdlg-mode
parent
ef6e93ffb3
commit
3b7e6628e1
|
@ -56,4 +56,32 @@
|
|||
(defun agw-after-local-vars ()
|
||||
(unless indent-tabs-mode (smart-tabs-mode 0)))
|
||||
|
||||
;; Lithium dialogues mode
|
||||
(setq agw-lithdlg-highlights
|
||||
(let* (( keywords '("dialogue" "terminal" "program" "page" "failure"
|
||||
"finished" "unfinished" "if" "else"))
|
||||
(functions '("option" "page" "name" "icon" "remote"
|
||||
"teleport_interlevel" "teleport_intralevel"
|
||||
"script" "logon" "logoff" "pict" "info"))
|
||||
( keyword-regexp (regexp-opt keywords 'words))
|
||||
(function-regexp (regexp-opt functions 'words)))
|
||||
`(("`.*$" . font-lock-string-face)
|
||||
( ,keyword-regexp . font-lock-keyword-face)
|
||||
(,function-regexp . font-lock-function-name-face))))
|
||||
|
||||
(setq agw-lithdlg-syntax
|
||||
(let ((table (make-syntax-table)))
|
||||
(modify-syntax-entry ?/ ". 14n" table)
|
||||
(modify-syntax-entry ?* ". 23n" table)
|
||||
(modify-syntax-entry ?{ "({" table)
|
||||
(modify-syntax-entry ?} ")}" table)
|
||||
table))
|
||||
|
||||
(define-derived-mode agw-lithdlg-mode fundamental-mode "lithdlg"
|
||||
"Major mode for Lithium dialogues."
|
||||
(setq font-lock-defaults '(agw-lithdlg-highlights))
|
||||
(set-syntax-table agw-lithdlg-syntax))
|
||||
|
||||
(provide 'agw-lithdlg-mode)
|
||||
|
||||
;; EOF
|
||||
|
|
Loading…
Reference in New Issue