diff options
author | Case Duckworth | 2021-04-10 17:31:40 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-10 17:31:40 -0500 |
commit | 2b69e6e31cd6191bc58ec2ecc03fae467d1ee61b (patch) | |
tree | 23f527f727f8e9d97272aa366a790c8a8601bdc6 | |
parent | Reorganize a bit (diff) | |
download | emacs-2b69e6e31cd6191bc58ec2ecc03fae467d1ee61b.tar.gz emacs-2b69e6e31cd6191bc58ec2ecc03fae467d1ee61b.zip |
Refactor to define all lispish modes in one place
See variable `lispy-modes'
-rw-r--r-- | init.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/init.el b/init.el index 5ec871f..767c8b3 100644 --- a/init.el +++ b/init.el | |||
@@ -716,19 +716,25 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
716 | (apheleia--get-formatter-command)) | 716 | (apheleia--get-formatter-command)) |
717 | (indent-region (point-min) (point-max))))) | 717 | (indent-region (point-min) (point-max))))) |
718 | 718 | ||
719 | ;;; Lisps | ||
720 | (defvar lispy-modes '(emacs-lisp-mode | ||
721 | eval-expression-minibuffer | ||
722 | ielm-mode | ||
723 | lisp-mode | ||
724 | lisp-interaction-mode | ||
725 | scheme-mode | ||
726 | slime-repl-mode) | ||
727 | "List of modes that are lisp-like enough to hook packages into.") | ||
728 | |||
719 | (setup (:straight paren-face) | 729 | (setup (:straight paren-face) |
720 | (global-paren-face-mode +1)) | 730 | (dolist (mode lispy-modes) |
731 | (:hook-into mode))) | ||
721 | 732 | ||
722 | (setup (:straight paredit) | 733 | (setup (:straight paredit) |
723 | (autoload 'enable-paredit-mode "paredit" nil t) | 734 | (autoload 'enable-paredit-mode "paredit" nil t) |
724 | 735 | ||
725 | (:hook-into emacs-lisp-mode | 736 | (dolist (mode lispy-modes) |
726 | eval-expression-minibuffer | 737 | (:hook-into mode)) |
727 | ielm-mode | ||
728 | lisp-mode | ||
729 | lisp-interaction-mode | ||
730 | scheme-mode | ||
731 | slime-repl-mode) | ||
732 | 738 | ||
733 | (defun paredit-disable-electric-pair-local-mode () | 739 | (defun paredit-disable-electric-pair-local-mode () |
734 | "Disable `electric-pair-local-mode' when `paredit-mode' is enabled." | 740 | "Disable `electric-pair-local-mode' when `paredit-mode' is enabled." |