]> code.delx.au - gnu-emacs/commit
Fix a cacheing bug, which led to inordinately slow c-beginning-of-defun.
authorAlan Mackenzie <acm@muc.de>
Mon, 14 Mar 2016 21:44:11 +0000 (21:44 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 14 Mar 2016 21:48:45 +0000 (21:48 +0000)
commit5cc691930808ccf7afdbc53ed49ca24badd97013
treef986652c247488eb6c2d09d2db388599e206256e
parent0ce37eac45f8b1279e89e854f71bb3f35fd43d29
Fix a cacheing bug, which led to inordinately slow c-beginning-of-defun.

* lisp/progmodes/cc-defs.el (c-self-bind-state-cache): New macro.

* lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Always call c-parse-state
rather than just using the cache variable c-state-cache.
(c-syntactic-skip-backward): Invoke c-self-bind-state-cache to isolate calls
to c-parse-state from other uses of the parse state cache.

* lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Invoke
c-self-bind-state-cache around the processing, replacing flawed bindings of
c-state-cache.
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-defs.el
lisp/progmodes/cc-engine.el