diff options
author | Taylor R Campbell <campbell@mumble.net> | 2010-09-18 15:19:00 +0000 |
---|---|---|
committer | Taylor R Campbell <campbell@mumble.net> | 2010-09-18 15:19:00 +0000 |
commit | d265584f55daf7f0a5ad7e8b866a2d1e8ecd60c5 (patch) | |
tree | 9e84f80b511bba26bce623138f928584403c2e84 | |
parent | ab99e9398dc136df52cb38d48d3db53b09aa9d44 (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
-rw-r--r-- | paredit.el | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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)))) |