From 7e53af35b1d521a4d0f24d964074112266a897b8 Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Sat, 3 May 2014 16:36:54 -0400 Subject: [PATCH] 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. --- src/etc/emacs/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/etc/emacs/README.md b/src/etc/emacs/README.md index 8c2c1f63e65..24470c258b3 100644 --- a/src/etc/emacs/README.md +++ b/src/etc/emacs/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 M-x rust-mode. +This associates `rust-mode` with `.rs` files. To enable it explicitly, do +M-x rust-mode. ### `package.el` installation via Marmalade or MELPA