-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Feature/dwim kill region #873
base: master
Are you sure you want to change the base?
Conversation
@@ -9030,7 +9058,13 @@ If that text is unbalanced, signal an error instead. | |||
With a prefix argument, skip the balance check." | |||
(interactive "r") | |||
(when (or current-prefix-arg | |||
(sp-region-ok-p beg end) | |||
(-let [(&plist :ok ok :last-good-sexp last-good-sexp) (sp-get-region-info beg end)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should extract this new block into a separate function as it will be reused multiple times
@@ -9054,28 +9088,47 @@ of the point." | |||
(indent-sexp)) | |||
(sp--back-to-indentation column indentation)))) | |||
|
|||
(cl-defun sp-region-ok-p (start end) | |||
"Test if region between START and END is balanced. | |||
(defun sp-get-region-info (start end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document this somewhere (check if region-ok-p
was documented)
Related to #867