[Ecls-list] Further cl-opengl + ecl questions

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sat Aug 23 23:59:15 UTC 2008


On Sat, Aug 23, 2008 at 11:56 PM, Luis Oliveira <luismbo at gmail.com> wrote:
> I think you missed the bit where the OP mentions that CLOSE has been
> shadowed.

Yes, I did. Then cl-opengl must be doing the shadowing wrong, because
that error is only signaled when one tries to redefine the ordinary
cl:open. Indeed, in the error message there is no package prefix,
which furthers supports that theory.

I trimmed the file glut/interface down to the pieces that deal with
"close" and that seems to work with ECL so this must be the
interaction with other piece of code. The following works both with
LOAD and with COMPILE-FILE followed by LOAD.

(eval-when (:compile-toplevel :load-toplevel :execute)
  (or (find-package :test)
   (make-package :test :use '(:cl))))

(in-package :test)

(eval-when (:compile-toplevel :load-toplevel :execute)
  ;; FIXME: find good alternative names instead of shadowing these CL symbols
  (shadow '(cl:special cl:close)))

(export '(close))

(defmethod close :around ((w t))
  (call-next-method))

(defmethod close ((w t))
  (values))


Juanjo

-- 
Instituto de Física Fundamental
CSIC, Serrano, 113, Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com


More information about the ecl-devel mailing list