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

Invalid function: scala-mode-map:define-keys #48

Closed
adinapoli opened this issue Feb 26, 2013 · 6 comments
Closed

Invalid function: scala-mode-map:define-keys #48

adinapoli opened this issue Feb 26, 2013 · 6 comments

Comments

@adinapoli
Copy link

Hello all,

I've installed scala-mode2 from melpa. I'm using the new emacs24.2.93.

This is what I've added to my .emacs to make scala-mode2 work:

(when (not (package-installed-p 'scala-mode2))
  (package-install 'scala-mode2))
(require 'scala-mode2)

This is what I get when opening emacs:

´´´
Invalid function: scala-mode-map:define-keys
´´´

ideas?

Cheers!
A.

@hvesalai
Copy link
Owner

scala-mode-map:define-keys is a macro defined in the beginning of scala-mode2-map.el and only used in the same file. That's why this sounds very strange.

Have you ever installed any older version scala-mode and could there be files from it remaining in your load-path?

If you are not scared of debugging elisp, then you can start your emacs with the --debug-init switch. This will give you a stack trace of what went wrong. In the stack trace you can which file was being loaded when the problem occured.

BTW. If the function/macro was missing, the error would be

Symbol's function definition is void: scala-mode-map:define-keys

so what you are seeing is actually something different.

p.s. if you get the stacktrace, please include it here as a comment.

@adinapoli
Copy link
Author

Weirdly enough, I was not able to reproduce this issue on my workplace's laptop.
I'll keep you posted this evening, I'll try to update my home's installation, if needed, and back to you aftwerwards.
In the meantime, let's leave this open if you don't mind :)

A.

@hvesalai
Copy link
Owner

See also issue #49

@adinapoli
Copy link
Author

Unfortunately this is not my case, because I have two IDENTICAL .emacs, one for the office one for home. Same Emacs installation and version. In the office one everything is fine, on my home's laptop I get the aforementioned error..

Weird..
Do I need some external tool be installed by chance? I've already "brewed" both scala and sbt (I'm on Mac Os X)

A.

@hvesalai
Copy link
Owner

hvesalai commented Mar 2, 2013

Nothing beseides emacs should be needed.

Did you try --debug-init command line parameter to get the stack trace?

And did you change the .emacs file to correspond to the updated instructions in README.md?

@hvesalai
Copy link
Owner

I'll close this as it is not reproducible and I've also changed the installation instructions.

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