summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el27
1 files changed, 20 insertions, 7 deletions
diff --git a/init.el b/init.el index e2d5950..1715c9a 100644 --- a/init.el +++ b/init.el
@@ -77,7 +77,8 @@
77 lisp-mode 77 lisp-mode
78 lisp-interaction-mode 78 lisp-interaction-mode
79 scheme-mode 79 scheme-mode
80 slime-repl-mode) 80 slime-repl-mode
81 sly-mrepl-mode)
81 "List of modes that are lisp-like enough to hook packages into.") 82 "List of modes that are lisp-like enough to hook packages into.")
82 83
83 84
@@ -664,26 +665,38 @@
664 "~/var/quicklisp/slime-helper.el")))) 665 "~/var/quicklisp/slime-helper.el"))))
665 (load slime-helper)) 666 (load slime-helper))
666 667
667 (define-key slime-repl-mode-map (kbd "RET") #'slime-repl-return-at-end) 668 (with-eval-after-load 'slime
668 (define-key slime-repl-mode-map (kbd "<return>") 669 (dolist (key (list (kbd "RET")
669 #'slime-repl-return-at-end) 670 (kbd "<return>")))
670 671 (define-key slime-repl-mode-map key #'slime-repl-return-at-end)))
671 (defun slime-repl-return-at-end () 672 (defun slime-repl-return-at-end ()
672 (interactive) 673 (interactive)
673 (if (<= (point-max) (point)) 674 (if (<= (point-max) (point))
674 (slime-repl-return) 675 (slime-repl-return)
675 (slime-repl-newline-and-indent))) 676 (slime-repl-newline-and-indent)))
676 677
677
678 (with-eval-after-load 'company 678 (with-eval-after-load 'company
679 (setup (:straight slime-company) 679 (setup (:straight slime-company)
680 (:option slime-company-completion 'fuzzy 680 (:option slime-company-completion 'fuzzy
681 slime-company-after-completion nil) 681 slime-company-after-completion nil)
682 (slime-setup '(slime-fancy slime-company)))))) 682 (slime-setup '(slime-fancy slime-company))))))
683 683 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
684 (:sly 684 (:sly
685 (setup (:straight sly) 685 (setup (:straight sly)
686 (:option sly-kill-without-query-p t) 686 (:option sly-kill-without-query-p t)
687
688 (with-eval-after-load 'sly
689 (dolist (key (list (kbd "RET")
690 (kbd "<return>")))
691 (define-key sly-mrepl-mode-map key #'sly-mrepl-return-at-end)))
692
693 (defun sly-mrepl-return-at-end ()
694 (interactive)
695 (if (<= (point-max) (point))
696 (sly-mrepl-return)
697 (if (bound-and-true-p paredit-mode)
698 (paredit-newline)
699 (electric-newline-and-maybe-indent))))
687 700
688 (:also-load sly-autoloads))))) 701 (:also-load sly-autoloads)))))
689 702