Created
February 1, 2013 13:57
-
-
Save edwin-bluekite/4691447 to your computer and use it in GitHub Desktop.
Emacs Add semicolon at the end of the line
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 semicolon () | |
"Add semicolon at the end of the line and return to current position" | |
(interactive) | |
(setq current (point)) | |
(end-of-line) | |
(if (not (= (preceding-char) 59)) | |
(insert ";") | |
) | |
(goto-char current) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a simpler version.
a better use for that for new comers to emacs is to use it with specific mode like so ( here I am using it with php )