[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit ab99e93 044/224: Simplify definition of `paredit-k
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit ab99e93 044/224: Simplify definition of `paredit-kill-line-in-string'. |
Date: |
Sat, 7 Aug 2021 09:22:15 -0400 (EDT) |
branch: elpa/paredit
commit ab99e9398dc136df52cb38d48d3db53b09aa9d44
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Simplify definition of `paredit-kill-line-in-string'.
Ignore-this: 2675f8bbbfd6cd029b434f233344b4a2
Now it relies on Emacs's S-expression parser to find where the string
ends, rather than parsing and handling character escapes itself. It
does a little more work this way, because it moves forward over the
whole string even if the line ends long before the string ends, but
this definition is simpler and more robust for correctness.
darcs-hash:20100918151218-00fcc-5362e4359bb7ce34076f875c6d8b3eb444f0f360
---
paredit.el | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/paredit.el b/paredit.el
index 550de92..c4e19f3 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1356,13 +1356,9 @@ With a numeric prefix argument N, do `kill-line' that
many times."
;; Be careful not to split an escape sequence.
(if (paredit-in-string-escape-p)
(backward-char))
- (let ((beginning (point)))
- (while (not (or (eolp) (eq ?\" (char-syntax (char-after)))))
- (forward-char)
- ;; Skip past escaped characters.
- (if (eq (char-before) ?\\ )
- (forward-char)))
- (kill-region beginning (point))))))
+ (kill-region (point)
+ (min (point-at-eol)
+ (cdr (paredit-string-start+end-points)))))))
(defun paredit-kill-sexps-on-line ()
(if (paredit-in-char-p) ; Move past the \ and prefix.
- [nongnu] elpa/paredit 004d257 013/224: Changes for version 17., (continued)
- [nongnu] elpa/paredit 004d257 013/224: Changes for version 17., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 7f89e54 014/224: Changes for version 18., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 17852a0 019/224: Call `comment-forward' as a symbol with `funcall'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2f3db5f 021/224: Broaden `paredit-raise-sexp' to act sensibly on strings and characters., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 8ab1694 022/224: Change `paredit-comment-on-line-p' to use `comment-search-forward'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit e121b92 024/224: Clarify `paredit-insert-comment' and change its criteria for code comments., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 451ea5e 025/224: Add magic autoload comment for `paredit-mode'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit a386bdf 031/224: Call `end-of-defun' in `paredit-reindent-defun'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0d7a39d 032/224: Un-deprecate `enable-paredit-mode' and `disable-paredit-mode'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit db3a581 037/224: Switch copying terms to GPLv3+., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit ab99e93 044/224: Simplify definition of `paredit-kill-line-in-string'.,
ELPA Syncer <=
- [nongnu] elpa/paredit 5bfc873 047/224: Fix `paredit-copy-as-kill' within strings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit d265584 045/224: Fix `paredit-kill' on whitespace character literal with margin comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 7b31864 046/224: Check `eolp' before using `char-after' in `paredit-kill'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 30f564d 051/224: Add utilities for `check-parens' restricted to a region., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit d3723a0 059/224: Tweak second page. Remove rants and IRC reference., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 89aa6fb 057/224: Eliminate non-interactive use of `goto-line'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit b9f46b5 060/224: Rework third page to make it much more readable., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 24d2ade 053/224: Bump version: 22 beta -> 22., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 79fd488 058/224: Bump copyright year to 2011., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit c655f5c 052/224: Change header and footer to conform to elisp guidelines., ELPA Syncer, 2021/08/07