While Lee's
expresstools-p is cleverly penned (as usual
) it captures and subsequently reports a static snapshot of the acet call attempt for the dynamically defined version of self, which sports misleading results
if the ET tools library is unloaded (arxunload "acetutil.arx") after
expresstools-p has been called:
(expresstools-p)
T
(arxunload "acetutil.arx")
(expresstools-p)
T
(acet-sys-shift-down)
*kaboom*This can be remedied by modifying
expresstools-p thusly:
(defun expresstools-p nil
(or (member "acetutil.arx" (arx))
(and (findfile "acetutil.arx") (arxload "acetutil.arx" nil))
)
(eval
(list 'defun 'expresstools-p nil
'(not
(vl-catch-all-error-p
(vl-catch-all-apply
(function (lambda nil (acet-sys-shift-down)))
)
)
)
)
)
(expresstools-p)
)
That said, it still is not ideal, as
expresstools-p will no longer make the attempt to load the ET library if the ET library is unloaded after it is called, merely returning nil:
(expresstools-p)
T
(arxunload "acetutil.arx")
(expresstools-p)
nilSo in the end, my sleep deprived brain thinks the more pragmatic albeit less sexy version merely need be:
(defun expresstools-p ( )
(or
(member "acetutil.arx" (arx))
(and (findfile "acetutil.arx") (arxload "acetutil.arx" nil))
)
)
But mommy, I need coffees. Bad.