From 2b69e6e31cd6191bc58ec2ecc03fae467d1ee61b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 10 Apr 2021 17:31:40 -0500 Subject: Refactor to define all lispish modes in one place See variable `lispy-modes' --- init.el | 22 ++++++++++++++-------- 1 file 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'." (apheleia--get-formatter-command)) (indent-region (point-min) (point-max))))) +;;; Lisps +(defvar lispy-modes '(emacs-lisp-mode + eval-expression-minibuffer + ielm-mode + lisp-mode + lisp-interaction-mode + scheme-mode + slime-repl-mode) + "List of modes that are lisp-like enough to hook packages into.") + (setup (:straight paren-face) - (global-paren-face-mode +1)) + (dolist (mode lispy-modes) + (:hook-into mode))) (setup (:straight paredit) (autoload 'enable-paredit-mode "paredit" nil t) - (:hook-into emacs-lisp-mode - eval-expression-minibuffer - ielm-mode - lisp-mode - lisp-interaction-mode - scheme-mode - slime-repl-mode) + (dolist (mode lispy-modes) + (:hook-into mode)) (defun paredit-disable-electric-pair-local-mode () "Disable `electric-pair-local-mode' when `paredit-mode' is enabled." -- cgit 1.4.1-21-gabe81