emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/hyperdrive 0ecc62eb8c 07/10: Change: (hyperdrive-menu) Use


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 0ecc62eb8c 07/10: Change: (hyperdrive-menu) Use :if-mode and :if-not-mode
Date: Sun, 22 Oct 2023 10:01:29 -0400 (EDT)

branch: elpa/hyperdrive
commit 0ecc62eb8c129ce341e36c62f4afc76f3767c1ae
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Change: (hyperdrive-menu) Use :if-mode and :if-not-mode
---
 hyperdrive-menu.el | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index 760c2293e5..2bd437e88f 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -137,8 +137,7 @@
      :inapt-if-not (lambda ()
                      (hyperdrive-parent (hyperdrive-menu--entry))))
     ("s" "Sort" hyperdrive-dir-sort
-     :if (lambda ()
-           (eq major-mode 'hyperdrive-dir-mode))
+     :if-mode hyperdrive-dir-mode
      :transient t)
     ("j" "Jump" imenu)
     ;; TODO: Combine previous and next commands on the same line?
@@ -147,29 +146,24 @@
                       (interactive)
                       (hyperdrive-ewoc-previous)
                       (hyperdrive-menu (hyperdrive-menu--entry)))
-     :if (lambda ()
-           (eq major-mode 'hyperdrive-dir-mode))
+     :if-mode hyperdrive-dir-mode
      :transient t)
     ("n" "Next" (lambda ()
                   (interactive)
                   (hyperdrive-ewoc-next)
                   (hyperdrive-menu (hyperdrive-menu--entry)))
-     :if (lambda ()
-           (eq major-mode 'hyperdrive-dir-mode))
+     :if-mode hyperdrive-dir-mode
      :transient t)
     ("w" "Copy URL" hyperdrive-copy-url
-     :if (lambda ()
-           (not (eq major-mode 'hyperdrive-dir-mode))))
+     :if-not-mode hyperdrive-dir-mode)
     ("D" "Delete" hyperdrive-delete
-     :if (lambda ()
-           (not (eq major-mode 'hyperdrive-dir-mode)))
+     :if-not-mode hyperdrive-dir-mode
      :inapt-if (lambda ()
                  (pcase-let (((cl-struct hyperdrive-entry hyperdrive version)
                               (hyperdrive-menu--entry)))
                    (or version (not (hyperdrive-writablep hyperdrive))))))
     ("d" "Download" hyperdrive-download
-     :if (lambda ()
-           (not (eq major-mode 'hyperdrive-dir-mode))))]
+     :if-not-mode hyperdrive-dir-mode)]
    ;; TODO: Consider adding a defcustom to hide the "Selected" and
    ;; "Current" groups when in a directory buffer.
    [;; Selected



reply via email to

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