Skip to content

Commit 8a362fe

Browse files
committed
Use font-lock symbols directly instead of fetching from variables
The variables are obsolete in Emacs 31.1+ because they introduce confusion (see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71469 for details). Fixes: purescript-font-lock.el:374:19: Error: ‘font-lock-string-face’ is an obsolete variable (as of 31.1); use the quoted symbol instead: 'font-lock-string-face purescript-font-lock.el:411:5: Error: ‘font-lock-doc-face’ is an obsolete variable (as of 31.1); use the quoted symbol instead: 'font-lock-doc-face purescript-font-lock.el:412:7: Error: ‘font-lock-comment-face’ is an obsolete variable (as of 31.1); use the quoted symbol instead: 'font-lock-comment-face
1 parent 07e4d6e commit 8a362fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

purescript-font-lock.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ that should be commented under LaTeX-style literate scripts."
371371
(defun purescript-syntactic-face-function (state)
372372
"`font-lock-syntactic-face-function' for PureScript."
373373
(cond
374-
((nth 3 state) font-lock-string-face) ; as normal
374+
((nth 3 state) 'font-lock-string-face) ; as normal
375375
;; Else comment. If it's from syntax table, use default face.
376376
((or (eq 'syntax-table (nth 7 state))
377377
(and (eq purescript-literate 'bird)
@@ -408,8 +408,8 @@ that should be commented under LaTeX-style literate scripts."
408408
(setq doc (match-beginning 1)))
409409
doc)))))
410410
(set (make-local-variable 'purescript-font-lock-seen-docstring) t)
411-
font-lock-doc-face)
412-
(t font-lock-comment-face)))
411+
'font-lock-doc-face)
412+
(t 'font-lock-comment-face)))
413413

414414
(defconst purescript-font-lock-keywords
415415
(purescript-font-lock-keywords-create nil)

0 commit comments

Comments
 (0)