[Top][All Lists]

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

Re: [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoloa

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoload files
Date: Sat, 06 Jul 2019 18:38:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> +                ;; Use the `#$' to indicate current file, from which
> +                ;; we extract the directory name.  Note that
> +                ;; `package-quickstart-refresh' specifically replaces
> +                ;; `#$', so any other tricks (e.g., `load-file-name')
> +                ;; will not work for that case.

This is not true: load-file-name should work just as well
(package-quickstart-refresh surrounds the code with a let-binding of
load-file-name for that reason; sadly this let-binding doesn't work for
#$ because the #$ expansion is performed while reading the whole form
(the one that contains the let-binding) and hence before the let-binding
takes effect).

> -         ";; no-byte-compile: t\n"
> +            ";; no-byte-compile: t\n" ;; #$ is byte-compiled into nil.

This, on the other hand, is very true, thanks.


reply via email to

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