I'm trying to understand how syntax tables work, but my minimal major mode doesn't highlight anything.
I've written the following elisp, which is just supposed to highlight comments:
(defconst my-yaml-mode-syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?# "<" table) (modify-syntax-entry ?\n ">" table) table) "Syntax table for `my-yaml-mode'.") (define-derived-mode my-yaml-mode fundamental-mode "My YAML" "testing" :syntax-table my-yaml-mode-syntax-table)
However, given a file:
# foo # bar baz
If I activate my major-mode with
M-x my-yaml-mode, I don't get any highlighting.
C-u C-x = shows that no faces have been applied.