[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
load time conditional
- To: Info-MCL@cambridge.apple.com
- Subject: load time conditional
- From: Ute Gappa <gappa@ira.uka.de>
- Date: Mon, 24 Jun 91 13:02:02 MET DST
I've tried the following code in MACL 1.3.2 to achieve a
load time conditional defun. This code works fine with
the source file, but not with the compiled 'FASL' file.
Is there another possibility to achieve a load time
conditionalisation?
;File # foo
(eval-when (load eval compile)
#+bar
(defun foo ()
"www")
#-bar
(defun foo ()
"qqqq")
)
;End file # foo
;sample use
(setq *features* (delete 'bar *features*))
(load "# foo")
(foo) ; --> "qqq"
(pushnew 'bar *features*)
(load "# foo")
(foo) ;--> "www"
(compile-file "# foo")
(load "# foo.fasl")
(foo) ; --> "www"
(setq *features* (delete 'bar *features*))
(load "# foo.fasl")
(foo) ; --> "www" But should be "qqq"
Karsten Poeck
Institute of Logic
University of Karlsruhe
e-mail poeck@ira.uka.de