help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to delay loading of packages (when eval-after-load does not apply)?


From: Sebastien Vauban
Subject: How to delay loading of packages (when eval-after-load does not apply)?
Date: Wed, 15 Aug 2012 21:22:32 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (windows-nt)

Hello,

In the sake of trying to load my .emacs in less than 20-25 seconds (the
current situation), I'm trying to optimize when things must be loaded.

For example, to save time, I want the fuzzy package to be loaded when it will
be needed for the first time.

The only way I found was:

#+begin_src emacs-lisp
   ;; fuzzy matching utilities (a must-have)
   (when (locate-library "fuzzy")
     (eval-after-load "isearch"
       '(progn
          (require 'fuzzy)
          (turn-on-fuzzy-isearch))))
#+end_src

... but, as isearch must be loaded internally (where?) at startup, my
eval-after-load is useless in fact: fuzzy is loaded as well at startup time.

How could I say: load fuzzy when I will make a search for the first time?

Best regards,
  Seb

-- 
Sebastien Vauban


reply via email to

[Prev in Thread] Current Thread [Next in Thread]