Skip to content

popup inferior lisp buffer in other splited window when an inferior lisp buffer has already been created #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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: "
Expand Down