]> git.cworth.org Git - notmuch/commitdiff
emacs: instruct user to autoload notmuch instead of require'ing it
authorTomi Ollila <tomi.ollila@iki.fi>
Sat, 29 Mar 2014 08:07:58 +0000 (10:07 +0200)
committerDavid Bremner <david@tethera.net>
Sun, 30 Mar 2014 14:02:08 +0000 (11:02 -0300)
When (require 'notmuch) is added to ~/.emacs notmuch is loaded to every
instance of emacs although it may not be used in majority of
those instances.

When (autoload 'notmuch "notmuch" ...) is added to ~/.emacs notmuch
is loaded (only) when user invokes the notmuch function.

User may want to add other entrypoints to notmuch by adding more
autoloads -- the autoload instruction given should offer them clue how
to do so.

README
emacs/notmuch.el

diff --git a/README b/README
index 3a003ad9cb7573d51879c945509da51ae8b2bd70..d92fcfdfc4b0ad306cce3cb5510ae95d13ddfcef 100644 (file)
--- a/README
+++ b/README
@@ -42,7 +42,7 @@ the libnotmuch library.
 Notmuch installs a full-featured email interface for use within
 emacs. To use this, first add the following line to your .emacs file:
 
-       (require 'notmuch)
+       (autoload 'notmuch "notmuch" "Notmuch mail" t)
 
 Then, either run "emacs -f notmuch" or execute the command "M-x
 notmuch" from within a running emacs.
index e93d8c85348eba27ed0252f54cce532f2bc12fb6..e646aa5ba6143c389a615790896a55b6df44acea 100644 (file)
@@ -36,7 +36,7 @@
 ;;
 ;; Then, to actually run it, add:
 ;;
-;;     (require 'notmuch)
+;;     (autoload 'notmuch "notmuch" "Notmuch mail" t)
 ;;
 ;; to your ~/.emacs file, and then run "M-x notmuch" from within emacs,
 ;; or run: