From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: 60311-done@debbugs.gnu.org
Subject: bug#60311: json-available-p: make dynamically correct for Windows
Date: Mon, 26 Dec 2022 15:29:58 +0200 [thread overview]
Message-ID: <835ydy2syx.fsf@gnu.org> (raw)
In-Reply-To: <87FCD796-629F-44AE-B539-2DDAE6C148F2@gmail.com> (message from Mattias Engdegård on Mon, 26 Dec 2022 13:11:21 +0100)
> 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.
next prev parent reply other threads:[~2022-12-26 13:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 14:32 bug#60311: json-available-p: make dynamically correct for Windows Mattias Engdegård
2022-12-25 15:34 ` Mattias Engdegård
2022-12-25 15:40 ` Eli Zaretskii
2022-12-25 16:24 ` Eli Zaretskii
2022-12-25 17:26 ` Eli Zaretskii
2022-12-26 12:11 ` Mattias Engdegård
2022-12-26 13:29 ` Eli Zaretskii [this message]
2022-12-25 18:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835ydy2syx.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=60311-done@debbugs.gnu.org \
--cc=mattias.engdegard@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).