]> git.eshelyaron.com Git - emacs.git/commit
Optimize c-syntactic-skip-backward, c-determine-limit for large comment blocks
authorAlan Mackenzie <acm@muc.de>
Mon, 2 Apr 2018 11:33:24 +0000 (11:33 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 2 Apr 2018 11:33:24 +0000 (11:33 +0000)
commitb393ecf8e288f1e1b6a8ac55006715fa1046a5d4
tree759f1fa46dae0b8e05feca838dad739a6559a778
parent956c39d11d871d1b6cdf4bc13217e9678d12fd76
Optimize c-syntactic-skip-backward, c-determine-limit for large comment blocks

* lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Remove.
(c-syntactic-skip-backward): Remove the surrounding c-self-bind-state-cache.
Use the standard function c-literal-start in place of the special purpose
c-ssb-lit-begin.  With a suitable skip-chars argument (the usual case),
optimize by invoking c-backward-syntactic-ws to move back over comment blocks.
(c-determine-limit-get-base): Inovke an early c-backward-syntactic-ws.
(c-determine-limit): Use c-forward-comment whilst moving forward.  Cope with
an empty position stack whilst looking for non-literals (bug fix).  In the
recursive call, double try-size to prevent Lisp stack overflow.
lisp/progmodes/cc-engine.el