[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 77b1148: c-beginning-of-statement-1: Handle syntact
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 77b1148: c-beginning-of-statement-1: Handle syntactic WS macros properly. |
Date: |
Mon, 6 May 2019 13:38:40 -0400 (EDT) |
branch: master
commit 77b1148b5164c71c4ba673173eed2a37918d4f78
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
c-beginning-of-statement-1: Handle syntactic WS macros properly.
* 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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 7e6a46e..a2762ca 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 77b1148: c-beginning-of-statement-1: Handle syntactic WS macros properly.,
Alan Mackenzie <=