summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell+paredit@mumble.net>2022-07-09 09:12:39 +0000
committerTaylor R Campbell <campbell+paredit@mumble.net>2022-07-09 09:16:42 +0000
commit42500e5d450c88a3b249b548be447577d8549b17 (patch)
tree867c83d6e9b53e3997be8f6e3cc7215d04e4405d /paredit.el
parentd0b1a2f42fb47efc8392763d6487fd027e3a2955 (diff)
Note that Paredit Mode and Electric Indent Mode are incompatible.
As far as I'm aware, Electric Indent Mode contributes nothing useful when Paredit Mode is enabled, but makes it difficult to get newline auto-indent working consistently. Suggest an alternative if what you want is for RET to auto-indent and C-j to insert plain newline.
Diffstat (limited to 'paredit.el')
-rw-r--r--paredit.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/paredit.el b/paredit.el
index 67febc9..d8d01d6 100644
--- a/paredit.el
+++ b/paredit.el
@@ -109,6 +109,16 @@
;;;
;;; (foo (bar | baz) quux) C-<right> (foo (bar | baz quux))
;;;
+;;; Note: Paredit Mode is not compatible with Electric Indent Mode.
+;;; Use one or the other, not both. If you want RET to auto-indent and
+;;; C-j to just insert newline in Paredit Mode, simply rebind the keys
+;;; with the following fragment in your .emacs file:
+;;;
+;;; (eval-after-load 'paredit
+;;; '(progn
+;;; (define-key paredit-mode-map (kbd "RET") 'paredit-newline)
+;;; (define-key paredit-mode-map (kbd "C-j") nil)))
+;;;
;;; Some paredit commands automatically reindent code. When they do,
;;; they try to indent as locally as possible, to avoid interfering
;;; with any indentation you might have manually written. Only the