-
Notifications
You must be signed in to change notification settings - Fork 182
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
File mode specification error: (void-function rust-mode) #528
Comments
How are you installing rust-mode ? |
With this configuration I'm not able to reproduce the issue:
|
@psibi plain
|
Thanks! Does reverting this PR fix it: https://github.com/rust-lang/rust-mode/pull/526/files ? |
@psibi probably, but that would break the treesitter derived mode, right? If I'm not wrong, you choose the right Lines 74 to 76 in d8a09f2
What about doing something like this? (not tested)
|
That sounds fair, can you send out a PR for it ? CC: @condy0919 What do you think about the above proposed patch ? |
This PR fixes the following error that happends when opening a .rs file: File mode specification error: (void-function rust-mode) It adds a stub function called `rust-mode-choose` that selects the appropriate `rust-mode` version (prog or treesitter) based on the environment. Fixes rust-lang#528
Thinking further, I'm not so sure about this: Since |
I have just created #530. You can see in the default
|
Cool, thanks! |
That being said, I'm far from being an experienced elisp programmer. So, take everything I said with a grain of salt. |
This PR fixes the following error that happends when opening a .rs file: File mode specification error: (void-function rust-mode) It adds a stub function called `rust-mode-choose` that selects the appropriate `rust-mode` version (prog or treesitter) based on the environment. Fixes rust-lang#528
This PR fixes the following error that happends when opening a .rs file: File mode specification error: (void-function rust-mode) It adds a stub function called `rust-mode` that selects the actual `rust-mode` (prog or treesitter) based on the environment. Once the actual `rust-mode` is loaded, the stub function gets redefined. Fixes rust-lang#528
Good job! |
This PR fixes the following error that happends when opening a .rs file: File mode specification error: (void-function rust-mode) It conditionally autoloads the proper rust-mode version depending on the user environment. Fixes rust-lang#528
Thanks! I confirm the fix on my side. |
The following error is returned when opening a
.rs
file:It seems to be caused by:
rust-mode/rust-mode.el
Lines 78 to 79 in d8a09f2
Because after the last changes to support treesitter, no
rust-mode
is autoloaded.rust-mode/rust-mode.el
Lines 74 to 76 in d8a09f2
rust-mode/rust-prog-mode.el
Line 1448 in d8a09f2
rust-mode/rust-mode-treesitter.el
Line 15 in d8a09f2
My current workaround it is to
require 'rust-mode
in myinit.el
. However, this was not necessary before and it woud be great to continue supporting lazy-loading.The text was updated successfully, but these errors were encountered: