From: Stefan Kangas Date: Sat, 25 Apr 2020 21:30:22 +0000 (+0200) Subject: Improve list-dynamic-libraries when alist empty X-Git-Tag: emacs-28.0.90~7512 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eb65ac526c9dd350b8a6548f2f453a550dac5821;p=emacs.git Improve list-dynamic-libraries when alist empty * lisp/misc.el (list-dynamic-libraries--refresh): Improve list format and show message when 'dynamic-library-alist' is empty. --- diff --git a/lisp/misc.el b/lisp/misc.el index 05244a6ea2f..3a0989bcab4 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -162,7 +162,7 @@ Internal use only." "Recompute the list of dynamic libraries. Internal use only." (setq tabulated-list-format ; recomputed because column widths can change - (let ((max-id-len 0) (max-name-len 0)) + (let ((max-id-len 7) (max-name-len 11)) (dolist (lib dynamic-library-alist) (let ((id-len (length (symbol-name (car lib)))) (name-len (apply 'max (mapcar 'length (cdr lib))))) @@ -181,7 +181,9 @@ Internal use only." (push (list id (vector (symbol-name id) (list-dynamic-libraries--loaded from) (mapconcat 'identity (cdr lib) ", "))) - tabulated-list-entries))))) + tabulated-list-entries)))) + (when (not dynamic-library-alist) + (message "No dynamic libraries found"))) ;;;###autoload (defun list-dynamic-libraries (&optional loaded-only-p buffer)