emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode db7d086233 1/2: Fix rust-mode lazy loading


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode db7d086233 1/2: Fix rust-mode lazy loading
Date: Tue, 12 Mar 2024 01:01:26 -0400 (EDT)

branch: elpa/rust-mode
commit db7d086233d7c37105ef39944f1b075e3a3dbe21
Author: Roi Martin <jroi.martin@gmail.com>
Commit: Roi Martin <jroi.martin@gmail.com>

    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
---
 rust-mode.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rust-mode.el b/rust-mode.el
index 70c2a2c067..ec1ecba4d4 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -75,6 +75,9 @@ instead of `prog-mode'. This option requires emacs29+."
     (require 'rust-mode-treesitter)
   (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))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]