Subject: Re: bug#77468: 30.1.50; package-quickstart file is not relocatable

From: Stefan Monnier <[email-masked]>
Date: Fri, 04 Apr 2025 18:54:23 -0400

>> Also, could we compute (file-name-directory load-file-name)
>> once at the beginning of the quickstart file instead of once per
>> inlined file?
> Done.

I don't see it:

> +(defun package--quickstart-rel (dir file)
> +  "Return an expression which evaluates to FILE while loading a file in DIR."
> +  (if (file-in-directory-p file dir)
> +      ;; Use a relative name so we can still find FILE if DIR is moved.
> +      `(file-name-concat (file-name-directory load-file-name)
> +                         ,(file-relative-name file dir))
> +    file))

We still generate code that computes `(file-name-directory
load-file-name)` N times, AFAICT.

        Stefan