]> code.delx.au - gnu-emacs/commit
Rationalize the use of c-new-BEG and c-new-END in CC Mode.
authorAlan Mackenzie <acm@muc.de>
Sun, 29 May 2016 12:22:17 +0000 (12:22 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 29 May 2016 12:22:17 +0000 (12:22 +0000)
commit80dcc2370927a18fd033c928416e7d57e7addd89
tree02e0dc47faa90a328dabf3ac762fdb83a78f8fe8
parentb90e8904092eb7aa5b4cb3ede822d10422b70976
Rationalize the use of c-new-BEG and c-new-END in CC Mode.

Remove the now redundant c-old-BOM and c-old-EOM.

* lisp/progmodes/cc-engine.el (c-macro-cache-syntactic): Change and simplify
meaning.
(c-macro-cache-no-comment): New variable.
(c-invalidate-macro-cache, c-beginning-of-macro, c-end-of-macro): incorporate
the new c-macro-cache-no-comment.
(c-syntactic-end-of-macro): Make better use of c-macro-cache-syntactic.
(c-no-comment-end-of-macro): New function.

* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Add
c-extend-font-lock-region-for-macros to C/C++/ObjC value.

* lisp/progmodes/cc-mode.el (c-old-BOM, c-old-EOM): Remove.
(c-extend-region-for-CPP): Put results in c-new-BEG/END rather than
c-old-BOM/EOM.
(c-extend-font-lock-region-for-macros): Simplify meaning, no longer returning
a cons for the new region, since the function is now called as an after-change
function.  No longer adjust c-new-END for the length of inserted/deleted
text.  Move the size restrictions on macros to here from
c-neutralize-syntax-in-and-mark-CPP.
(c-neutralize-syntax-in-and-mark-CPP): No longer adjust c-new-BEG/END here.
Use c-no-comment-end-of-macro rather than c-syntactic-end-of-macro to find the
upper boundary to "neutralize" syntactically obtrusive characters.
(c-change-expand-fl-region): Don't set c-new-END to next BOL when already at
one.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el