From: Joseph Turner <joseph@ushin.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: emacs-devel@gnu.org
Subject: Re: [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of = 0
Date: Fri, 13 Oct 2023 16:26:17 -0700 [thread overview]
Message-ID: <878r8614sr.fsf@ushin.org> (raw)
In-Reply-To: <87mswmqiif.fsf@posteo.net>
Philip Kaludercic <philipk@posteo.net> writes:
> FWIW this doesn't matter that much, you can check the disassembly to
> see what is going on after byte compilation:
>
> (disassemble (byte-compile (lambda (a) (= a 0))))
> (disassemble (byte-compile (lambda (a) (zerop a))))
Thank you! I didn't know that :)
> ELPA Syncer <elpasync@gnu.org> writes:
>
>> branch: elpa/hyperdrive
>> commit b5294b43547379e87435c294670f4a23ac0739b7
>> Author: Joseph Turner <joseph@ushin.org>
>> Commit: Joseph Turner <joseph@ushin.org>
>>
>> Tidy: Use zerop instead of = 0
>> ---
>> hyperdrive-lib.el | 2 +-
>> hyperdrive.el | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
>> index 1801fe0076..e2696160c9 100644
>> --- a/hyperdrive-lib.el
>> +++ b/hyperdrive-lib.el
>> @@ -1033,7 +1033,7 @@ With universal prefix argument \\[universal-argument], prompt for entry."
>> With FORCE-PROMPT or when current hyperdrive does not match
>> PREDICATE, return a hyperdrive selected with completion. In this
>> case, when PREDICATE, only offer hyperdrives matching it."
>> - (when (= 0 (hash-table-count hyperdrive-hyperdrives))
>> + (when (zerop (hash-table-count hyperdrive-hyperdrives))
>> (hyperdrive-user-error "No known hyperdrives. Use `hyperdrive-new' to create a new one"))
>> (unless predicate
>> ;; cl-defun default value doesn't work when nil predicate value is passed in.
>> diff --git a/hyperdrive.el b/hyperdrive.el
>> index 824d33ba24..fcd2715b55 100644
>> --- a/hyperdrive.el
>> +++ b/hyperdrive.el
>> @@ -827,7 +827,7 @@ The return value of this function is the retrieval buffer."
>> :help "Create a new hyperdrive"]
>> ("Drives"
>> :active (< 0 (hash-table-count hyperdrive-hyperdrives))
>> - :label (if (= 0 (hash-table-count hyperdrive-hyperdrives))
>> + :label (if (zerop (hash-table-count hyperdrive-hyperdrives))
>> "Drives (empty)"
>> "Drives")
>> :filter (lambda (_)
next prev parent reply other threads:[~2023-10-13 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169722725606.27637.3820182151024041420@vcs2.savannah.gnu.org>
[not found] ` <20231013200057.2C7FCC09BC9@vcs2.savannah.gnu.org>
2023-10-13 22:12 ` [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of = 0 Philip Kaludercic
2023-10-13 23:26 ` Joseph Turner [this message]
2023-10-14 21:33 ` Emanuel Berg
2023-10-15 9:17 ` Philip Kaludercic
2023-10-15 9:39 ` Emanuel Berg
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=878r8614sr.fsf@ushin.org \
--to=joseph@ushin.org \
--cc=emacs-devel@gnu.org \
--cc=philipk@posteo.net \
/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).