diff options
author | Taylor R Campbell <campbell@mumble.net> | 2011-03-23 03:49:16 +0000 |
---|---|---|
committer | Taylor R Campbell <campbell@mumble.net> | 2011-03-23 03:49:16 +0000 |
commit | c91bc2f64caf3a1b9862db6f854a1620452a7f5c (patch) | |
tree | b9cee0c170fcf2700244df1d5a903b0fbdd80c6b /paredit.el | |
parent | 8a85899de6168de009ab9536717d8481c65aa681 (diff) |
Fix bug in change to check structure in backward-delete of comment end.
Ignore-this: a404afd4e847db4ef89b17de42d431e4
It was copied & pasted from `paredit-forward-delete-in-comment'
incautiously and lacked a necessary `save-excursion'.
darcs-hash:20110323034916-00fcc-55ea95fc6be8f4b57fbadfd2c8cc04942dbd2b1e
Diffstat (limited to 'paredit.el')
-rw-r--r-- | paredit.el | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1374,11 +1374,13 @@ With a `C-u' prefix argument, simply delete a character backward, (defun paredit-backward-delete-maybe-comment-end () ;; Refuse to delete a comment end if moving the line into the comment ;; would break structure. - (let ((line-start-state (paredit-current-parse-state))) - (if (not (comment-search-forward (point-at-eol) t)) - (goto-char (point-at-eol))) - (let ((line-end-state (paredit-current-parse-state))) - (paredit-check-region-state line-start-state line-end-state))) + (let* ((line-start-state (paredit-current-parse-state)) + (line-end-state + (save-excursion + (if (not (comment-search-forward (point-at-eol) t)) + (goto-char (point-at-eol))) + (paredit-current-parse-state)))) + (paredit-check-region-state line-start-state line-end-state)) (backward-delete-char 1)) ;;;; Killing |