[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoloads and subdirectories

From: Clément Pit--Claudel
Subject: Re: Autoloads and subdirectories
Date: Sat, 28 May 2016 15:21:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 2016-05-28 15:07, Stefan Monnier wrote:
>>     ;;;###autoload
>>     (defconst realgud-content-dir
>>       (file-name-directory
>>        (or (and load-in-progress load-file-name)
>>            (bound-and-true-p byte-compile-current-file)
>>            buffer-file-name)))
> Why do you need to check load-in-progress?

The docs of load-file-name don't say what this variable becomes when outside of 
load. It is always nil when load-in-progress is nil?

> And why do you need to fallback on byte-compile-current-file or
> buffer-file-name?

I'd like this code to work when the form is evaluated with C-M-x in an Emacs 
buffer. Since this isn't in an eval-when-compile form, though, I guess it would 
work to remove the byte-compile-current-file part.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]