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

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

[nongnu] elpa/hyperdrive bd440b6465 27/32: Remove: (hyperdrive-column-he


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive bd440b6465 27/32: Remove: (hyperdrive-column-headers)
Date: Mon, 4 Sep 2023 18:59:35 -0400 (EDT)

branch: elpa/hyperdrive
commit bd440b6465ab43455d4cb536751192d35b91ffa1
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Remove: (hyperdrive-column-headers)
    
    This effectively enables the option by default now.
---
 doc/hyperdrive-manual.org |  4 ----
 hyperdrive-dir.el         |  3 +--
 hyperdrive-ewoc.el        | 10 ++++------
 hyperdrive-handlers.el    | 14 ++++++--------
 hyperdrive-history.el     | 19 ++++++++-----------
 hyperdrive-vars.el        |  4 ----
 6 files changed, 19 insertions(+), 35 deletions(-)

diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index 29aa212d38..9681756586 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -473,10 +473,6 @@ customize-group RET hyperdrive RET~:
   appropriate function (e.g. `time-less-p' for
   `hyperdrive-entry-modified', `<' for `hyperdrive-entry-size', etc).
 
-#+vindex: hyperdrive-column-headers
-- ~hyperdrive-column-headers~ :: Display column headers in
-  ~hyperdrive-dir~ and ~hyperdrive-history~ buffers. Defaults to ~t~.
-
 #+vindex: hyperdrive-history-display-buffer-action
 - ~hyperdrive-history-display-buffer-action~ :: Display buffer action
   for hyperdrive history buffers. Passed to ~display-buffer~, which see.
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index f2967579f3..5e0639971f 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -70,8 +70,7 @@ With point on header, returns directory entry."
     (cond ((= 1 current-line)
            ;; Point on header: return directory's entry.
            hyperdrive-current-entry)
-          ((or (> current-line last-line)
-               (and hyperdrive-column-headers (= 2 current-line)))
+          ((or (> current-line last-line) (= 2 current-line))
            ;; Point is below the last entry or on column headers: signal error.
            (hyperdrive-user-error "No file on this line"))
           (t
diff --git a/hyperdrive-ewoc.el b/hyperdrive-ewoc.el
index 30cb482bdf..470c7b134c 100644
--- a/hyperdrive-ewoc.el
+++ b/hyperdrive-ewoc.el
@@ -72,15 +72,14 @@ last node."
 (cl-defun hyperdrive-ewoc-next (&optional (n 1))
   "Move forward N entries.
 When on header line, moves point to first entry, skipping over
-column headers when `hyperdrive-column-headers' is non-nil."
+column headers."
   (declare (modes hyperdrive-ewoc-mode))
   (interactive "p")
   ;; TODO: Try using the intangible text property on headers to
   ;; automatically skip over them without conditional code. Setting
   ;; `cursor-intangible' on the column header causes `hl-line-mode' to
   ;; highlight the wrong line when crossing over the headers.
-  (let ((lines-below-header (- (line-number-at-pos)
-                               (if hyperdrive-column-headers 2 1))))
+  (let ((lines-below-header (- (line-number-at-pos) 2)))
     (if (cl-plusp lines-below-header)
         (hyperdrive-ewoc-move n)
       ;; Point on first line or column header: jump to first ewoc entry and 
then maybe move.
@@ -90,11 +89,10 @@ column headers when `hyperdrive-column-headers' is non-nil."
 (cl-defun hyperdrive-ewoc-previous (&optional (n 1))
   "Move backward N entries.
 When on first entry, moves point to header line, skipping over
-column headers when `hyperdrive-column-headers' is non-nil."
+column headers."
   (declare (modes hyperdrive-ewoc-mode))
   (interactive "p")
-  (let ((lines-below-header (- (line-number-at-pos)
-                               (if hyperdrive-column-headers 2 1))))
+  (let ((lines-below-header (- (line-number-at-pos) 2)))
     (if (and (cl-plusp lines-below-header)
              (< n lines-below-header))
         (hyperdrive-ewoc-move (- n))
diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el
index 4f3608aa49..7825566f9e 100644
--- a/hyperdrive-handlers.el
+++ b/hyperdrive-handlers.el
@@ -114,14 +114,12 @@ arguments."
                                 entry-names))
                (parent-entry (hyperdrive-parent directory-entry))
                (main-header (hyperdrive-entry-description directory-entry))
-               (header (if hyperdrive-column-headers
-                           (concat main-header "\n"
-                                   (format "%6s  %s  %s"
-                                           (propertize "Size" 'face 
'hyperdrive-column-header)
-                                           (format 
hyperdrive-timestamp-format-string
-                                                   (propertize "Last Modified" 
'face 'hyperdrive-column-header))
-                                           (propertize "Name" 'face 
'hyperdrive-column-header)))
-                         main-header))
+               (header (concat main-header "\n"
+                               (format "%6s  %s  %s"
+                                       (propertize "Size" 'face 
'hyperdrive-column-header)
+                                       (format 
hyperdrive-timestamp-format-string
+                                               (propertize "Last Modified" 
'face 'hyperdrive-column-header))
+                                       (propertize "Name" 'face 
'hyperdrive-column-header))))
                (num-entries (length entries)) (num-filled 0)
               ;; (debug-start-time (current-time))
                (metadata-queue) (ewoc) (prev-entry) (prev-point))
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index c376f13cb5..f0a2a88edf 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -91,8 +91,7 @@ and ENTRY's version are nil."
              (setf (map-elt (cdr range) :range-end) nil)
              (setf (hyperdrive-entry-version entry) nil)
              (cons range entry)))
-          ((or (> current-line last-line)
-               (and hyperdrive-column-headers (= 2 current-line)))
+          ((or (> current-line last-line) (= 2 current-line))
            ;; Point is below the last entry or on column headers: signal error.
            (hyperdrive-user-error "No file on this line"))
           (t
@@ -174,15 +173,13 @@ Universal prefix argument \\[universal-argument] forces
                             ;; Display in reverse chronological order
                             (nreverse (hyperdrive-entry-version-ranges-no-gaps 
entry))))
                    (main-header (hyperdrive-entry-description entry 
:with-version nil))
-                   (header (if hyperdrive-column-headers
-                               (concat main-header "\n"
-                                       (format "%7s  %13s  %6s  %s"
-                                               (propertize "Exists?" 'face 
'hyperdrive-column-header)
-                                               (propertize "Version Range" 
'face 'hyperdrive-column-header)
-                                               (propertize "Size" 'face 
'hyperdrive-column-header)
-                                               (format 
hyperdrive-timestamp-format-string
-                                                       (propertize "Last 
Modified" 'face 'hyperdrive-column-header))))
-                             main-header))
+                   (header (concat main-header "\n"
+                                   (format "%7s  %13s  %6s  %s"
+                                           (propertize "Exists?" 'face 
'hyperdrive-column-header)
+                                           (propertize "Version Range" 'face 
'hyperdrive-column-header)
+                                           (propertize "Size" 'face 
'hyperdrive-column-header)
+                                           (format 
hyperdrive-timestamp-format-string
+                                                   (propertize "Last Modified" 
'face 'hyperdrive-column-header)))))
                    (queue) (ewoc))
         (with-current-buffer (get-buffer-create
                               (format "*Hyperdrive-history: %s %s*"
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 0fb0595b7f..d37bb8e8e3 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -125,10 +125,6 @@ Passed to `display-buffer', which see."
                  (const :tag "Pop up window" (display-buffer-pop-up-window))
                  (sexp :tag "Other")))
 
-(defcustom hyperdrive-column-headers t
-  "Display column headers in `hyperdrive-dir' and `hyperdrive-history' 
buffers."
-  :type 'boolean)
-
 (defcustom hyperdrive-default-host-format
   '(petname nickname domain seed short-key public-key)
   "Default format for displaying hyperdrive hostnames.



reply via email to

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