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

emr-el-extract-to-let can't handle top-level expressions in a defun #11

Open
Wilfred opened this issue Feb 5, 2016 · 1 comment
Open

Comments

@Wilfred
Copy link
Owner

Wilfred commented Feb 5, 2016

Given the code, where | is point:

(defun foobar (x)
  |(+ x 1))

emr-show-refactor-menu does not offer extract to let. If I explicitly run M-x emr-el-extract-to-let, I get:

(let ()
  (defun foobar (let ((y (x))) y)
    (+ x 1)))
@Wilfred
Copy link
Owner Author

Wilfred commented Jul 5, 2018

Point needs to be inside the form apparently:

(defun foobar (x)
  (|+ x 1))

This works. This is a gotcha.

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

No branches or pull requests

1 participant