Skip to content

Commit d9b934b

Browse files
committed
purescript-font-lock.el: highlight docstrings unconditionally
The variable was introduced to avoid highlighting docstrings for Emacs versions where `font-lock-doc-face` didn't exist, that is prior to 21. It's a variable from very old times and nowadays we support Emacs 25.1+ which has font-lock-doc-face. So remove the variable and the condition. For the safe case I did search over Github, and the variable isn't mentioned anywhere except the literal copies of the font-lock.el file.
1 parent 08b295b commit d9b934b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

purescript-font-lock.el

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,6 @@ Returns keywords suitable for `font-lock-keywords'."
258258
("^\\(\\\\\\)end{code}$" 1 "!"))
259259
purescript-basic-syntactic-keywords))
260260

261-
(defcustom purescript-font-lock-docstrings (boundp 'font-lock-doc-face)
262-
"If non-nil try to highlight docstring comments specially."
263-
:type 'boolean
264-
:group 'purescript)
265-
266261
(defvar purescript-literate)
267262

268263
(defun purescript-syntactic-face-function (state)
@@ -286,10 +281,9 @@ Returns keywords suitable for `font-lock-keywords'."
286281
;; https://github.com/purescript/documentation/blob/master/language/Syntax.md
287282
;; IOW, given a `-- | foo' line followed by `-- bar' line, the latter is a
288283
;; plain comment.
289-
((and purescript-font-lock-docstrings
290-
(save-excursion
291-
(goto-char (nth 8 state))
292-
(looking-at "\\(--\\|{-\\)[ \\t]*[|^]")))
284+
((save-excursion
285+
(goto-char (nth 8 state))
286+
(looking-at "\\(--\\|{-\\)[ \\t]*[|^]"))
293287
'font-lock-doc-face)
294288
(t 'font-lock-comment-face)))
295289

0 commit comments

Comments
 (0)