Re: Patch for finding the truename.

james anderson <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
my point was that digitool should be binding trash 
*loading-file-source-file* and bind *load-truename* instead.

the equivalent of this.

(advise ccl::selection-eval
         (let* ((*load-pathname* (ccl::stream-pathname (first arglist)))
                (*load-truename* (typecase *load-pathname*
                             (pathname (truename *load-pathname*))
                             (t nil))))
           (:do-it))
         :when :around
         :name :bind-load-pathname)

hen you don't need to worry everywhere about the fred buffer special 
case.

On Tuesday, Oct 28, 2003, at 15:23 Europe/Berlin, Gary King wrote:

> On Monday, October 27, 2003, at 11:00 AM, james anderson wrote:
>
>>> (defun load-truename ()
>>>   "Returns a pathname that is useful for merging with filenames to 
>>> get a
>>> complete pathname for a file in the same directory as the one 
>>> currently being
>>> loaded.  This function is a more portable version of the Common Lisp 
>>> variable
>>> *load-pathname*, since not all vendors implemented that correctly."
>>
>> 1. why does one not want to just use *load-truename* for this?
>
> AFAIK, *load-truename* is only valid when a file is being loaded. This 
> function attempts to be accurate even in a buffer -- although at this 
> point that is only true for Digitool's MCL. To my mind, this is very 
> handy when defining systems interactively when the other choice would 
> be to continually save and load the system definition file.
>
>> 2. wouldn't digitool be needed for this does open-mcl also define the 
>> ccl:*loading-file-source-file* symbol.
>
> I don't know about OpenMCL and ccl:*loading-file-source-file*.
>
>> i recall submitting a 5.0b bug about fred behaviour, as digitool 
>> should really be binding *load-truename* rather than in 
>> implementation specific variable with parallel semantics, since they 
>> do all of the other things - like warning about redefinition, as if 
>> they were loading from a file. my memory was they they agreed - in 
>> principle, but i've never checked whether it made it into the 
>> release. i'm still using a wrapped fred command which does just that.
>
> Digitool does bind *load-truename* while loading. The 
> *loading-file-source-file* works in a buffer and while loading.
> -- 
> Gary Warren King, Lab Manager
> EKSL East, University of Massachusetts * 413 577 0176
>
> "no art, however minor, demands less than total dedication if you want 
> to excel in it."
>   -- Alberti
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: The SF.net Donation Program.
> Do you like what SourceForge.net is doing for the Open
> Source Community?  Make a contribution, and help us add new
> features and functionality. Click here: http://sourceforge.net/donate/
> _______________________________________________
> cclan-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cclan-list
>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.