]> git.eshelyaron.com Git - emacs.git/commit
Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.
authorAlan Mackenzie <acm@muc.de>
Sun, 22 Oct 2017 14:18:20 +0000 (14:18 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 22 Oct 2017 14:18:20 +0000 (14:18 +0000)
commitb7c4aa951c8b12629742df9d20d6374c3d2a8ba8
treea3b86aa4e129b208ca796325f996c2e0e8a17563
parent3aee7be62eaf8caef6f2fab31bee79674b3abbb7
Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.

Use the new function directly in several places where c-forward-token-2
wouldn't move over the last token in the buffer.  This caused an infinite loop
in c-restore-<>-properties.

* lisp/progmodes/cc-engine.el (c-forward-over-token-and-ws): New function,
extracted from c-forward-token-2.
(c-forward-token-2): Refactor, calling the new function.
(c-restore-<>-properties): Fix infinite loop.
(c-forward-<>-arglist-recur, c-in-knr-argdecl)
(c-looking-at-or-maybe-in-bracelist): Call the new function directly in place
of c-forward-token-2.

* lisp/progmodes/cc-cmds.el (c-defun-name) Call the new function directly in
place of c-forward-token-2.

* lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Call the new
function directly in place of c-forward-token-2.
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el