[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit 856d927 180/224: Use `paredit-preserving-column' i
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit 856d927 180/224: Use `paredit-preserving-column' in `paredit-reindent-defun'. |
Date: |
Sat, 7 Aug 2021 09:22:45 -0400 (EDT) |
branch: elpa/paredit
commit 856d927bfb94c9a39005a92a7c71ba8f62a42115
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Use `paredit-preserving-column' in `paredit-reindent-defun'.
---
paredit.el | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/paredit.el b/paredit.el
index 0be1477..a79db21 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1015,21 +1015,11 @@ If the point is in a string or a comment, fill the
paragraph instead,
(if (or (paredit-in-string-p)
(paredit-in-comment-p))
(lisp-fill-paragraph argument)
- (let ((column (current-column))
- (indentation (paredit-current-indentation)))
- (save-excursion (end-of-defun) (beginning-of-defun) (indent-sexp))
- ;; Preserve the point's position either in the indentation or in
- ;; the code: if on code, move with the code; if in indentation,
- ;; leave it in the indentation, either where it was (if that's
- ;; still indentation) or at the end of the indentation (if the
- ;; code moved far enough left).
- (let ((indentation* (paredit-current-indentation)))
- (goto-char
- (+ (point-at-bol)
- (cond ((not (< column indentation))
- (+ column (- indentation* indentation)))
- ((<= indentation* column) indentation*)
- (t column))))))))
+ (paredit-preserving-column
+ (save-excursion
+ (end-of-defun)
+ (beginning-of-defun)
+ (indent-sexp)))))
;;;; Comment Insertion
- [nongnu] elpa/paredit f25cd3b 159/224: Add a zillion paredit-kill tests. Fix a tiny bug they revealed., (continued)
- [nongnu] elpa/paredit f25cd3b 159/224: Add a zillion paredit-kill tests. Fix a tiny bug they revealed., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 460254d 162/224: Fix paredit-doublequote inside a string escape., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit db82936 163/224: Make `paredit-forward' and `paredit-backward' move out of strings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 18cf19f 164/224: Implement `paredit-preserving-column'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 5840f55 165/224: Preserve column better in `paredit-join'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 9838fe2 174/224: In check.sh, use $EMACS if set, defaulting to `emacs'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 3bdd840 175/224: Rework paredit-semicolon and add some tests for it., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 014cdfe 177/224: Handle shift selection in motion commands in recent GNU Emacs., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit be28e85 178/224: Mention shift selection for motion commands in NEWS., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 42a0494 179/224: Use $EMACS in genhtml.sh too., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 856d927 180/224: Use `paredit-preserving-column' in `paredit-reindent-defun'.,
ELPA Syncer <=
- [nongnu] elpa/paredit a26c148 182/224: Bind M-[ to paredit-wrap-square., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 4e5ba81 184/224: Make slurping `(|) foo' yield `(|foo)', not `(| foo)'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0c805ec 188/224: Rework HTML output to simplify and prettify everything., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 5114a62 193/224: If in a string, slurp into the enclosing list if necessary., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 8b38538 190/224: A little more HTML tweaking. Not perfect, but enough for the day., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 6304b64 191/224: Suggest `M-x enable-paredit-mode RET'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b68216f 197/224: Add news item about changes to HTML reference., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit cde0dbb 199/224: Note nicer slurpage into an empty list in NEWS., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit d36f200 200/224: Add autoload cookie for `enable-paredit-mode'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit bf19566 198/224: Note omission of `backward-down-list' in NEWS., ELPA Syncer, 2021/08/07