+;; eagle-ul-mode.el
+;; Ryan Matlock, 2014
+
+;; This was first started with EAGLE-6.6.0, although the User Language Manual
+;; that I'm using dates back to 2009.  Things may change in the future.
+
 ;; source for how to do this: http://ergoemacs.org/emacs/elisp_syntax_coloring.html
 
-;; (setq eagle-ul-keywords
-;;       '(("schematic" . font-lock-function-name-face)
-;;         ("name\\|value" . font-lock-constant-face)))
+(setq eagle-ul-directives
+      '("#include" "#require" "#usage"))
 
 (setq eagle-ul-single-valued-constants
       '("EAGLE_VERSION" "EAGLE_RELEASE" "EAGLE_SIGNATURE" "EAGLE_DIR"

      eagle-ul-time-functions
      eagle-ul-object-functions)

(define-derived-mode eagle-ul-mode c-mode
  (setq font-lock-defaults '(eagle-ul-keywords))
  (setq mode-name "EAGLE UL"))

(provide 'eagle-ul-mode)

      '("board" "deviceset" "library" "output" "package" "schematic" "sheet"
        "symbol"))

(setq eagle-ul-predefined-dialogs
      '("dlgDirectory" "dlgFileOpen" "dlgFileSave" "dlgMessageBox"))

(setq eagle-ul-dialog-objects
      '("dlgCell" "dlgCheckBox" "dlgComboBox" "dlgDialog" "dlgGridLayout"
        "dlgGroup" "dlgHBoxLayout" "dlgIntEdit" "dlgLabel" "dlgListView"
        "dlgPushButton" "dlgRadioButton" "dlgRealEdit" "dlgSpacing"
        "dlgSpinBox" "dlgStretch" "dlgStringEdit" "dlgTabPage" "dlgTabWidget"
        "dlgTextEdit" "dlgTextView" "dlgVBoxLayout"))

(setq eagle-ul-dialog-functions
      '("dlgAccept" "dlgRedisplay" "dlgReset" "dlgReject"))

(setq eagle-ul-html-tags
      '("html" "h1" "h2" "h3" "p" "center" "blockquote" "ul" "ol" "li" "pre"
        "a" "em" "strong" "i" "b" "u" "big" "small" "code" "tt" "font" "img"
        "hr" "br" "nobr" "table" "tr" "td" "th" "author" "dl" "dt" "dd"
        "&lt;" "&gt;" "&amp;" "&nbsp;" "&auml;" "&ouml;" "&uuml;" "&Auml;"
        "&Ouml;" "&Uuml;" "&szlig;" "&copy;" "&deg;" "&micro;" "&plusmn;"))

;; concatenate all kinds into single keyword class (directives aren't included 
;; because they'd be the only members of their class)
(setq eagle-ul-all-constants
      eagle-ul-single-valued-constants
      eagle-ul-array-constants)
