4 May 2008 13:34
Allegro hack for REQUIRE Re: MK:DEFSYSTEM
Madhu <enometh <at> meer.net>
2008-05-04 11:34:23 GMT
2008-05-04 11:34:23 GMT
[CC attempted to allegro mailing list, to report the issue at [1],
and to solicit comments/suggestions on how better to do this]
Helu, This is pretty gross, but may be less gross than redefining
REQUIRE on allegro. It makes use of the :CALL search list
functionality, to sneakily load the module via defsystem.
(defun allegro-mk-defsystem-module-provider-hack
(name search-list order check-bundle whatnow);[1]
(declare (ignore search-list order check-bundle whatnow))
(let ((module-name (string-downcase (string name)))
(dummy-return (mk::compute-system-path (string-downcase name) NIL)))
(when (mk:find-system module-name :load-or-nil)
(mk:load-system module-name
:compile-during-load t
:verbose nil)
dummy-return))) ;[2]
;; ingratiate into sys::*require-search-list*
(let ((form '(:CALL allegro-mk-defsystem-module-provider-hack)))
(unless (find form sys::*require-search-list* :test #'equal)
(setq sys::*require-search-list*
(append sys::*require-search-list* (list form)))))
;;[1] allegro_acl81 docs at the end of
;; <URL:http://www.franz.com/support/documentation/8.1/doc/loading.htm#search-list-example-2>
;; mention this function will be called with 4 args but the function
;; gets called with 5 .
;;[2] the return value is the sysdef file which gets wastefully loaded
(Continue reading)
RSS Feed