I don't want to highlight documentation comments differently from
ordinary comments. I noticed, back in
77ccc2aa..., that this was done
using `font-lock-syntactic-face-function, and decided to force that to
`nil'. I was right about the cause, but so wrong about the solution.
If the variable is `nil', then you just get errors about trying to apply
`nil'. There is a default value, which selects `string' or `comment'
based on the `parse-partial-sexp' state, but for some stupid reason this
default is just a lambda expression in the `defvar' form rather than
having a name like `font-lock-default-syntactic-face-function' or
something.
Override the Rust-mode choice with the default (which isn't doing
anything other than the doc-comment highlighting behaviour that I don't
want) with the default.
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
'(0 mdw-punct-face)))
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
'(0 mdw-punct-face)))
- font-lock-syntactic-face-function nil))
+ font-lock-syntactic-face-function
+ (default-value 'font-lock-syntactic-face-function)))
;; Hack key bindings.
(local-set-key [?{] 'mdw-self-insert-and-indent)
;; Hack key bindings.
(local-set-key [?{] 'mdw-self-insert-and-indent)