diff options
author | Case Duckworth | 2021-04-12 21:19:32 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-12 21:19:32 -0500 |
commit | a571580171df794128a6effe0644baa71234a153 (patch) | |
tree | 1632dc5c9114be4c39f2e7c1d6145e9259e1e15b | |
parent | Back to `icomplete-mode' (diff) | |
download | emacs-a571580171df794128a6effe0644baa71234a153.tar.gz emacs-a571580171df794128a6effe0644baa71234a153.zip |
Fix a bug with paredit not properly indenting lisp
... i honestly don't know.
-rw-r--r-- | init.el | 21 |
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 | ||
765 | don'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)) |