]> git.eshelyaron.com Git - emacs.git/commitdiff
C++ Mode: Don't confuse the pointer operator -> with the type indicating ->
authorAlan Mackenzie <acm@muc.de>
Sun, 15 Aug 2021 19:43:58 +0000 (19:43 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 15 Aug 2021 19:43:58 +0000 (19:43 +0000)
This fixes bug #47468.

* lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): While searching
backwards for "->" which is a type indicating operator, disallow also commas.

lisp/progmodes/cc-engine.el

index 9cba87f4d9188cb4bd841ab063fac34ebe7c2287..f5e4c4b992859bd719d25304b355e71b958a2573 100644 (file)
@@ -11993,7 +11993,7 @@ comment at the start of cc-engine.el for more info."
                       (save-excursion
                         (while
                             (progn
-                              (c-syntactic-skip-backward "^;=}>" closest-lim t)
+                              (c-syntactic-skip-backward "^;=,}>" closest-lim t)
                               (and (eq (char-before) ?>)
                                    (c-backward-token-2)
                                    (not (looking-at c-haskell-op-re)))))