Skip to content

Conversation

plexus
Copy link
Contributor

@plexus plexus commented Nov 13, 2020

This function find the sexp to evaluate with clojure-backward-logical-sexp,
but replaces it with backward-kill-sexp. This leads to incorrect results, e.g.
when eval+replacing #inst "2020", you get #inst #inst "2020".

@bbatsov
Copy link
Member

bbatsov commented Nov 13, 2020

The change looks good to me. Just add a bugfix changelog entry and we're good to go.

This function find the sexp to evaluate with `clojure-backward-logical-sexp`,
but replaces it with `backward-kill-sexp`. This leads to incorrect results, e.g.
when eval+replacing `#inst "2020"`, you get `#inst #inst "2020"`.
@plexus plexus force-pushed the arne/replace-logical-sexp branch from 9a33349 to 6729148 Compare November 13, 2020 12:18
@plexus
Copy link
Contributor Author

plexus commented Nov 13, 2020

Done! Thanks!

@bbatsov bbatsov merged commit aa43713 into clojure-emacs:master Nov 13, 2020
@bbatsov
Copy link
Member

bbatsov commented Nov 13, 2020

🙇‍♂️

@plexus
Copy link
Contributor Author

plexus commented Nov 13, 2020

Thanks for the quick merge! I may have some other small PRs coming up, trying to clean up my monkey patching :) Starting with the least controversial stuff. https://github.com/plexus/corgi/blob/main/init.el#L129-L208

@plexus plexus deleted the arne/replace-logical-sexp branch November 13, 2020 12:34
@bbatsov
Copy link
Member

bbatsov commented Nov 13, 2020

Sure! It has been pretty quiet CIDER's front lately, so a few PRs (even controversial ones are quite welcome).

(cider-nrepl-sync-request:eval last-sexp)
;; seems like the sexp is valid, so we can safely kill it
(backward-kill-sexp)
(let ((opoint (point)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to myself - this might be an useful function to add in clojure-mode - clojure-backward-kill-logical-sexp.

@plexus
Copy link
Contributor Author

plexus commented Nov 13, 2020

Quiet is good sometimes :)

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