;; adnot-mode.el --- a simple major mode for editing Adnot files.

;; Version: 20160402.0000
;; Author: Getty Ritter
;; Url: http://github.com/aisamanra/adnot-mode

(setq adnot-font-lock
  '(( "\"\\([^\\]\\|\\\\[\\\"]\\)*\""
      . font-lock-string-face )
    ( "(\\([ \n\t\r]*[A-Za-z_][A-Za-z0-9_]*\\)"
      1 font-lock-keyword-face )
    ( "\\([A-Za-z][A-Za-z0-9_]*\\)"
      . font-lock-variable-name-face )))

(defvar adnot-syntax-table nil "Syntax table for `adnot-mode'.")
(setq adnot-syntax-table
  (let ((table (make-syntax-table)))
    (modify-syntax-entry ?# "< b" table)
    (modify-syntax-entry ?\n "> b" table)

    table))

(define-derived-mode adnot-mode prog-mode
  "Adnot mode is a major mode for editing Adnot files"
  :syntax-table adnot-syntax-table

  (setq font-lock-defaults '(adnot-font-lock))
  (setq mode-name "Adnot mode")
  (setq comment-start "#")
  (setq comment-end ""))

;;;###autoload
(add-to-list 'auto-mode-alist '("\\.adnot\\'" . adnot-mode))

(provide 'adnot-mode)

;;; adnot-mode.el ends here
