summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Arver <linusarver@gmail.com>2014-11-12 21:17:22 -0800
committerLinus Arver <linusarver@gmail.com>2014-11-12 21:17:22 -0800
commit33d58a69f99f9b528a20108c5b4af4f8c68bf4b6 (patch)
tree92055fea55bbece1a66d540ed656963644c38119
parenta3f3aa304fcfb19fc716c5eaf33a6e152bb3aa71 (diff)
downloadfork-ledger-33d58a69f99f9b528a20108c5b4af4f8c68bf4b6.tar.gz
fork-ledger-33d58a69f99f9b528a20108c5b4af4f8c68bf4b6.tar.bz2
fork-ledger-33d58a69f99f9b528a20108c5b4af4f8c68bf4b6.zip
doc: ledger-mode: load lazily
If we use `(load "ledger-mode")`, we always load ledger-mode, even if we are not editing a Ledger file; using `autoload`, we avoid this and only load ledger-mode when we need it.
-rw-r--r--doc/ledger-mode.texi2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/ledger-mode.texi b/doc/ledger-mode.texi
index 17ec0e78..c8c4d1f6 100644
--- a/doc/ledger-mode.texi
+++ b/doc/ledger-mode.texi
@@ -119,9 +119,9 @@ initialization file (@file{~/.emacs}, @file{~/.emacs.d/init.el}, or
@file{~/.Aquamacs/Preferences.el}).
@lisp
+(autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t)
(add-to-list 'load-path
(expand-file-name "/path/to/ledger/source/lisp/"))
-(load "ledger-mode")
(add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))
@end lisp