all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: emacs-devel@gnu.org
Cc: Joseph Turner <joseph@ushin.org>
Subject: Re: [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of = 0
Date: Fri, 13 Oct 2023 22:12:24 +0000	[thread overview]
Message-ID: <87mswmqiif.fsf@posteo.net> (raw)
In-Reply-To: <20231013200057.2C7FCC09BC9@vcs2.savannah.gnu.org> (ELPA Syncer's message of "Fri, 13 Oct 2023 16:00:57 -0400 (EDT)")

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 (_)



       reply	other threads:[~2023-10-13 22:12 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   ` Philip Kaludercic [this message]
2023-10-13 23:26     ` [nongnu] elpa/hyperdrive b5294b4354 4/4: Tidy: Use zerop instead of = 0 Joseph Turner
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mswmqiif.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=joseph@ushin.org \
    /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 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.