From 83dc1922d41663a38b49d40f148b2796ccce5bd9 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 26 Oct 2024 11:01:15 +0000 Subject: [PATCH] * lisp/progmodes/cc-langs.el (c-cpp-matchers): Remove an unneeded let*. (cherry picked from commit c2fcb6ca5c4baea5eed39376be12c21e03a960c2) --- lisp/progmodes/cc-fonts.el | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 3a87339e38a..83afe081b85 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -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) -- 2.39.5