mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-08 15:35:02 +00:00
(c-end-of-statement): Set macro-end correctly at the end of a loop.
This commit is contained in:
parent
aa9c0efca4
commit
bdfbdbb219
@ -2654,14 +2654,19 @@ sentence motion in or near comments and multiline strings."
|
||||
;; Are we about to move forward into or out of a
|
||||
;; preprocessor command?
|
||||
(when (eq (cdr res) 'macro-boundary)
|
||||
(save-excursion
|
||||
(end-of-line)
|
||||
(setq macro-fence
|
||||
(and (not (eobp))
|
||||
(progn (c-skip-ws-forward)
|
||||
(c-beginning-of-macro))
|
||||
(progn (c-end-of-macro)
|
||||
(point))))))
|
||||
(setq macro-fence
|
||||
(save-excursion
|
||||
(if macro-fence
|
||||
(progn
|
||||
(end-of-line)
|
||||
(and (not (eobp))
|
||||
(progn (c-skip-ws-forward)
|
||||
(c-beginning-of-macro))
|
||||
(progn (c-end-of-macro)
|
||||
(point))))
|
||||
(and (not (eobp))
|
||||
(c-beginning-of-macro)
|
||||
(progn (c-end-of-macro) (point)))))))
|
||||
;; Are we about to move forward into a literal?
|
||||
(when (memq (cdr res) '(macro-boundary literal))
|
||||
(setq range (c-ascertain-following-literal)))
|
||||
|
Loading…
Reference in New Issue
Block a user