Browse files

popup buffer in other splitted window when inferior lisp buffer has a…

…lready been created
  • Loading branch information...
1 parent 9960a0f commit 3b731a215a5d579a188701de4d38bd4a82c627d6 @matsu911 matsu911 committed Feb 21, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 clojure-mode.el
@@ -107,7 +107,7 @@ Clojure to load that file."
(define-key map "\C-c\C-e" 'lisp-eval-last-sexp)
(define-key map "\C-c\C-l" 'clojure-load-file)
(define-key map "\C-c\C-r" 'lisp-eval-region)
- (define-key map "\C-c\C-z" 'run-lisp)
+ (define-key map "\C-c\C-z" 'clojure-display-inferior-lisp-buffer)
(define-key map (kbd "RET") 'reindent-then-newline-and-indent)
(define-key map (kbd "C-c t") 'clojure-jump-to-test)
(define-key map (kbd "C-c M-q") 'clojure-fill-docstring)
@@ -196,6 +196,13 @@ if that value is non-nil."
(define-key clojure-mode-map "{" 'paredit-open-curly)
(define-key clojure-mode-map "}" 'paredit-close-curly)))
+(defun clojure-display-inferior-lisp-buffer ()
+ "Display a buffer bound to `inferior-lisp-buffer'."
+ (interactive)
+ (if (and inferior-lisp-buffer (get-buffer inferior-lisp-buffer))
+ (pop-to-buffer inferior-lisp-buffer t)
+ (run-lisp inferior-lisp-program)))
(defun clojure-load-file (file-name)
"Load a Lisp file into the inferior Lisp process."
(interactive (comint-get-source "Load Clojure file: "

0 comments on commit 3b731a2

Please sign in to comment.