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

macrostep-expand fails with a "Scan error" unlike eval-last-sexp #11

Open
Tracked by #1
wasamasa opened this issue Jun 26, 2015 · 1 comment
Open
Tracked by #1

Comments

@wasamasa
Copy link

With eval-last-sexp you can evaluate the last expression even if you put your cursor on the whitespace after the outer form, macrostep-expand however fails with Scan error: "Unbalanced parentheses". Would it make sense to remedy this behaviour for more consistency?

@stsquad
Copy link

stsquad commented Apr 27, 2018

Now I know what the problem is I have this fairly dumb solution:

;; see https://github.com/joddie/macrostep/issues/11
(defun my-macrostep-expand-wrapper ()
  "Workaround `macrostep-expand' not liking white-space after a sexp."
  (interactive)
  (when (and (= ?\n (char-after))
             (= (point) (cdr (bounds-of-thing-at-point 'sexp))))
    (backward-char))
  (macrostep-expand))

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

2 participants