diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-02 14:24:18 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-02 14:57:18 -0700 |
commit | 8e1fdb293989f570478c647b046d085183aba5ab (patch) | |
tree | c0fb45933ba8a611ce33dd98afcae68b5be1d785 | |
parent | ed124ac92f4ec944a72178252b6b5fee065a471a (diff) | |
download | dotfiles-8e1fdb293989f570478c647b046d085183aba5ab.tar.gz |
move Sly config
-rw-r--r-- | .emacs.d/init-spw.el | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/.emacs.d/init-spw.el b/.emacs.d/init-spw.el index 49c3c6e6..20479f21 100644 --- a/.emacs.d/init-spw.el +++ b/.emacs.d/init-spw.el @@ -533,35 +533,6 @@ I use by default)." (slot . 0) (side . bottom)))) -;; WIP Sly config; see FLOSS.org - -(when (file-directory-p (expand-file-name "~/src/sly")) - (add-to-list 'load-path (expand-file-name "~/src/sly")) - (load "sly.el")) - -(with-eval-after-load 'sly - ;; restore SLIME's a/q debugger keys - (define-key sly-db-mode-map "q" #'sly-db-quit) - (define-key sly-db-mode-map "Q" nil) - - ;; have C-c C-z obey `display-buffer-alist' - ;; https://github.com/joaotavora/sly/issues/428 - (defun spw/sly-mrepl () - (interactive) - (sly-mrepl #'pop-to-buffer)) - (define-key sly-mode-map "\C-c\C-z" #'spw/sly-mrepl) - - (defun spw/sly-db-show-first-line () - (unless (pos-visible-in-window-p (point-min)) - (goto-char (point-min)))) - (add-hook 'sly-db-hook #'spw/sly-db-show-first-line) - - ;; C-r should always search buffer text - ;; (define-key sly-mrepl-mode-map "\M-r" #'comint-history-isearch-backward) - (defun spw/reset-comint-history-isearch () - (setq-local comint-history-isearch nil)) - (add-hook 'sly-mrepl-hook #'spw/reset-comint-history-isearch)) - ;; C-c s would be another option (global-set-key [f9] #'window-toggle-side-windows) @@ -2743,6 +2714,29 @@ mutt's review view, after exiting EDITOR." (defslime-repl-shortcut nil ("clear-source-registry") (:handler #'spw/slime-clear-source-registry))) +(with-eval-after-load 'sly + ;; restore SLIME's a/q debugger keys + (define-key sly-db-mode-map "q" #'sly-db-quit) + (define-key sly-db-mode-map "Q" nil) + + ;; have C-c C-z obey `display-buffer-alist' + ;; https://github.com/joaotavora/sly/issues/428 + (defun spw/sly-mrepl () + (interactive) + (sly-mrepl #'pop-to-buffer)) + (define-key sly-mode-map "\C-c\C-z" #'spw/sly-mrepl) + + (defun spw/sly-db-show-first-line () + (unless (pos-visible-in-window-p (point-min)) + (goto-char (point-min)))) + (add-hook 'sly-db-hook #'spw/sly-db-show-first-line) + + ;; C-r should always search buffer text + ;; (define-key sly-mrepl-mode-map "\M-r" #'comint-history-isearch-backward) + (defun spw/reset-comint-history-isearch () + (setq-local comint-history-isearch nil)) + (add-hook 'sly-mrepl-hook #'spw/reset-comint-history-isearch)) + ;;;; Text mode |