Created
April 20, 2012 18:41
-
-
Save bowbow99/2430946 to your computer and use it in GitHub Desktop.
#xyzzy M-x start-repl するのに疲れた
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 switch-to-repl () | |
"repl を開く。 | |
既に見えてたらそのウィンドウへ。既に開いてたらそのバッファへ。まだ開いて | |
なかったら開く。" | |
(interactive) | |
(let* ((repl-buffer (find-buffer "*repl*")) | |
(repl-window (when repl-buffer (get-buffer-window repl-buffer)))) | |
(cond (repl-window (set-window repl-window)) | |
(repl-buffer (switch-to-buffer repl-buffer)) | |
(t (start-repl))))) | |
(define-key *global-keymap* #\M-F4 'switch-to-repl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment