use-package paredit

This commit is contained in:
larstvei 2023-06-13 01:35:40 +02:00
parent f0ee34e1b5
commit cdc91acd35

View File

@ -207,8 +207,7 @@
(let* ((package--builtins nil) (let* ((package--builtins nil)
(packages (packages
'(paredit ; minor mode for editing parentheses '(pdf-tools ; Emacs support library for PDF files
pdf-tools ; Emacs support library for PDF files
proof-general ; A generic Emacs interface for proof assistants proof-general ; A generic Emacs interface for proof assistants
racket-mode ; Major mode for Racket language racket-mode ; Major mode for Racket language
rustic ; Rust development environment rustic ; Rust development environment
@ -1403,11 +1402,17 @@
** Lisp ** Lisp
I use =Paredit= when editing lisp code, we enable this for all lisp-modes. I use [[https://paredit.org/][Paredit]] when editing lisp code, we enable this for all lisp-modes.
Paredit version 25 [[https://paredit.org/cgit/paredit/plain/NEWS][seems to interfere]] with REPL-modes, and unbinding =RET=
is the proposed fix.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(dolist (mode '(cider-repl-mode ;; minor mode for editing parentheses
(use-package paredit
:defer t
:bind (:map paredit-mode-map ("RET" . nil))
:hook ((cider-repl-mode
clojure-mode clojure-mode
ielm-mode ielm-mode
racket-mode racket-mode
@ -1416,19 +1421,8 @@
lisp-mode lisp-mode
emacs-lisp-mode emacs-lisp-mode
lisp-interaction-mode lisp-interaction-mode
scheme-mode)) scheme-mode)
;; add paredit-mode to all mode-hooks . paredit-mode))
(add-hook (intern (concat (symbol-name mode) "-hook")) 'paredit-mode))
#+end_src
Paredit version 25 seems to interfere with REPL-modes. This is the proposed
fix:
#+begin_src emacs-lisp
(with-eval-after-load 'paredit
(define-key paredit-mode-map (kbd "RET") nil))
#+end_src #+end_src