[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit a26a9a7 075/224: Permit joining adjacent lists wit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit a26a9a7 075/224: Permit joining adjacent lists without intervening whitespace. |
Date: |
Sat, 7 Aug 2021 09:22:22 -0400 (EDT) |
branch: elpa/paredit
commit a26a9a75e0472abc35ae877fcfc2a4b10745c588
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Permit joining adjacent lists without intervening whitespace.
Ignore-this: c058945ef1f3c5590c36a034121811e8
Insert whitespace if it may be necessary.
Thanks to Eitan Postavsky for the bug report.
darcs-hash:20110322074446-00fcc-e3303edd5c9055a9687d22f99379d23f8879eba7
---
paredit.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/paredit.el b/paredit.el
index 6d8d827..cbbbafb 100644
--- a/paredit.el
+++ b/paredit.el
@@ -2282,7 +2282,7 @@ Both must be lists, strings, or atoms; error if there is
a mismatch."
(right-char (char-after right-point)))
(let ((left-syntax (char-syntax left-char))
(right-syntax (char-syntax right-char)))
- (cond ((>= left-point right-point)
+ (cond ((< right-point left-point)
(error "Can't join a datum with itself."))
((and (eq left-syntax ?\) )
(eq right-syntax ?\( )
@@ -2293,6 +2293,11 @@ Both must be lists, strings, or atoms; error if there is
a mismatch."
(delete-char 1)
(goto-char left-point)
(backward-delete-char 1)
+ ;; Heuristic kludge: (foo)(bar) => (foo bar).
+ (if (and (= left-point right-point)
+ (not (or (eq ?\s (char-syntax (char-before)))
+ (eq ?\s (char-syntax (char-after))))))
+ (insert ?\s))
(backward-up-list)
(indent-sexp))
((and (eq left-syntax ?\" )
- [nongnu] branch elpa/paredit created (now 8330a41), ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit de45eb6 005/224: Changes for version 9., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 9464588 016/224: Changes for version 20., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0ada66e 023/224: Update the compatibility and compiler warning suppression hacks for Emacs 22., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit f7c26b9 027/224: Fix kill & yank errors with `paredit-lose-if-not-in-sexp' while barfing., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 929e547 038/224: Fix some opening remarks about enabling paredit mode., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 90c7eda 042/224: Revive `paredit-semicolon', with better behaviour., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit a26a9a7 075/224: Permit joining adjacent lists without intervening whitespace.,
ELPA Syncer <=
- [nongnu] elpa/paredit f27c480 070/224: Implement `paredit-override-check-parens-function'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 67caf7e 071/224: Eliminate fboundp check for `check-parens' in `paredit-check-region'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit ae53a2c 077/224: Show point in `paredit-semicolon' example., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 26a3ddb 085/224: Add `paredit-doublequote' examples at end of string and in comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 33463ae 102/224: Third argument to `indent-region' is not optional in GNU Emacs 21., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit c91bc2f 099/224: Fix bug in change to check structure in backward-delete of comment end., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 7e3b3f0 096/224: In `paredit-recenter-on-sexp', handle S-expressions larger than screen., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 6918d89 108/224: Don't indent while the buffer is in intermediate broken states., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit adfccc5 123/224: Check `paredit-kill' in a comment more carefully., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 23afafc 128/224: Add some trivial tests for region deletion/killing commands., ELPA Syncer, 2021/08/07