summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2010-09-18 15:19:00 +0000
committerTaylor R Campbell <campbell@mumble.net>2010-09-18 15:19:00 +0000
commitd265584f55daf7f0a5ad7e8b866a2d1e8ecd60c5 (patch)
tree9e84f80b511bba26bce623138f928584403c2e84 /paredit.el
parentab99e9398dc136df52cb38d48d3db53b09aa9d44 (diff)
Fix `paredit-kill' on whitespace character literal with margin comment.
Ignore-this: 83cd857a1c3155fc0f9c30e8dc680d9a Before (| is point, not character literal): #\| ;foo =C-k=> #\| Note the dangling backslash: deleting it also deletes the line break. After: #\| ;foo =C-k=> #| darcs-hash:20100918151900-00fcc-d375fe5ced8edfb3fce71e189acd9166800ec0d5
Diffstat (limited to 'paredit.el')
-rw-r--r--paredit.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/paredit.el b/paredit.el
index c4e19f3..55c5eef 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1339,12 +1339,15 @@ With a numeric prefix argument N, do `kill-line' that many times."
(kill-line (if (integerp argument) argument 1)))
((paredit-in-string-p)
(paredit-kill-line-in-string))
- ((or (paredit-in-comment-p)
- (save-excursion
- (paredit-skip-whitespace t (point-at-eol))
- (or (eq (char-after) ?\; )
- (eolp))))
+ ((paredit-in-comment-p)
+ (kill-line))
+ ((save-excursion
+ (paredit-skip-whitespace t (point-at-eol))
+ (or (eq (char-after) ?\; )
+ (eolp)))
;** Be careful about trailing backslashes.
+ (if (paredit-in-char-p)
+ (backward-char))
(kill-line))
(t (paredit-kill-sexps-on-line))))