]> git.cworth.org Git - notmuch/blobdiff - emacs/notmuch-hello.el
emacs: notmuch-hello: Don't include extra spaces in widget values.
[notmuch] / emacs / notmuch-hello.el
index 7333e15662671627ca4c5197746ad37a34b6f5a0..b4423edf74329d9b318f2a80ee6f4291cc551112 100644 (file)
@@ -148,8 +148,7 @@ diagonal."
                  nil nil #'notmuch-hello-search-continuation))
 
 (defun notmuch-hello-insert-tags (tag-alist widest)
-  (let* ((tag-format-string (format "%%-%ds " widest))
-        (tags-per-line (max 1
+  (let* ((tags-per-line (max 1
                             (/ (- (window-width) notmuch-hello-indent)
                                ;; Count is 7 wide, 1 for the space
                                ;; after the name.
@@ -169,7 +168,8 @@ diagonal."
                 (widget-create 'push-button
                                :notify #'notmuch-hello-widget-search
                                :notmuch-search-terms (cdr elem)
-                               (format tag-format-string (car elem))))
+                               (car elem))
+                (insert (make-string (- widest (length (car elem))) ? )))
               (setq count (1+ count))
               (if (eq (% count tags-per-line) 0)
                   (widget-insert "\n"))))