From b34c069d8250e9557d5ef5e7997a5a7e370c7ad2 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 29 Jan 2025 18:35:31 +0000 Subject: [PATCH] CC Mode: Don't propertize parens in macros incorrectly Parentheses in macros were getting incorrectly propertized with the '(1) (punctuation) syntax-table text property. This was due to a typo in the patch "CC Mode: Rationalize and optimize cache invalidation (1)" from 2024-10-06. Correct this. * lisp/progmodes/cc-mode.el (c-depropertize-CPP): Move the first c-clear-syntax-table-with-value-trim-caches invocation from inside the enclosing `when' form to after it. --- lisp/progmodes/cc-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 73964c2f4a4..77e853271a4 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1033,8 +1033,8 @@ Note that the style variables are always made local to the buffer." (setq m-beg (point)) (c-end-of-macro) (when c-ml-string-opener-re - (save-excursion (c-depropertize-ml-strings-in-region m-beg (point))) - (c-clear-syntax-table-with-value-trim-caches m-beg (point) '(1)))) + (save-excursion (c-depropertize-ml-strings-in-region m-beg (point)))) + (c-clear-syntax-table-with-value-trim-caches m-beg (point) '(1))) (while (and (< (point) end) (setq ss-found