diff options
| author | Roi Martin <jroi.martin@gmail.com> | 2024-03-11 20:46:56 +0100 |
|---|---|---|
| committer | Roi Martin <jroi.martin@gmail.com> | 2024-03-11 20:46:56 +0100 |
| commit | db7d086233d7c37105ef39944f1b075e3a3dbe21 (patch) | |
| tree | da732ab3dcf845c683a4f230562366d67ed623a6 /rust-mode.el | |
| parent | d8a09f218e24407acbc9f36c641be4f913f1a63c (diff) | |
| download | rust-mode-db7d086233d7c37105ef39944f1b075e3a3dbe21.tar.gz | |
Fix rust-mode lazy loading
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 #528
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el index 70c2a2c..ec1ecba 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -76,6 +76,9 @@ instead of `prog-mode'. This option requires emacs29+." (require 'rust-prog-mode)) ;;;###autoload +(autoload 'rust-mode "rust-mode" "Major mode for Rust code.") + +;;;###autoload (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (provide 'rust-mode) |
