SLY: Bind s-backspace to sly-switch-to-repl.
parent
09c7c87ac0
commit
588866917e
|
@ -117,8 +117,7 @@
|
||||||
(exwm-input-set-key (kbd "s-p") #'helm-pass))
|
(exwm-input-set-key (kbd "s-p") #'helm-pass))
|
||||||
|
|
||||||
(autoload 'ambrevar/slime-to-repl "lisp")
|
(autoload 'ambrevar/slime-to-repl "lisp")
|
||||||
;; (exwm-input-set-key (kbd "s-<backspace>") #'ambrevar/slime-switch-to-repl)
|
(exwm-input-set-key (kbd "s-<backspace>") #'ambrevar/sly-switch-to-repl)
|
||||||
(exwm-input-set-key (kbd "s-<backspace>") #'sly)
|
|
||||||
(defun ambrevar/repl-switcher ()
|
(defun ambrevar/repl-switcher ()
|
||||||
"Switch between Geiser and SLIME REPLs."
|
"Switch between Geiser and SLIME REPLs."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -58,6 +58,20 @@
|
||||||
(add-hook 'sly-mrepl-hook #'rainbow-delimiters-mode)
|
(add-hook 'sly-mrepl-hook #'rainbow-delimiters-mode)
|
||||||
(add-hook 'sly-mrepl-hook #'company-mode))
|
(add-hook 'sly-mrepl-hook #'company-mode))
|
||||||
|
|
||||||
|
(defun ambrevar/sly-switch-to-repl () ; TODO: Replace with `helm-defswitch'.
|
||||||
|
(interactive)
|
||||||
|
(require 'sly)
|
||||||
|
(pcase (length sly-net-processes)
|
||||||
|
(0 (sly))
|
||||||
|
(_ (let ((output-buffer (sly-mrepl--find-buffer (sly-current-connection))))
|
||||||
|
(cond
|
||||||
|
((and (eq (current-buffer) output-buffer)
|
||||||
|
(require 'helm-slime nil 'no-error))
|
||||||
|
(helm-lisp-mini))
|
||||||
|
(output-buffer
|
||||||
|
(pop-to-buffer output-buffer))
|
||||||
|
(t (sly nil nil t)))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; SLIME
|
;;; SLIME
|
||||||
(defun ambrevar/slime-switch-to-repl () ; TODO: Replace with `helm-defswitch'.
|
(defun ambrevar/slime-switch-to-repl () ; TODO: Replace with `helm-defswitch'.
|
||||||
|
|
Loading…
Reference in New Issue