]> git.eshelyaron.com Git - emacs.git/commitdiff
c-beginning-of-statement-1: Handle syntactic WS macros properly.
authorAlan Mackenzie <acm@muc.de>
Mon, 6 May 2019 17:36:28 +0000 (17:36 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 6 May 2019 17:36:28 +0000 (17:36 +0000)
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): The variable
before-sws-pos should record the position of a closing paren/brace/bracket
before moving backwards over a sexp.  When there is a syntactic WS macro
between the starting point and the closing p/b/b, setq before-sws-pos again
after moving backward over the macro.

lisp/progmodes/cc-engine.el

index 7e6a46ea6e0d050f34483993ce2ff809e8fd23ef..a2762ca20971ee0c5acd4c369a613ef9de3c6b94 100644 (file)
@@ -1143,6 +1143,9 @@ comment at the start of cc-engine.el for more info."
                         ;; Have we moved into a macro?
                         ((and (not macro-start)
                               (c-beginning-of-macro))
+                         (save-excursion
+                           (c-backward-syntactic-ws)
+                           (setq before-sws-pos (point)))
                          ;; Have we crossed a statement boundary?  If not,
                          ;; keep going back until we find one or a "real" sexp.
                          (and