summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el21
1 files changed, 1 insertions, 20 deletions
diff --git a/init.el b/init.el index ef508bc..2397eee 100644 --- a/init.el +++ b/init.el
@@ -748,27 +748,8 @@ if ripgrep is installed, otherwise `consult-grep'."
748 (add-hook (intern (concat (symbol-name mode) "-hook")) #'paren-face-mode))) 748 (add-hook (intern (concat (symbol-name mode) "-hook")) #'paren-face-mode)))
749 749
750(setup (:straight paredit) 750(setup (:straight paredit)
751 (autoload 'enable-paredit-mode "paredit" nil t)
752
753 (dolist (mode lispy-modes) 751 (dolist (mode lispy-modes)
754 (add-hook (intern (concat (symbol-name mode) "-hook")) #'enable-paredit-mode)) 752 (add-hook (intern (concat (symbol-name mode) "-hook")) #'paredit-mode))
755
756 (defun paredit-disable-electric-pair-local-mode ()
757 "Disable `electric-pair-local-mode' when `paredit-mode' is enabled."
758 (electric-indent-local-mode (if paredit-mode -1 +1)))
759
760 (defun paredit-properly-bind-backspace ()
761 "Properly bind DEL and C-d in `paredit-mode'.
762
763`paredit-mode''s DEL binding is shadowed by that for
764`lisp-mode-shared-map', so in this hook I remove the binding I
765don't want."
766 (define-key lisp-mode-shared-map (kbd "DEL") nil)
767 (define-key paredit-mode-map (kbd "DEL") #'paredit-backward-delete)
768 (define-key paredit-mode-map (kbd "C-d") #'paredit-forward-delete))
769
770 (:hook paredit-disable-electric-pair-local-mode
771 paredit-properly-bind-backspace)
772 753
773 (require 'eldoc) 754 (require 'eldoc)
774 (eldoc-add-command 'paredit-backward-delete 'paredit-close-round)) 755 (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))