mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-16 09:50:25 +00:00
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.
This commit is contained in:
parent
6309131349
commit
77b1148b51
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user