diff --git a/misc/emacs/README.md b/misc/emacs/README.md index 1b0c5b54f7f..efee547cd08 100644 --- a/misc/emacs/README.md +++ b/misc/emacs/README.md @@ -11,6 +11,7 @@ Example: (add-to-list 'load-path "~/ql/misc/emacs") (require 'ql-mode-base) +(require 'dbscheme-mode) ; ... ``` diff --git a/misc/emacs/dbscheme-mode.el b/misc/emacs/dbscheme-mode.el new file mode 100644 index 00000000000..d84ce468029 --- /dev/null +++ b/misc/emacs/dbscheme-mode.el @@ -0,0 +1,37 @@ +;;; dbscheme-mode.el --- A major mode for editing Semmle database schema files + +;;; Commentary: +;; +;; A basic major mode for editing Semmle database schema files. +;; +;; Provides syntax highlightning and comment support. + +;;; Code: + +(define-generic-mode + 'dbscheme-mode ; mode name + + ;; comments + '(("//" . nil) + ("/*" . "*/")) + + ;; keywords + '("case" "ref" "unique" "of") + + ;; other things to highlight + `((,ql--primitive-type-regex . 'font-lock-type-face) + ("\\