diff options
author | Alan Mackenzie <acm@muc.de> | 2023-01-23 20:25:53 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2023-01-23 20:25:53 +0000 |
commit | 29a8a1885d9f4825190d2575849f7605b3d6dffb (patch) | |
tree | c8a369fde061b9ff8a13213eb6c5c05fd6863bad /src/android-emacs.c | |
parent | 3e62ddc0d87dfceb67af49c5f1caee4d03fc33b8 (diff) | |
download | emacs-29a8a1885d9f4825190d2575849f7605b3d6dffb.tar.gz emacs-29a8a1885d9f4825190d2575849f7605b3d6dffb.tar.bz2 emacs-29a8a1885d9f4825190d2575849f7605b3d6dffb.zip |
CC Mode: Don't do c-backward-syntactic-ws following a forward movement
This was happening in, e.g., c-forward-type, which moves over whitespace at
the end of the scanned type. This WS movement can exit a comment or a macro,
such that a c-backward-syntactic-ws does not return to the desired point, but
to before the entire comment/macro.
* lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id)
(c-forward-id-comma-list, c-forward-noise-clause, c-forward-keyword-clause)
(c-forward-name, c-forward-type): Add a new &optional parameter `stop-at-end'
which when non-nil means "do not move over syntactic WS after performing the
main job", and adapt the internals of these macros and functions accordingly.
(c-forward-declarator, c-forward-decl-or-cast-1): In the calls to
c-forward-type and c-forward-name, set the stop-at-end argument to t, and call
c-forward-sytactic-ws later.
Diffstat (limited to 'src/android-emacs.c')
0 files changed, 0 insertions, 0 deletions