[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of
From: |
Philip Kaludercic |
Subject: |
Re: [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of = 0 |
Date: |
Fri, 13 Oct 2023 22:12:24 +0000 |
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))))
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 (_)
- Re: [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of = 0,
Philip Kaludercic <=