]> git.eshelyaron.com Git - emacs.git/commit
CC Mode. Create lang vars for certain skipping expressions at compile time
authorAlan Mackenzie <acm@muc.de>
Fri, 26 Jul 2019 17:48:45 +0000 (17:48 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 26 Jul 2019 17:48:45 +0000 (17:48 +0000)
commitaabb844e45642d6bf80673159dae18f4ea3693e4
treec376994d217785cb6e1739c72c2393c4dcad0172
parent2260483560963fa490ae5ce55ff55f0ceaae379d
CC Mode.  Create lang vars for certain skipping expressions at compile time

This saves repeated calculations at run time.

* lisp/progmodes/cc-langs.el (c-stmt-boundary-skip-chars)
(c-stmt-boundary-skip-list, c-stmt-boundary-skip-chars-with-comma)
(c-stmt-boundary-skip-list-with-comma): New lang constants/variables.

* lisp/progmodes/cc-engine.el (c-commas-bound-stmts): New variable
(c-beginning-of-statement-1): Set c-commas-bound-stmts rather than
c-stmt-delim-chars.
(c-crosses-statement-barrier-p): Remove the now unneeded calculations of
c-stmt-delim-chars.  Set skip chars to one of the new lang variables, and
later to a substring of it.
(c-at-statement-start-p): Set c-syntactic-skip-backward from the new
variables.
(c-at-expression-start-p): Bind c-commas-bound-stmts.  Use
c-stmt-delim-chars-with-comma rather than c-stmt-delim-chars in a backward
scan.
(c-guess-basic-syntax): Bind c-commas-bound-stmts rather than
c-stmt-delim-chars to itself.  Bind c-commas-bound-stmts to t at another place
rather than setting c-stmt-delim-chars to c-stmt-delim-chars-with-comma.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el