From 3f34ca6c46e63e2a6d95b577dff7bbb08ef91031 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 11 Sep 2005 08:47:02 +0000 Subject: [PATCH] * riece-addon.el (riece-command-list-addons): Adjust width of 2nd column to the length of the longest add-on name. --- lisp/ChangeLog | 5 +++++ lisp/riece-addon.el | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74790d8..2a5bd11 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-09-11 Daiki Ueno + + * riece-addon.el (riece-command-list-addons): Adjust width of 2nd + column to the length of the longest add-on name. + 2005-09-10 Daiki Ueno * riece-alias.el (riece-alias-abbrev-identity-string): Compare car diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index f91cc1d..154ad2e 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -321,7 +321,7 @@ All normal editing commands are turned off." buffer-read-only (pointer riece-addon-dependencies) module-description-alist - description point) + description point longest) (while pointer (setq description (intern-soft (concat (symbol-name (car (car pointer))) "-description")) @@ -342,13 +342,20 @@ All normal editing commands are turned off." (setq pointer (cdr pointer))) (erase-buffer) (riece-kill-all-overlays) + (setq pointer module-description-alist + longest "") + (while pointer + (if (> (length (symbol-name (car (car pointer)))) + (length longest)) + (setq longest (symbol-name (car (car pointer))))) + (setq pointer (cdr pointer))) (setq pointer (sort module-description-alist (lambda (entry1 entry2) (string-lessp (symbol-name (car entry1)) (symbol-name (car entry2)))))) (while pointer (setq point (point)) - (insert (format "%c %-15S %s\n" + (insert (format (format "%%c %%-%dS %%s\n" (length longest)) (if (not (featurep (car (car pointer)))) ? (if (not (get (car (car pointer)) -- 1.7.10.4