]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/cc-langs.el (c-cpp-matchers): Remove an unneeded let*.
authorAlan Mackenzie <acm@muc.de>
Sat, 26 Oct 2024 11:01:15 +0000 (11:01 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Oct 2024 16:46:26 +0000 (18:46 +0200)
(cherry picked from commit c2fcb6ca5c4baea5eed39376be12c21e03a960c2)

lisp/progmodes/cc-fonts.el

index 3a87339e38abc9bdf03466423b1da2025a9dc747..83afe081b8586ea368b6a65cfa482e100f72c406 100644 (file)
@@ -556,26 +556,23 @@ stuff.  Used on level 1 and higher."
 
              ;; Fontify filenames in #include <...> as strings.
              ,@(when (c-lang-const c-cpp-include-directives)
-                 (let* ((re (c-make-keywords-re nil
-                              (c-lang-const c-cpp-include-directives)))
-                        (re-depth (regexp-opt-depth re)))
-                   ;; We used to use a font-lock "anchored matcher" here for
-                   ;; the paren syntax.  This failed when the ">" was at EOL,
-                   ;; since `font-lock-fontify-anchored-keywords' terminated
-                   ;; its loop at EOL without executing our lambda form at
-                   ;; all.
-                   `((,(concat noncontinued-line-end
-                               "\\("   ; To make the next ^ special.
-                               (c-lang-const c-cpp-include-key)
-                               "\\)"
-                               (c-lang-const c-syntactic-ws)
-                               "\\(<\\([^>\n\r]*\\)>?\\)")
-                      ,(+ ncle-depth 1
-                          (regexp-opt-depth
-                           (c-lang-const c-cpp-include-key))
-                          sws-depth
-                          (if (featurep 'xemacs) 2 1))
-                      font-lock-string-face t))))
+                 ;; We used to use a font-lock "anchored matcher" here for
+                 ;; the paren syntax.  This failed when the ">" was at EOL,
+                 ;; since `font-lock-fontify-anchored-keywords' terminated
+                 ;; its loop at EOL without executing our lambda form at all.
+                 ;; (2024-10): The paren syntax is now handled in
+                 ;; before/after-change functions.
+                 `((,(concat noncontinued-line-end
+                             "\\("     ; To make the next ^ special.
+                             (c-lang-const c-cpp-include-key)
+                             "\\)"
+                             (c-lang-const c-syntactic-ws)
+                             "\\(<\\([^>\n\r]*\\)>?\\)")
+                    ,(+ ncle-depth 1
+                        (regexp-opt-depth (c-lang-const c-cpp-include-key))
+                        sws-depth
+                        (if (featurep 'xemacs) 2 1))
+                    font-lock-string-face t)))
 
              ;; #define.
              ,@(when (c-lang-const c-opt-cpp-macro-define)