8000 name 'lp' is not defined on pspecial-lispy-eval · Issue #39 · abo-abo/lpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

name 'lp' is not defined on pspecial-lispy-eval #39

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? 8000 Sign in to your account

Open
joshcho opened this issue Feb 13, 2022 · 1 comment
Open

name 'lp' is not defined on pspecial-lispy-eval #39

joshcho opened this issue Feb 13, 2022 · 1 comment

Comments

@joshcho
Copy link
joshcho commented Feb 13, 2022

When calling pspecial-lispy-eval in certain places (variable assignment within functions), I get the following:

NameError: name ’lp’ is not defined
Traceback (most recent call last):
  File "<string>", line 19, in __PYTHON_EL_eval
  File "/home/usr/try.py", line 2, in <module>
    x = 5

Interestingly enough, the following fixes it:

(define-key lpy-mode-map (kbd "e") (lambda ()
                                       (interactive)
                                       (pspecial-lispy-eval)))

which I don't really understand why.

@fanshi1028
Copy link

When calling pspecial-lispy-eval in certain places (variable assignment within functions), I get the following:

NameError: name ’lp’ is not defined
Traceback (most recent call last):
  File "<string>", line 19, in __PYTHON_EL_eval
  File "/home/usr/try.py", line 2, in <module>
    x = 5

Interestingly enough, the following fixes it:

(define-key lpy-mode-map (kbd "e") (lambda ()
                                       (interactive)
                                       (pspecial-lispy-eval)))

which I don't really understand why.

Check if lispy--python-middleware-loaded-p is t.
If not, run (lispy--python-middleware-load).
This solves the issues for me, hope it helps.

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
0