From 3e2e13a2aa9accf4ac56f744da1ab452298fec98 Mon Sep 17 00:00:00 2001 From: JD Smith <93749+jdtsmith@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:32:34 -0400 Subject: [PATCH] annotate: make variable names more explicit annotate: make variable names more explicit --- activities.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/activities.el b/activities.el index e61c5bc..7b5bde3 100644 --- a/activities.el +++ b/activities.el @@ -873,15 +873,15 @@ OLDEST-POSSIBLE is the oldest age in the `vc-annotate-color-map'." (setf (alist-get type data) (list (length (delq nil files)) (and time (float-time (time-since time))) buffers))))) - (pcase-let* ((`(,last-file-cnt ,last-age ,last-bufs) (map-elt data 'last)) - (`(,default-file-cnt ,default-age ,default-bufs) (map-elt data 'default)) + (pcase-let* ((`(,num-last-files ,last-age ,last-buffers) (map-elt data 'last)) + (`(,num-default-files ,default-age ,default-buffers) (map-elt data 'default)) (age (if last-age (min last-age default-age) default-age)) - (buf-cnt (length (or last-bufs default-bufs))) - (file-cnt (or last-file-cnt default-file-cnt)) - (dirty (and last-bufs - (or (/= (length last-bufs) (length default-bufs)) - (not (seq-set-equal-p last-bufs default-bufs))))) - (ann (format "%s bufs %s files " + (buf-cnt (length (or last-buffers default-buffers))) + (file-cnt (or num-last-files num-default-files)) + (dirtyp (when last-buffers + (or (/= (length last-buffers) (length default-buffers)) + (not (seq-set-equal-p last-buffers default-buffers))))) + (annotation (format "%s bufs %s files " (propertize (format "%2d" buf-cnt) 'face 'success) (propertize (format "%2d" file-cnt) 'face 'warning))) (age-color (or (cdr (vc-annotate-compcar @@ -892,11 +892,11 @@ OLDEST-POSSIBLE is the oldest age in the `vc-annotate-color-map'." (format "%15s" (apply #'format "[%d %s]" (activities--age age))) 'face `( :foreground ,age-color :background ,vc-annotate-background))) - (dirty-ann (propertize (if dirty "*" " ") 'face 'bold))) + (dirty-ann (propertize (if dirtyp "*" " ") 'face 'bold))) (concat (propertize " " 'display `( space :align-to - (- right ,(+ (length ann) (length age-ann) 1)))) - ann age-ann dirty-ann)))))) + (- right ,(+ (length annotation) (length age-ann) 1)))) + annotation age-ann dirty-ann)))))) (cl-defun activities-completing-read (&key (activities activities-activities)