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

Prevent extra closing brackets in strict mode #650

Closed
gerred opened this issue May 16, 2020 · 2 comments
Closed

Prevent extra closing brackets in strict mode #650

gerred opened this issue May 16, 2020 · 2 comments
Labels
fun task Nice value for the effort to tackle this paredit Paredit and structural editing

Comments

@gerred
Copy link

gerred commented May 16, 2020

Currently, if you open a form, the editor gives you the closing bracket as expected:

()

However, in either mode, you currently can add more closing brackets to this. These brackets are then not deleted (despite there being no form to balance) unless you perform a force delete:

()))))]])} ; backspacing or deleting over these will not remove the unbalanced trailing brackets!

Should this automatically work in strict mode? I go back and forth on this, as force delete gives me a mechanism to still do what I want.

@PEZ
Copy link
Collaborator

PEZ commented May 16, 2020

My gut thinks it makes sense that strict mode prevents this unbalance to enter. Force delete is easy to use and all, but it should be a last resort and not against something Calva has almost helped happen.

Is there a case where someone would want to add extra closing brackets? If it is not a common case that someone could use Cave Man mode to enter them and then switch back to Strict, right?

@PEZ PEZ added fun task Nice value for the effort to tackle this paredit Paredit and structural editing labels May 16, 2020
@PEZ
Copy link
Collaborator

PEZ commented May 16, 2020

I added the fun-task label, because I think this would be pretty entertaining to implement. I'm available to help get you started via Zoom or something if you want to take it on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fun task Nice value for the effort to tackle this paredit Paredit and structural editing
Projects
None yet
Development

No branches or pull requests

2 participants