From: Didier Verna
Subject: An ASDF eval-after-load hook ?
Date: 
Message-ID: <muxejce7wzn.fsf@uzeb.lrde.epita.fr>
       Hello,

I would like something close to Emacs Lisp's eval-after-load thing: a
hook to be called each time asdf loads a feature (typical use is to load
a file with aditionnal settings for this package). Does anybody already
have something along these lines ?

Thanks !

-- 
Resistance is futile. You will be jazzimilated.

Didier Verna, ······@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (0)1 44 08 01 85
94276 Le Kremlin-Bic�tre, France   Fax.+33 (0)1 53 14 59 22  ······@xemacs.org

From: vanekl
Subject: Re: An ASDF eval-after-load hook ?
Date: 
Message-ID: <fmt21v$ktg$1@aioe.org>
Didier Verna wrote:
>        Hello,
> 
> I would like something close to Emacs Lisp's eval-after-load thing: a
> hook to be called each time asdf loads a feature (typical use is to load
> a file with aditionnal settings for this package). Does anybody already
> have something along these lines ?
> 
> Thanks !

This example comes out of clsql.asd.

(defmethod perform :after ((o load-op) (c (eql (find-system 'clsql))))
   (let* ((init-var (uffi:getenv "CLSQLINIT"))
          (init-file (or (when init-var (probe-file init-var))
                         (probe-file "/etc/clsql-init.lisp")
                         #+(or mswin windows win32)
                         (probe-file "c:\\etc\\clsql-init.lisp"))))
     (when init-file (load init-file))))

--
<Aoi-chan> everyone's first vi session. ^C^C^X^X^X^XquitqQ!qdammit[esc]qwertyuiopasdfghjkl;:xwhat
From: Andreas Thiele
Subject: Re: An ASDF eval-after-load hook ?
Date: 
Message-ID: <fn461n$aea$00$1@news.t-online.com>
Didier Verna wrote:
>       Hello,
> 
> I would like something close to Emacs Lisp's eval-after-load thing: a
> hook to be called each time asdf loads a feature (typical use is to load
> a file with aditionnal settings for this package). Does anybody already
> have something along these lines ?
> 
> Thanks !

You can use the keyword :perform in defsystem

(defsystem :capi-tools
  :name "capi-tools"
  :description "Capi Tool Library"
  :perform (load-op :after (op tools) (pushnew :capi-tools cl:*features*))
  :components ((:file "capi-tools")))

Andreas