[Openmcl-devel] Re: Another pathname question
gwking at cs.umass.edu
Fri Feb 27 13:36:50 UTC 2004
Whoopt, my bad about (load-pathname). It's a function I should have
(defun load-pathname ()
"Returns a pathname that is useful for merging with filenames to
complete pathname for a file in the same directory as the one currently
loaded. This function is a more portable version of the Common Lisp
*load-truename*, since not all vendors implemented that correctly."
(let ((pn #+allegro (translate-logical-pathname (truename
#+MCL (if *load-truename*
;; This makes it work in a fred buffer...
#+Lispworks (translate-logical-pathname *load-truename*)
#-(or allegro MCL Lispworks)
(assert (pathnamep pn) (pn)
"load-pathname* did not return a pathname, it returned ~s;
this might be because it executed in a context where you're not loading
or because the file is in the current working directory. In any event,
will break the code in generic-load-utils, because it works with the
of pathnames." pn)
;; Deal with the lispworks using an empty pathname for
;; if you are loading from the current working directory.
(if (null (pathname-directory pn))
(merge-pathnames pn (current-pathname)) pn))))
As for your fix, it works for me under MCL but not under OpenMCL or
LispWorks, same problem as before.
On Feb 26, 2004, at 4:02 PM, Octav Popescu wrote:
> One thing that might be problematic is load-pathname. I couldn't find
> it in the hyperspec index, I don't know if it's part of the standard.
> There is a *load-pathname* variable however.
Gary Warren King, Lab Manager
EKSL East, University of Massachusetts * 413 577 0176
I am shocked at how little my colleagues in genetics pay attention to
history. They actually forget how ignorant we are—that although we have
achieved incredible manipulative powers, we know next to nothing about
the real world in which those manipulations will reverberate.
-- David Suzuki (http://www.davidsuzuki.org/)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 2512 bytes
Desc: not available
More information about the Openmcl-devel