From 30436bc6abdc089b5ee0958b8b71fb0717e37dde Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 19 Dec 2024 01:33:56 +0100 Subject: [PATCH] ; Fix more obsoletion warnings * lisp/progmodes/cc-awk.el (awk-font-lock-keywords): * lisp/progmodes/cc-fonts.el (c-basic-matchers-before): * lisp/progmodes/csharp-mode.el (c-basic-matchers-before): Use faces instead of variables to silence an obsoletion warning. (Bug#71469) (cherry picked from commit cd7e462ea31491d93d5e781ec0343c37e024bea7) --- lisp/progmodes/cc-awk.el | 4 ++-- lisp/progmodes/cc-fonts.el | 2 +- lisp/progmodes/csharp-mode.el | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index b71442c4751..a40999e6334 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -966,11 +966,11 @@ ;; Function declarations. `(,(c-make-font-lock-search-function "^\\s *\\(func\\(tion\\)?\\)\\s +\\(\\(\\sw+\\(::\\sw+\\)?\\)\\s *\\)?\\(([^()]*)\\)?" - '(1 font-lock-keyword-face t) + '(1 'font-lock-keyword-face t) ;; We can't use LAXMATCH in `c-make-font-lock-search-function', so.... '((when (match-beginning 4) (c-put-font-lock-face - (match-beginning 4) (match-end 4) font-lock-function-name-face) + (match-beginning 4) (match-end 4) 'font-lock-function-name-face) nil)) ;; Put warning face on any use of :: inside the parens. '((when (match-beginning 6) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index b18561667f8..b2752bddf43 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -898,7 +898,7 @@ casts and declarations are fontified. Used on level 2 and higher." (c-lang-const c-simple-ws) "*" "=\\(?:[^=]\\|$\\)") `((,(+ 1 (c-lang-const c-simple-ws-depth)) - font-lock-type-face t))))))))) + 'font-lock-type-face t))))))))) ;; Fontify the special declarations in Objective-C. ,@(when (c-major-mode-is 'objc-mode) diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 0438a25242b..4cc59cc0052 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -335,7 +335,7 @@ ;; Chained identifiers in using/namespace statements ,`(,(c-make-font-lock-search-function csharp--regex-using-or-namespace - `((csharp--color-forwards font-lock-variable-name-face) + `((csharp--color-forwards 'font-lock-variable-name-face) nil (goto-char (match-end 0))))) @@ -348,7 +348,7 @@ ;; Single identifier in attribute (eval . (list (concat "\\[" csharp--regex-type-name-matcher "\\][^;]") - 1 font-lock-variable-name-face t)) + 1 'font-lock-variable-name-face t)) ;; Function names (eval . (list "\\([A-Za-z0-9_]+\\)\\(<[a-zA-Z0-9, ]+>\\)?(" @@ -361,7 +361,7 @@ (eval . (list (concat "\\ *( *" csharp--regex-identifier-matcher " *) *") - 1 font-lock-variable-name-face)) + 1 'font-lock-variable-name-face)) ;; Catch statements with type only (eval . (list (concat "\\ *( *" -- 2.39.5