Skip to content

Remove autoload might break the straight-use-package-mode #527

@ccqpein

Description

@ccqpein

I found the latest rust-mode cannot load successfully by my use-package (turned on the straight.el use-package integrated).

After some investigating, I found the PR #526 remove the ;;;###autoload of rust-mode. It causes straight-use-package cannot find the rust-mode function. (I guess it doesn't load the rust-mode.el when it initing?)

After more playing around, there are several behaviors were revealed.

  1. if I (load "~/.emacs.d/straight/repos/rust-mode/rust-mode.el") in *scratch* buffer. I can call M-x rust-mode. But M-x straight-use-package cannot find the rust-mode
  2. if I (autoload 'rust-mode "rust-mode" nil t) in *scratch* buffer. It does the same thing as 1..
  3. If I load rust-mode.el in use-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 for straight.el. I am going to report this to them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions