]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Don't propertize parens in macros incorrectly
authorAlan Mackenzie <acm@muc.de>
Wed, 29 Jan 2025 18:35:31 +0000 (18:35 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:13:27 +0000 (19:13 +0100)
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.

(cherry picked from commit b34c069d8250e9557d5ef5e7997a5a7e370c7ad2)

lisp/progmodes/cc-mode.el

index 2f9271ccbaeb66cc4a5905533abd0bcd07661931..92aede9805043faa9527633636c2753414740b47 100644 (file)
@@ -1020,8 +1020,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