I am trying to define another comment style, similar to what we can do with modify-syntax-entry
:
(modify-syntax-entry ?/ ". 124b")
(modify-syntax-entry ?* ". 23")
(modify-syntax-entry ?\n "> b")
However, the comment has to be as follows:
`comment("This is my comment!")`
I have tried using regex:
(defconst my-comment-macro-regexp
(rx "`comment(\"" (zero-or-more anything) "\")`"))
(defconst my-font-lock-keywords
(list
(cons my-comment-macro-regexp 'font-lock-comment-face)))
But this doesn't work as the string highlighting on the inside of the macro takes precedence over this font style.