]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Fix two bugs in the "state cache".
authorAlan Mackenzie <acm@muc.de>
Thu, 14 Nov 2019 19:51:01 +0000 (19:51 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 14 Nov 2019 19:51:01 +0000 (19:51 +0000)
commitc455e609bdf065c3177eec29234348809cdc372c
tree2012a06e37d6d269dcd1600c8fb40ccf6746ceaf
parent30e944b66b24254e007381c80237e96c721a127c
CC Mode: Fix two bugs in the "state cache".

This (along with a suggestion to the OP to set
open-paren-in-column-0-is-defun-start to nil) fixes bug #37910.  It may also
have fixed bug #5490 and bug #18072.

* lisp/progmodes/cc-engine.el (c-state-cache-non-literal-place): Remove thi
non-sensical function, replacing it with ....
(c-state-cache-lower-good-pos): New function.
(c-renarrow-state-cache, c-append-lower-brace-pair-to-state-cache)
(c-remove-stale-state-cache, c-remove-stale-state-cache-backwards): Instead of
altering the state-cache list structure with setcar and setcdr, use setq and
consing.
(c-parse-state-1): Call c-state-cache-lower-good-pos rather than
c-state-cache-non-literal-place.
lisp/progmodes/cc-engine.el