]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix more obsoletion warnings
authorStefan Kangas <stefankangas@gmail.com>
Thu, 19 Dec 2024 00:33:56 +0000 (01:33 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:15:01 +0000 (16:15 +0100)
* 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
lisp/progmodes/cc-fonts.el
lisp/progmodes/csharp-mode.el

index b71442c475186850d9159c2fc84fecd8577afa1d..a40999e6334824d9213b656b1804f782636ca6b0 100644 (file)
      ;; 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)
index b18561667f8122005cfd6aebf45afbbe373a993b..b2752bddf4342d47c46ec7d86204c1d03838a7aa 100644 (file)
@@ -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)
index 0438a25242b5b8b072caecaa31e75c50664543c6..4cc59cc0052b5f2aed37aa889462411a00cbfb8a 100644 (file)
            ;; 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)))))
 
 
            ;; 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, ]+>\\)?("
            (eval . (list (concat "\\<nameof\\> *( *"
                                  csharp--regex-identifier-matcher
                                  " *) *")
-                         1 font-lock-variable-name-face))
+                         1 'font-lock-variable-name-face))
 
            ;; Catch statements with type only
            (eval . (list (concat "\\<catch\\> *( *"