diff options
-rw-r--r-- | init.el | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/init.el b/init.el index 1876aa6..4824b75 100644 --- a/init.el +++ b/init.el | |||
@@ -719,12 +719,25 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
719 | ielm-mode | 719 | ielm-mode |
720 | lisp-mode | 720 | lisp-mode |
721 | lisp-interaction-mode | 721 | lisp-interaction-mode |
722 | scheme-mode) | 722 | scheme-mode |
723 | 723 | slime-repl-mode) | |
724 | (defun disable-electric-pair-local-mode () | 724 | |
725 | (electric-pair-local-mode -1)) | 725 | (defun paredit-disable-electric-pair-local-mode () |
726 | 726 | "Disable `electric-pair-local-mode' when `paredit-mode' is enabled." | |
727 | (:hook disable-electric-pair-local-mode) | 727 | (electric-indent-local-mode (if paredit-mode -1 +1))) |
728 | |||
729 | (defun paredit-properly-bind-backspace () | ||
730 | "Properly bind DEL and C-d in `paredit-mode'. | ||
731 | |||
732 | `paredit-mode''s DEL binding is shadowed by that for | ||
733 | `lisp-mode-shared-map', so in this hook I remove the binding I | ||
734 | don't want." | ||
735 | (define-key lisp-mode-shared-map (kbd "DEL") nil) | ||
736 | (define-key paredit-mode-map (kbd "DEL") #'paredit-backward-delete) | ||
737 | (define-key paredit-mode-map (kbd "C-d") #'paredit-forward-delete)) | ||
738 | |||
739 | (:hook paredit-disable-electric-pair-local-mode | ||
740 | paredit-properly-bind-backspace) | ||
728 | 741 | ||
729 | (require 'eldoc) | 742 | (require 'eldoc) |
730 | (eldoc-add-command 'paredit-backward-delete 'paredit-close-round)) | 743 | (eldoc-add-command 'paredit-backward-delete 'paredit-close-round)) |