all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-safety'
       [not found] ` <20240515174925.A0BEFC2BC82@vcs2.savannah.gnu.org>
@ 2024-05-15 18:03   ` Stefan Monnier
  2024-05-15 18:41     ` Andrea Corallo
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2024-05-15 18:03 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel

> +(unless (boundp 'compilation-safety)
> +  (defvar compilation-safety))

That makes no sense: (defvar compilation-safety) has no runtime effect,
it does not define the variable, it just tells the compiler that the
variable exists elsewhere and is dynamically scoped.  Furthermore, it
normally affects only the "current scope", so the effect of this
`defvar` should arguably end when we exit the `unless` (because of how
it's implemented it currently doesn't end when we exit the `unless`).


        Stefan




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

* Re: [elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-safety'
  2024-05-15 18:03   ` [elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-safety' Stefan Monnier
@ 2024-05-15 18:41     ` Andrea Corallo
  2024-05-15 19:49       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Corallo @ 2024-05-15 18:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Andrea Corallo, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +(unless (boundp 'compilation-safety)
>> +  (defvar compilation-safety))
>
> That makes no sense: (defvar compilation-safety) has no runtime effect,
> it does not define the variable, it just tells the compiler that the
> variable exists elsewhere and is dynamically scoped.

Yes that was my intent, but I've got my test wrong and was sidetracked.
Anyway does 0eb498f77b looks better?

Thanks

  Andrea



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

* Re: [elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-safety'
  2024-05-15 18:41     ` Andrea Corallo
@ 2024-05-15 19:49       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2024-05-15 19:49 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Andrea Corallo, emacs-devel

>> That makes no sense: (defvar compilation-safety) has no runtime effect,
>> it does not define the variable, it just tells the compiler that the
>> variable exists elsewhere and is dynamically scoped.
> Yes that was my intent, but I've got my test wrong and was sidetracked.
> Anyway does 0eb498f77b looks better?

Yup, thanks!  🙂


        Stefan




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

end of thread, other threads:[~2024-05-15 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <171579536498.3206.16174588953622583400@vcs2.savannah.gnu.org>
     [not found] ` <20240515174925.A0BEFC2BC82@vcs2.savannah.gnu.org>
2024-05-15 18:03   ` [elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-safety' Stefan Monnier
2024-05-15 18:41     ` Andrea Corallo
2024-05-15 19:49       ` 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.