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

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

[nongnu] elpa/rust-mode 0617f1c 078/486: Recommend autoload instead of r


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 0617f1c 078/486: Recommend autoload instead of require
Date: Sat, 7 Aug 2021 09:24:52 -0400 (EDT)

branch: elpa/rust-mode
commit 0617f1cc2bad46964d922ba58635803e350fd6e9
Author: Phil Ruffwind <rf@rufflewind.com>
Commit: Phil Ruffwind <rf@rufflewind.com>

    Recommend autoload instead of require
    
    Lazy loading with autoload will result in faster startup time for Emacs
    users and is generally the recommended approach for major modes.
---
 README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 8c2c1f6..24470c2 100644
--- a/README.md
+++ b/README.md
@@ -12,11 +12,12 @@ To install manually, check out this repository and add this 
to your
 
 ```lisp
 (add-to-list 'load-path "/path/to/rust-mode/")
-(require 'rust-mode)
+(autoload 'rust-mode "rust-mode" nil t)
+(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
 ```
 
-`rust-mode` will automatically be associated with `.rs` files. To enable it
-explicitly, do <kbd>M-x rust-mode</kbd>.
+This associates `rust-mode` with `.rs` files. To enable it explicitly, do
+<kbd>M-x rust-mode</kbd>.
 
 ### `package.el` installation via Marmalade or MELPA
 



reply via email to

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