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

sly-mrepl-mode-map void #120

Closed
mfiano opened this issue Aug 10, 2017 · 3 comments
Closed

sly-mrepl-mode-map void #120

mfiano opened this issue Aug 10, 2017 · 3 comments

Comments

@mfiano
Copy link

mfiano commented Aug 10, 2017

I'm not sure when this regression took place as I haven't updated sly in about 6 months, but a recent upgrade broke sly-mrepl-mode-map.

Symbol’s value as variable is void: sly-mrepl-mode-map

...unless I specifically load the sly-mrepl package in a "with-eval-after-load sly" form.

@joaotavora
Copy link
Owner

A recent upgrade to what exactly? SLY?

Anyway, a define-key to a package-specific map should either come after a require of that package or inside a with-eval-after-load block as you suggest. It's slightly more correct to use with-eval-after-load sly-mrepl though.

Does it work OK with that line?

I guess the load order before the upgrade was defining that map early and you got away with the crime.

@mfiano
Copy link
Author

mfiano commented Aug 10, 2017

Ah, I was always doing (use-package sly :bind (sly-mrepl-mode-map ...))) (I'm not sure if that syntax is correct being away from my config, but you get the point). It wasn't until last week that I upgraded sly and I had to move the bind out of sly's use-package form and do (use-package sly-mrepl :after sly :bind ...)

@joaotavora
Copy link
Owner

joaotavora commented Aug 10, 2017

I had, until now, no idea what the semantics of the :bind clause inuse-package were. You see, I can only build SLY on top of core emacs stuff and use-package isn't core, though I admit it's popular.

On a tangent, don't you get curious about learning Emacs with just its bare bones and ditching those million little packages? It takes less time than you think and generally becomes more consistent.

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