aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2024-02-09 14:22:14 -0500
committerStefan Monnier2024-02-09 14:22:14 -0500
commitefedb8f479f1f2cf4d7ce703c6411dd756d2843d (patch)
treefe9faa96f288bbc019912408693bcb5134dc6c52
parent3c3702b9bbc79f63026606dc0f391da3d795226d (diff)
downloademacs-efedb8f479f1f2cf4d7ce703c6411dd756d2843d.tar.gz
emacs-efedb8f479f1f2cf4d7ce703c6411dd756d2843d.zip
modula2.el: Avoid font-lock-*-face variables
* lisp/progmodes/modula2.el (m3-font-lock-keywords-1) (m3-font-lock-keywords-2): Refer to the font-lock faces directly
-rw-r--r--lisp/progmodes/modula2.el47
1 files changed, 25 insertions, 22 deletions
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index 09cb848fd52..2bb31988290 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -325,20 +325,20 @@ followed by the first character of the construct.
325 ;; 325 ;;
326 ;; Module definitions. 326 ;; Module definitions.
327 ("\\<\\(INTERFACE\\|MODULE\\|PROCEDURE\\)\\>[ \t]*\\(\\sw+\\)?" 327 ("\\<\\(INTERFACE\\|MODULE\\|PROCEDURE\\)\\>[ \t]*\\(\\sw+\\)?"
328 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) 328 (1 'font-lock-keyword-face) (2 'font-lock-function-name-face nil t))
329 ;; 329 ;;
330 ;; Import directives. 330 ;; Import directives.
331 ("\\<\\(EXPORTS\\|FROM\\|IMPORT\\)\\>" 331 ("\\<\\(EXPORTS\\|FROM\\|IMPORT\\)\\>"
332 (1 font-lock-keyword-face) 332 (1 'font-lock-keyword-face)
333 (font-lock-match-c-style-declaration-item-and-skip-to-next 333 (font-lock-match-c-style-declaration-item-and-skip-to-next
334 nil (goto-char (match-end 0)) 334 nil (goto-char (match-end 0))
335 (1 font-lock-constant-face))) 335 (1 'font-lock-constant-face)))
336 ;; 336 ;;
337 ;; Pragmas as warnings. 337 ;; Pragmas as warnings.
338 ;; Spencer Allain <sallain@teknowledge.com> says do them as comments... 338 ;; Spencer Allain <sallain@teknowledge.com> says do them as comments...
339 ;; ("<\\*.*\\*>" . font-lock-warning-face) 339 ;; ("<\\*.*\\*>" . font-lock-warning-face)
340 ;; ... but instead we fontify the first word. 340 ;; ... but instead we fontify the first word.
341 ("<\\*[ \t]*\\(\\sw+\\)" 1 font-lock-warning-face prepend) 341 ("<\\*[ \t]*\\(\\sw+\\)" 1 'font-lock-warning-face prepend)
342 ) 342 )
343 "Subdued level highlighting for Modula-3 modes.") 343 "Subdued level highlighting for Modula-3 modes.")
344 344
@@ -366,26 +366,29 @@ followed by the first character of the construct.
366 "LOOPHOLE" "MAX" "MIN" "NARROW" "NEW" "NUMBER" "ORD" 366 "LOOPHOLE" "MAX" "MIN" "NARROW" "NEW" "NUMBER" "ORD"
367 "ROUND" "SUBARRAY" "TRUNC" "TYPECODE" "VAL"))) 367 "ROUND" "SUBARRAY" "TRUNC" "TYPECODE" "VAL")))
368 ) 368 )
369 (list 369 `(
370 ;; 370 ;;
371 ;; Keywords except those fontified elsewhere. 371 ;; Keywords except those fontified elsewhere.
372 (concat "\\<\\(" m3-keywords "\\)\\>") 372 ,(concat "\\<\\(" m3-keywords "\\)\\>")
373 ;; 373 ;;
374 ;; Builtins. 374 ;; Builtins.
375 (cons (concat "\\<\\(" m3-builtins "\\)\\>") 'font-lock-builtin-face) 375 (,(concat "\\<\\(" m3-builtins "\\)\\>")
376 ;; 376 (0 'font-lock-builtin-face))
377 ;; Type names. 377 ;;
378 (cons (concat "\\<\\(" m3-types "\\)\\>") 'font-lock-type-face) 378 ;; Type names.
379 ;; 379 (,(concat "\\<\\(" m3-types "\\)\\>")
380 ;; Fontify tokens as function names. 380 (0 'font-lock-type-face))
381 '("\\<\\(END\\|EXCEPTION\\|RAISES?\\)\\>[ \t{]*" 381 ;;
382 (1 font-lock-keyword-face) 382 ;; Fontify tokens as function names.
383 ("\\<\\(END\\|EXCEPTION\\|RAISES?\\)\\>[ \t{]*"
384 (1 'font-lock-keyword-face)
383 (font-lock-match-c-style-declaration-item-and-skip-to-next 385 (font-lock-match-c-style-declaration-item-and-skip-to-next
384 nil (goto-char (match-end 0)) 386 nil (goto-char (match-end 0))
385 (1 font-lock-function-name-face))) 387 (1 'font-lock-function-name-face)))
386 ;; 388 ;;
387 ;; Fontify constants as references. 389 ;; Fontify constants as references.
388 '("\\<\\(FALSE\\|NIL\\|NULL\\|TRUE\\)\\>" . font-lock-constant-face) 390 ("\\<\\(FALSE\\|NIL\\|NULL\\|TRUE\\)\\>"
391 (0 'font-lock-constant-face))
389 )))) 392 ))))
390 "Gaudy level highlighting for Modula-3 modes.") 393 "Gaudy level highlighting for Modula-3 modes.")
391 394