all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoload files
       [not found] ` <20190706184138.A6CCD20BD5@vcs0.savannah.gnu.org>
@ 2019-07-06 22:38   ` Stefan Monnier
  2019-07-06 23:06     ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2019-07-06 22:38 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: emacs-devel

> +                ;; 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.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoload files
  2019-07-06 22:38   ` [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoload files Stefan Monnier
@ 2019-07-06 23:06     ` Noam Postavsky
  2019-07-07 13:06       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Noam Postavsky @ 2019-07-06 23:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Sat, 6 Jul 2019 at 18:38, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > +                ;; 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;

Oh, hmm, then why do we use #$ instead of load-file-name?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoload files
  2019-07-06 23:06     ` Noam Postavsky
@ 2019-07-07 13:06       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2019-07-07 13:06 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emacs developers

> Oh, hmm, then why do we use #$ instead of load-file-name?

I don't think there's a strong reason for that here.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-07 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190706184137.11481.46269@vcs0.savannah.gnu.org>
     [not found] ` <20190706184138.A6CCD20BD5@vcs0.savannah.gnu.org>
2019-07-06 22:38   ` [Emacs-diffs] master 1f7b602 1/3: Add commentary about #$ in autoload files Stefan Monnier
2019-07-06 23:06     ` Noam Postavsky
2019-07-07 13:06       ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.