[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit a79aa2c 082/224: Fix end-of-line and end-of-buffer
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit a79aa2c 082/224: Fix end-of-line and end-of-buffer corner cases of `paredit-semicolon'. |
Date: |
Sat, 7 Aug 2021 09:22:23 -0400 (EDT) |
branch: elpa/paredit
commit a79aa2c61e8127ff3f2c0c63a772b6d3b12cf785
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Fix end-of-line and end-of-buffer corner cases of `paredit-semicolon'.
Ignore-this: 799e1e911ebd252aec4ce53d85935236
Don't break the line if the point is at the end of the line already,
or if the point is on the last line of the buffer and there is no
trailing line break.
darcs-hash:20110322074906-00fcc-768c7e264b5142c25909573edaf157b79a44ccbb
---
paredit.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/paredit.el b/paredit.el
index f11fc7b..a887ddc 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1045,7 +1045,8 @@ If a list begins on the line after the point but ends on
a different
(defun paredit-semicolon-find-line-break-point ()
(let ((line-break-point nil)
(eol (point-at-eol)))
- (and (save-excursion
+ (and (not (eolp)) ;Implies (not (eobp)).
+ (save-excursion
(paredit-handle-sexp-errors
(progn
(while
@@ -1055,7 +1056,10 @@ If a list begins on the line after the point but ends on
a different
(and (eq eol (point-at-eol))
(not (eobp)))))
(backward-sexp)
- (eq eol (point-at-eol)))
+ (and (eq eol (point-at-eol))
+ ;; Don't break the line if the end of the last
+ ;; S-expression is at the end of the buffer.
+ (progn (forward-sexp) (not (eobp)))))
;; If we hit the end of an expression, but the closing
;; delimiter is on another line, don't break the line.
(save-excursion
- [nongnu] elpa/paredit 3ce96a4 050/224: Fix format arguments in `paredit-check-region-state-comment'., (continued)
- [nongnu] elpa/paredit 3ce96a4 050/224: Fix format arguments in `paredit-check-region-state-comment'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 73c481a 061/224: Simplify and clarify implementation of `paredit-backslash'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b51f220 055/224: In `paredit-newline', ignore parse errors during `indent-sexp'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0011090 066/224: Fix bounds checking in `paredit-find-next-string-start'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit bd0e5ba 072/224: Don't mask errors during `buffer-string' in `paredit-unescape-string'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b7f234a 067/224: Preserve column in `paredit-reindent-defun'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2a94a48 103/224: Set `indent-tabs-mode' and `current-column' in `paredit-test'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit e06ab40 063/224: Spell `paredit-recenter-on-sexp' to match convention in Emacs., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0a7619c 089/224: Fix `imbalanced' -> `unbalanced' in `paredit-kill-ring-save' docstring., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 9faf474 073/224: Use `scan-sexps' for noninteractive `check-parens'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit a79aa2c 082/224: Fix end-of-line and end-of-buffer corner cases of `paredit-semicolon'.,
ELPA Syncer <=
- [nongnu] elpa/paredit 8a85899 098/224: Omit vestigial debugging message from `paredit-test' in test.el., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 678d843 107/224: Make the exhortation about bug reports slightly less harsh., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit f5e7959 081/224: Show point in `paredit-splice-sexp-killing-forward' example., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 4800e25 101/224: Use `let*' rather than `let' in `paredit-indent-sexps'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit dd8c16f 105/224: Omit vestigial unattached asterisk in summary at top., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 1045e15 117/224: Add trivial tests for `paredit-open-...' with prefix arguments., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 67a3f00 126/224: Support setting the mark in test cases, indicated by an underscore., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b558286 138/224: Add character deletion tests to verify the new `paredit-in-char-p'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 73e664e 119/224: Add test for C-u ( with trailing comment and no trailing newline., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit aa42c19 140/224: Tweak a `paredit-reindent-defun' test slightly., ELPA Syncer, 2021/08/07