[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: |
Sun, 29 May 2016 11:39:01 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 2016-05-29 11:01, Stefan Monnier wrote:
>> 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?
>
> I believe so, yes.
>
>>> 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.
>
> For C-M-x I guess you do need buffer-file-name. For M-x eval-buffer
> you could use
>
> ;;;###autoload (defconst realgud-subdir-autoloads-name
> "subdirectory-autoloads.el")
> ;;;###autoload (defconst realgud-content-dir)
> ;;;###autoload (file-name-directory load-file-name))
> ;;;###autoload (with-demoted-errors "Error loading autoloads: %s"
> ;;;###autoload (load (expand-file-name realgud-subdir-autoloads-name
> realgud-content-dir) t t))
Got it, thanks!
signature.asc
Description: OpenPGP digital signature
- Autoloads and subdirectories, Clément Pit--Claudel, 2016/05/28
- Re: Autoloads and subdirectories, Robert Weiner, 2016/05/28
- Re: Autoloads and subdirectories, Clément Pit--Claudel, 2016/05/28
- Re: Autoloads and subdirectories, Stefan Monnier, 2016/05/28
- Re: Autoloads and subdirectories, Clément Pit--Claudel, 2016/05/28
- Re: Autoloads and subdirectories, Stefan Monnier, 2016/05/28
- Re: Autoloads and subdirectories, Clément Pit--Claudel, 2016/05/28
- Re: Autoloads and subdirectories, Stefan Monnier, 2016/05/29
- Re: Autoloads and subdirectories,
Clément Pit--Claudel <=