[Fix 489] Inserting parens before comment form doesn't move point #490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#489
In a form like
|
(comment
(stuff))
Entering parens with paredit would put the parens right before the comment
block. Paredit determines if it is in a comment to insert parens so it doesn't
automatically enter a closing when in a comment or a string. Part of this called
beginning-of-defun which we have modified.
The error here was that rater than just going to the beginning of the form, we
went to the end and then back one logical form to be at the beginning. This is
identical behavior unless you are between two forms. Going straight to the
beginning put you in the first form, going to the end and then the beginning
puts you in the second form. I.e.,
(formA)
|
(formB)
Our beginning of form went to formB but it should go to formA.
Replace this placeholder text with a summary of the changes in your PR.
Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):
M-x checkdoc
and fixed any warnings in the code you've written.Thanks!