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

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

[nongnu] elpa/hyperdrive 553c71fdc1 04/19: Fix: (h/menu) Display "Versio


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 553c71fdc1 04/19: Fix: (h/menu) Display "Version: unknown" if entry has not been saved
Date: Sun, 9 Jun 2024 16:00:00 -0400 (EDT)

branch: elpa/hyperdrive
commit 553c71fdc1790c680e1c9b61936a217a32660d47
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (h/menu) Display "Version: unknown" if entry has not been saved
---
 hyperdrive-menu.el | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index 31d4b5f974..92477e4878 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -77,14 +77,19 @@
           (and (h/menu--scope)
                ;; TODO: Remove this check and add useful history transient UI.
                (not (eq 'h/history-mode major-mode))))
-    :description (lambda ()
-                   (let ((entry (h/menu--scope)))
-                     (concat (propertize "Version: "
-                                         'face 'transient-heading)
-                             (propertize (format "%s"
-                                                 (or (he/version entry)
-                                                     "latest"))
-                                         'face 'transient-value))))
+    :description
+    (lambda ()
+      (let* ((entry (h/menu--scope))
+             (version (he/version entry))
+             (existsp (he/exists-p entry)))
+        (concat
+         (propertize "Version: " 'face 'transient-heading)
+         (propertize (format "%s"
+                             (cond ((null existsp) "nonexistent")
+                                   ((eq 'unknown existsp) "unknown")
+                                   (version version)
+                                   (t "latest")))
+                     'face 'transient-value))))
     ("V p" "Previous" h/open-previous-version
      :inapt-if-not (lambda ()
                      (he/previous (h/menu--scope) :cache-only t))



reply via email to

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