Closed ccqpein closed 3 months ago
Related: #528
;; in rust-mode.el ...
;;;###autoload
(autoload 'rust-mode "rust-mode.el" nil t)
It will generate an (autoload 'rust-mode "rust-mode.el" nil t)
in rust-mode-autoloads.el, but it looks like odd as of an autoload is autoloaded.
@ccqpein Can you check if this PR by @jroimartin fixes it for you: https://github.com/rust-lang/rust-mode/pull/530 ?
@psibi I just try and it fixes the rust-mode
. Now my rust file can load the rust-mode
(from rust-prog-mode.el
). However, the straight-use-package
still cannot find the rust-mode
by M-x straight-use-package
.
I might find sometime to study how the straight.el
handle straight-use-package
Figure out it works. Thanks for @jroimartin 's PR
I found the latest
rust-mode
cannot load successfully by myuse-package
(turned on thestraight.el
use-package
integrated).After some investigating, I found the PR #526 remove the
;;;###autoload
ofrust-mode
. It causesstraight-use-package
cannot find therust-mode
function. (I guess it doesn't load therust-mode.el
when it initing?)After more playing around, there are several behaviors were revealed.
(load "~/.emacs.d/straight/repos/rust-mode/rust-mode.el")
in*scratch*
buffer. I can callM-x rust-mode
. ButM-x straight-use-package
cannot find therust-mode
(autoload 'rust-mode "rust-mode" nil t)
in*scratch*
buffer. It does the same thing as1.
.rust-mode.el
inuse-package
:init
step. It works fine. Furthermore, if I(setq rust-mode-treesitter-derive t)
before in:init
before loading, it will in treesitter mode as master branch code is designed to do.I haven't raised up the solution of this issue. I guess it is the
autoload
is necessary forstraight.el
. I am going to report this to them.