Created
November 6, 2012 17:16
-
-
Save fakedrake/4026108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-cc-newline-and-indent () | |
"If we are between braces (that were mos probably created by | |
electric-pairs) prepare for writing the body of something" | |
(interactive) | |
(if (and (looking-at "}") (looking-back "{")) | |
(progn (newline-and-indent) (newline-and-indent) (previous-line) (c-indent-line-or-region)) | |
(newline-and-indent))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment