Function: c-context-open-line
c-context-open-line is an interactive and byte-compiled function
defined in cc-cmds.el.gz.
Signature
(c-context-open-line)
Documentation
Insert a line break suitable to the context and leave point before it.
This is the c-context-line-break equivalent to open-line
(bound to C-o (open-line)). See c-context-line-break for the
details.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-cmds.el.gz
(defun c-context-open-line ()
"Insert a line break suitable to the context and leave point before it.
This is the `c-context-line-break' equivalent to `open-line'
\(bound to \\[open-line]). See `c-context-line-break' for the
details."
(interactive "*")
(let ((here (point)))
(unwind-protect
(progn
;; Temporarily insert a non-whitespace char to keep any
;; preceding whitespace intact.
(insert ?x)
(c-context-line-break))
(goto-char here)
(delete-char 1))))