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.
This commit is contained in:
parent
a3f3aa304f
commit
33d58a69f9
1 changed files with 1 additions and 1 deletions
|
|
@ -119,9 +119,9 @@ initialization file (@file{~/.emacs}, @file{~/.emacs.d/init.el}, or
|
||||||
@file{~/.Aquamacs/Preferences.el}).
|
@file{~/.Aquamacs/Preferences.el}).
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
|
(autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t)
|
||||||
(add-to-list 'load-path
|
(add-to-list 'load-path
|
||||||
(expand-file-name "/path/to/ledger/source/lisp/"))
|
(expand-file-name "/path/to/ledger/source/lisp/"))
|
||||||
(load "ledger-mode")
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))
|
(add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue