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

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

Re: How to delay loading of packages (when eval-after-load does notapply


From: Sebastien Vauban
Subject: Re: How to delay loading of packages (when eval-after-load does notapply)?
Date: Fri, 17 Aug 2012 12:07:58 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (windows-nt)

Hi Drew,

"Drew Adams" wrote:
>> How could I say: load fuzzy when I will make a search for the 
>> first time?
>
> Try `isearch-mode-hook' with `require'.

Did you mean this?

--8<---------------cut here---------------start------------->8---
  ;; fuzzy matching utilities (a must-have)
  (add-hook 'isearch-mode-hook
            #'(lambda ()
                (require 'fuzzy)))

  (eval-after-load "fuzzy"
    (turn-on-fuzzy-isearch))
--8<---------------cut here---------------end--------------->8---

I did the above, restarted Emacs and got:

  Symbol's function definition is void: turn-on-fuzzy-isearch

I don't understand why my `eval-after-load' is executed directly...

Am I missing something?

Best regards,
  Seb

PS- BTW, is there a better choice to be made between

--8<---------------cut here---------------start------------->8---
  (add-hook 'isearch-mode-hook
            #'(lambda () ...
--8<---------------cut here---------------end--------------->8---

and

--8<---------------cut here---------------start------------->8---
  (add-hook 'isearch-mode-hook
            (lambda () ...
--8<---------------cut here---------------end--------------->8---

?

-- 
Sebastien Vauban


reply via email to

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