@@ -370,13 +370,13 @@ that should be commented under LaTeX-style literate scripts."
370370 (" ^\\ (\\\\\\ )end{code}$" 1 " !" ))
371371 purescript-basic-syntactic-keywords))
372372
373- (defcustom purescript-font-lock-haddock (boundp 'font-lock-doc-face )
374- " If non-nil try to highlight Haddock comments specially."
373+ (defcustom purescript-font-lock-docstrings (boundp 'font-lock-doc-face )
374+ " If non-nil try to highlight docstring comments specially."
375375 :type 'boolean
376376 :group 'purescript )
377377
378- (defvar purescript-font-lock-seen-haddock nil )
379- (make-variable-buffer-local 'purescript-font-lock-seen-haddock )
378+ (defvar purescript-font-lock-seen-docstring nil )
379+ (make-variable-buffer-local 'purescript-font-lock-seen-docstring )
380380
381381(defun purescript-syntactic-face-function (state )
382382 " `font-lock-syntactic-face-function' for PureScript."
@@ -387,26 +387,26 @@ that should be commented under LaTeX-style literate scripts."
387387 (and (eq purescript-literate 'bird )
388388 (memq (char-before (nth 8 state)) '(nil ?\n ))))
389389 purescript-literate-comment-face)
390- ; ; Try and recognize Haddock comments. From what I gather from its
390+ ; ; Try and recognize docstring comments. From what I gather from its
391391 ; ; documentation, its comments can take the following forms:
392392 ; ; a) {-| ... -}
393393 ; ; b) {-^ ... -}
394394 ; ; c) -- | ...
395395 ; ; d) -- ^ ...
396396 ; ; e) -- ...
397- ; ; Where `e' is the tricky one: it is only a Haddock comment if it
398- ; ; follows immediately another Haddock comment. Even an empty line
399- ; ; breaks such a sequence of Haddock comments. It is not clear if `e'
397+ ; ; Where `e' is the tricky one: it is only a docstring comment if it
398+ ; ; follows immediately another docstring comment. Even an empty line
399+ ; ; breaks such a sequence of docstring comments. It is not clear if `e'
400400 ; ; can follow any other case, so I interpreted it as following only cases
401401 ; ; c,d,e (not a or b). In any case, this `e' is expensive since it
402- ; ; requires extra work for each and every non-Haddock comment, so I only
403- ; ; go through the more expensive check if we've already seen a Haddock
402+ ; ; requires extra work for each and every non-docstring comment, so I only
403+ ; ; go through the more expensive check if we've already seen a docstring
404404 ; ; comment in the buffer.
405- ((and purescript-font-lock-haddock
405+ ((and purescript-font-lock-docstrings
406406 (save-excursion
407407 (goto-char (nth 8 state))
408408 (or (looking-at " \\ (-- \\ |{-\\ )[ \\ t]*[|^]" )
409- (and purescript-font-lock-seen-haddock
409+ (and purescript-font-lock-seen-docstring
410410 (looking-at " -- " )
411411 (let ((doc nil )
412412 pos)
@@ -417,7 +417,7 @@ that should be commented under LaTeX-style literate scripts."
417417 (looking-at " --\\ ( [|^]\\ )?" ))
418418 (setq doc (match-beginning 1 )))
419419 doc)))))
420- (set (make-local-variable 'purescript-font-lock-seen-haddock ) t )
420+ (set (make-local-variable 'purescript-font-lock-seen-docstring ) t )
421421 font-lock-doc-face )
422422 (t font-lock-comment-face )))
423423
0 commit comments