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

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

[nongnu] elpa/hyperdrive 8131f9afbf 16/31: Chore: Shorten long lines in


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 8131f9afbf 16/31: Chore: Shorten long lines in h/history--format-range-entry
Date: Fri, 1 Dec 2023 01:00:39 -0500 (EST)

branch: elpa/hyperdrive
commit 8131f9afbf175b7aceef46fd0cbc445fbcc461b2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Joseph Turner <joseph@ushin.org>

    Chore: Shorten long lines in h/history--format-range-entry
    
    By aggressively indenting the arguments to `pcase-let*' and `format',
    we reduce the risk of long-lines, without having to add odd looking
    line-breaks in random places within these forms.
---
 hyperdrive-history.el | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 37db1206c8..2ceac01bd3 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -68,24 +68,25 @@ value \\+`unknown', and whose cdr is a hyperdrive entry."
                     (propertize " " 'display '(space :width 
h/timestamp-width)))))
     ;; FIXME: Use dynamic width of range column equal to 2N+1, where N
     ;; is the width of the hyperdrive's latest version
-    (format "%7s  %19s  %6s  %s"
-            (propertize exists-marker
-                        'face (pcase-exhaustive existsp
-                                ('t 'h/history-existent)
-                                ('nil 'h/history-nonexistent)
-                                ('unknown 'h/history-unknown)))
-            (propertize formatted-range
-                        'face 'h/history-range
-                        'mouse-face 'highlight
-                        'help-echo (format (pcase-exhaustive existsp
-                                             ('t "Open version %s")
-                                             ('nil "Nonexistent at version %s")
-                                             ('unknown "Load history at 
version %s"))
-                                           range-start))
-            (propertize (or size "")
-                        'face 'h/size)
-            (propertize (or timestamp "")
-                        'face 'h/timestamp))))
+    (format
+     "%7s  %19s  %6s  %s"
+     (propertize exists-marker
+                 'face (pcase-exhaustive existsp
+                         ('t 'h/history-existent)
+                         ('nil 'h/history-nonexistent)
+                         ('unknown 'h/history-unknown)))
+     (propertize formatted-range
+                 'face 'h/history-range
+                 'mouse-face 'highlight
+                 'help-echo (format (pcase-exhaustive existsp
+                                      ('t "Open version %s")
+                                      ('nil "Nonexistent at version %s")
+                                      ('unknown "Load history at version %s"))
+                                    range-start))
+     (propertize (or size "")
+                 'face 'h/size)
+     (propertize (or timestamp "")
+                 'face 'h/timestamp))))
 
 (defun h/history-range-entry-at-point ()
   "Return range-entry at version at point.



reply via email to

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