diff options
author | Taylor R Campbell <campbell@mumble.net> | 2011-04-09 20:06:10 +0000 |
---|---|---|
committer | Taylor R Campbell <campbell@mumble.net> | 2011-04-09 20:06:10 +0000 |
commit | 8ee8f1391fadaab6c39b1fdb7d1d004da9df4d05 (patch) | |
tree | 0614c9317d1e5ae624da8046c7321752823907b0 /paredit.el | |
parent | 1045e150a69bd423514bbfbd93d51fb42deb8ef3 (diff) |
Fix `paredit-insert-pair' when buffer ends with no-newline comment.
Ignore-this: 18f0bece3d6a499eaec1befe180a4faf
darcs-hash:20110409200610-00fcc-05f1a5029eaea4ab0600bb5ee3dfeb5efff55761
Diffstat (limited to 'paredit.el')
-rw-r--r-- | paredit.el | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -742,6 +742,12 @@ If such a comment exists, delete the comment (including all leading (prefix-numeric-value n)))) (regionp (funcall forward (+ end (if spacep 2 1))))) + ;; The string case can happen if we are inserting string + ;; delimiters. The comment case may happen by moving to the + ;; end of a buffer that has a comment with no trailing newline. + (if (and (not (paredit-in-string-p)) + (paredit-in-comment-p)) + (newline)) (insert close) (if (paredit-space-for-delimiter-p t close) (insert " ")))))) |