Created
May 31, 2012 21:25
-
-
Save rawsyntax/2846414 to your computer and use it in GitHub Desktop.
a scratch buffer for javascript
This file contains hidden or 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 scratch-js () | |
"Create or switch to a javascript mode scratch buffer" | |
(interactive) | |
(if (not (eq nil (get-buffer "scratch-js"))) | |
(switch-to-buffer "scratch-js") | |
(set-buffer (get-buffer-create "scratch-js")) | |
(js2-mode) | |
(switch-to-buffer "scratch-js"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment