Function: c-toggle-cpp-indent-to-body
c-toggle-cpp-indent-to-body is an interactive and byte-compiled
function defined in cc-cmds.el.gz.
Signature
(c-toggle-cpp-indent-to-body &optional ARG)
Documentation
Toggle the C preprocessor indent-to-body feature.
When enabled, preprocessor directives which are words in
c-indent-to-body-directives are indented as if they were statements.
Optional numeric ARG, if supplied, turns on the feature when positive, turns it off when negative, and just toggles it when zero or left out.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-cmds.el.gz
(defun c-toggle-cpp-indent-to-body (&optional arg)
"Toggle the C preprocessor indent-to-body feature.
When enabled, preprocessor directives which are words in
`c-indent-to-body-directives' are indented as if they were statements.
Optional numeric ARG, if supplied, turns on the feature when positive,
turns it off when negative, and just toggles it when zero or
left out."
(interactive "P")
(setq c-cpp-indent-to-body-flag
(c-calculate-state arg c-cpp-indent-to-body-flag))
(if c-cpp-indent-to-body-flag
(progn
(c-clear-stale-indent-to-body-abbrevs)
(mapc 'c-add-indent-to-body-to-abbrev-table
c-cpp-indent-to-body-directives)
(add-hook 'c-special-indent-hook 'c-align-cpp-indent-to-body nil t))
(remove-hook 'c-special-indent-hook 'c-align-cpp-indent-to-body t))
(message "c-cpp-indent-to-body %sabled"
(if c-cpp-indent-to-body-flag "en" "dis")))