[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit adfccc5 123/224: Check `paredit-kill' in a comment
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit adfccc5 123/224: Check `paredit-kill' in a comment more carefully. |
Date: |
Sat, 7 Aug 2021 09:22:33 -0400 (EDT) |
branch: elpa/paredit
commit adfccc519e17f3e7a3596fe20480398d9ea0956a
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Check `paredit-kill' in a comment more carefully.
Ignore-this: 15f19e277834ce01b503d4adde69f56e
darcs-hash:20110411180857-00fcc-c3b0a9464be06835aaf1ce7fb06034c31705ea37
---
paredit.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/paredit.el b/paredit.el
index 72d7544..0541382 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1400,7 +1400,7 @@ With a numeric prefix argument N, do `kill-line' that
many times."
((paredit-in-string-p)
(paredit-kill-line-in-string))
((paredit-in-comment-p)
- (kill-line))
+ (paredit-kill-line-in-comment))
((save-excursion (paredit-skip-whitespace t (point-at-eol))
(or (eolp) (eq (char-after) ?\; )))
;** Be careful about trailing backslashes.
@@ -1421,6 +1421,15 @@ With a numeric prefix argument N, do `kill-line' that
many times."
(min (point-at-eol)
(cdr (paredit-string-start+end-points)))))))
+(defun paredit-kill-line-in-comment ()
+ ;; If we're at the end of line, this is the same as deleting the line
+ ;; end, which `paredit-forward-delete-in-comment' handles carefully.
+ ;; The variable `kill-whole-line' is not relevant: the point is in a
+ ;; comment, and hence not at the beginning of the line.
+ (if (eolp)
+ (paredit-forward-delete-in-comment)
+ (kill-line)))
+
(defun paredit-kill-sexps-on-line ()
(if (paredit-in-char-p) ; Move past the \ and prefix.
(backward-char 2)) ; (# in Scheme/CL, ? in elisp)
- [nongnu] elpa/paredit 90c7eda 042/224: Revive `paredit-semicolon', with better behaviour., (continued)
- [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, 2021/08/07
- [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 <=
- [nongnu] elpa/paredit 23afafc 128/224: Add some trivial tests for region deletion/killing commands., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2e61740 134/224: Fix docstring of `paredit-check-region-for-delete'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit eb138b5 135/224: Replace `paredit-wrap-sexp' tests by `paredit-wrap-round' &c. tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit a795774 143/224: Set `show-trailing-whitespace' to nil when running tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit f349cc5 003/224: Changes for version 7., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit f588dcb 007/224: Changes for version 11., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit a04d9b6 010/224: Changes for version 14, introducing fancy comment handling., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 342fee5 017/224: Changes for version 21., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 1bb9831 002/224: Changes for versions 2--6., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 36f2f18 009/224: Changes for version 13., ELPA Syncer, 2021/08/07