Created
October 23, 2012 08:36
-
-
Save donghee/3937661 to your computer and use it in GitHub Desktop.
emacs elisp: goto matching parenthesis
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 jump-match-paren (arg) | |
"Go to the matching parenthesis." | |
(interactive "p") | |
(cond ((looking-at "\\s\(\\|\\s\[") (forward-list 1) (backward-char 1)) | |
((looking-at "\\s\)\\|\\s\]") (forward-char 1) (backward-list 1)) | |
(t (back-to-indentation)) | |
)) | |
(global-set-key [C-return] 'jump-match-paren) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment