Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change move-over-) to move-over-)-or-wrap #1666

Conversation

SequentialDesign
Copy link
Contributor

change move-over-) to move-over-)-or-wrap so that if the mark is active, the region will be wrapped with parens and the point will be placed after the close paren, helpful if you don't need to add anything in the parens. could also be helpful if you use pareto mode. and the name is changed so that functionality is not hidden from the user

an odd command, but one that seems like a logical counterpart to insert-()-or-wrap

@cxxxr
Copy link
Member

cxxxr commented Dec 2, 2024

https://github.com/lem-project/lem/pull/1665/files
How is this different from the PR here?
Please fix it as there seems to be a conflict going on.

…active, the region will be wrapped with parens and the point will be placed after the close paren, helpful if you don't need to add anything in the parens. could also be helpful if you use pareto mode. and the name is changed so that functionality is not hidden from the user

an odd command, but one that seems like a logical counterpart to insert-()-or-wrap

the difference between this patch and `insert-()-or-wrap` is that this one puts the point at the end, after the close paren.

(when (point> end |current-point)

(| is the point.)  if we put the region around "current-point" and then execute this command, we will get "(when (point> end (current-point))" and then point will be to the right of the close paren.

(when (point> end (current-point)|)

(| is the point) and then we can execute this command (the region will not be active), and we will skip over the close paren and go to the next line.

(when (point> end (current-point))
  |

(| is the point.)  seems that it could be useful.
@SequentialDesign SequentialDesign force-pushed the change-move-over-)-to-move-over-)-and-wrap branch from 42d8771 to a8bc851 Compare December 2, 2024 06:14
@SequentialDesign
Copy link
Contributor Author

change move-over-) to move-over-)-or-wrap so that if the mark is active, the region will be wrapped with parens and the point will be placed after the close paren, helpful if you don't need to add anything in the parens. could also be helpful if you use pareto mode. and the name is changed so that functionality is not hidden from the user
an odd command, but one that seems like a logical counterpart to insert-()-or-wrap

the difference between this patch and insert-()-or-wrap is that this one puts the point at the end, after the close paren.

(when (point> end |current-point)

(| is the point.) if we put the region around "current-point" and then execute this command, we will get "(when (point> end (current-point))" and then point will be to the right of the close paren.

(when (point> end (current-point)|)

(| is the point) and then we can execute this command (the region will not be active), and we will skip over the close paren and go to the next line.

(when (point> end (current-point))
|

(| is the point.) seems that it could be useful.

@cxxxr
Copy link
Member

cxxxr commented Dec 2, 2024

Ah, indeed.
I misread it and thought it was the same command change.
Thank you for fixing the conflicts, will merge.

@cxxxr cxxxr merged commit 4114452 into lem-project:main Dec 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants