diff options
author | Carl Worth <cworth@cworth.org> | 2010-04-26 17:55:55 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-04-26 17:55:55 -0700 |
commit | c9ba61bebef7733c4bf12adf94222e57621fdcf6 (patch) | |
tree | 4c2ff23c1e1e1c92e452af304f53788532961eb8 /emacs | |
parent | 8a6a00bf4ccf7bb3129c993ebdc52405cb20704a (diff) |
emacs: notmuch-hello: Don't include extra spaces in widget values.
Previously, trailing spaces after each saved-search name were included
as part of the widget. This is going to be problematic for a future
change that will extract the widget's value and compare it to the
configured names of saved searches.
Instead, just include the name itself in the widget, and then insert
the spaces for separation afterwards.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/notmuch-hello.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 7333e156..b4423edf 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -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")))) |