Skip to content

Commit 861e13d

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 1460a7e commit 861e13d

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
@@ -259,11 +259,6 @@ Returns keywords suitable for `font-lock-keywords'."
259259
("^\\(\\\\\\)end{code}$" 1 "!"))
260260
purescript-basic-syntactic-keywords))
261261

262-
(defcustom purescript-font-lock-docstrings (boundp 'font-lock-doc-face)
263-
"If non-nil try to highlight docstring comments specially."
264-
:type 'boolean
265-
:group 'purescript)
266-
267262
(defun purescript-syntactic-face-function (state)
268263
"`font-lock-syntactic-face-function' for PureScript."
269264
(cond
@@ -285,10 +280,9 @@ Returns keywords suitable for `font-lock-keywords'."
285280
;; https://github.com/purescript/documentation/blob/master/language/Syntax.md
286281
;; IOW, given a `-- | foo' line followed by `-- bar' line, the latter is a
287282
;; plain comment.
288-
((and purescript-font-lock-docstrings
289-
(save-excursion
290-
(goto-char (nth 8 state))
291-
(looking-at "\\(--\\|{-\\)[ \\t]*[|^]")))
283+
((save-excursion
284+
(goto-char (nth 8 state))
285+
(looking-at "\\(--\\|{-\\)[ \\t]*[|^]"))
292286
'font-lock-doc-face)
293287
(t 'font-lock-comment-face)))
294288

0 commit comments

Comments
 (0)