Skip to content

Commit 002f791

Browse files
committed
auto merge of #13923 : Rufflewind/rust/patch-2, r=thestinger
Lazy loading with autoload will result in faster startup time for Emacs users and is generally the recommended approach for major modes.
2 parents 028159e + 7e53af3 commit 002f791

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/etc/emacs/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ To install manually, check out this repository and add this to your
1212

1313
```lisp
1414
(add-to-list 'load-path "/path/to/rust-mode/")
15-
(require 'rust-mode)
15+
(autoload 'rust-mode "rust-mode" nil t)
16+
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
1617
```
1718

18-
`rust-mode` will automatically be associated with `.rs` files. To enable it
19-
explicitly, do <kbd>M-x rust-mode</kbd>.
19+
This associates `rust-mode` with `.rs` files. To enable it explicitly, do
20+
<kbd>M-x rust-mode</kbd>.
2021

2122
### `package.el` installation via Marmalade or MELPA
2223

0 commit comments

Comments
 (0)