bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60311: json-available-p: make dynamically correct for Windows


From: Eli Zaretskii
Subject: bug#60311: json-available-p: make dynamically correct for Windows
Date: Mon, 26 Dec 2022 15:29:58 +0200

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Mon, 26 Dec 2022 13:11:21 +0100
> Cc: 60311@debbugs.gnu.org
> 
> 25 dec. 2022 kl. 16.40 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> > Yes, you are right.  But please come up with a smaller changeset which
> > only changes what strictly needs to be changed.  Or if you want, I can
> > do this myself.
> 
> Since you have very specific ideas about how to go about it it's better that 
> you make the change yourself.

Done.

> > why not just
> > 
> >  (and (fboundp 'json--available-p)
> >       (json--available-p))
> 
> Calling `fboundp` at run time is wasteful, and that patch used the presence 
> of json--available-p to indicate whether it needs to be called at run time 
> (on Windows only, but it's good to keep that platform-dependency in one 
> place).

Yes, but using eval-when-compile precludes defining json--available-p
at run time, something that I don't like doing in Emacs, since it's
IMO against the Emacs's spirit of being interpreter based.

So I went with the simpler definition that doesn't assume functions
are only defined at byte-compile time.

Thanks, I'm now closing the bug.





reply via email to

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