Don't activate sly-mode in lisp-mode derived modes
Fixes some issues (like indentation or unrelated sly-mode warnings) in lisp-like major modes (like fennel-mode).
This commit is contained in:
parent
7afb09da73
commit
ff2d56794e
1 changed files with 7 additions and 0 deletions
|
@ -16,6 +16,13 @@
|
|||
(use-package! sly
|
||||
:hook (lisp-mode-local-vars . sly-editing-mode)
|
||||
:init
|
||||
;; I moved this hook to `lisp-mode-local-vars', so it only affects
|
||||
;; `lisp-mode', and not every other derived lisp mode (like `fennel-mode').
|
||||
;; We run it twice because the hook is both autoloaded and evaluated at
|
||||
;; load-time, so it must be removed twice.
|
||||
(after! (:or emacs sly)
|
||||
(remove-hook 'lisp-mode-hook #'sly-editing-mode))
|
||||
|
||||
(after! lisp-mode
|
||||
(set-repl-handler! 'lisp-mode #'sly-mrepl)
|
||||
(set-eval-handler! 'lisp-mode #'sly-eval-region)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue