]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: allow specified directives (e.g. pragma) to be indented as statements
authorAlan Mackenzie <acm@muc.de>
Sun, 8 Mar 2020 16:21:15 +0000 (16:21 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 8 Mar 2020 16:21:15 +0000 (16:21 +0000)
commit35a13fca32c3371ca25d87f7447b4bd4f65de710
treea6d40a7e845b45f43421fb8378eaaf5281fe86f9
parent66bc47d12aba72ff738a9f5575e0b93eefc641ba
CC Mode: allow specified directives (e.g. pragma) to be indented as statements

* lisp/progmodes/cc-cmds.el (c-align-cpp-indent-to-body)
(c-cpp-indent-to-body-flag, c-electric-pragma)
(c-add-indent-to-body-to-abbrev-table, c-clear-stale-indent-to-body-abbrevs)
(c-toggle-cpp-indent-to-body): New functions and variables.

* lisp/progmodes/cc-langs.el (c-std-abbrev-keywords): New lang const/var.

* lisp/progmodes/cc-mode.el (c-populate-abbrev-table): New function.
(c-basic-common-init): call the c-populate-abbrev-table.
(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode):
Remove the setting of MODE-abbrev-table.

* lisp/progmodes/cc-vars.el (c-cpp-indent-to-body-directives): New defcustom.

* doc/misc/cc-mode.texi (Custom Macros): Introduce and refer to ....
(Indenting Directives): New page documenting the new mechanism.
doc/misc/cc-mode.texi
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el
lisp/progmodes/cc-vars.el