emacs-evil/evil-cleverparens

Deleting and Copying Comments Containing Sexps

noctuid opened this issue · 3 comments

If I select commented lines that contain a sexp and hit d, I get weird behavior. For example, the following

;; (defcustom example t
;;   "example of commented sexp"
;;   :type 'boolean)

will become

()

This also happens when using the comment text object.

Furthermore, if I visually select that comment and hit y or use yac, only ";; " will be copied to the kill ring instead of all three lines.

Trying to delete comments with unbalanced parenthesis will also delete everything but the parens and actually cause the file to have mismatched parens.

Thanks. This problem occurs because smartparens treats `' as a valid pair in Emacs Lisp, which causes problems with quoted symbols. I already stopped using the smartparens safety predicate elsewhere but looks like I'll have to do the same for comments as well, although I'm not yet sure what the best way to do that is. Thanks for the report.

This should be fixed in the latest master now.

Awesome, thank you!