]> git.eshelyaron.com Git - emacs.git/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:44:11 +0000 (21:44 +0000)
commiteabd667a9584fe5bd2422e296d256dceea67debf
tree64011eef07067c923e9ad6db3c6301221e85ff5a
parentd457fd9dc782465e1547f74021390c9d5951d6af
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