From: Lars Ingebrigtsen Date: Sat, 8 Aug 2020 11:01:42 +0000 (+0200) Subject: Fix up previous list-buffers patch to work when there's no buffer X-Git-Tag: emacs-28.0.90~6755 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f07bbb67d16365da2abd288b9993f1938dae4c20;p=emacs.git Fix up previous list-buffers patch to work when there's no buffer * lisp/buff-menu.el (Buffer-menu--dynamic-name-width): Use apply #'max instead of seq-max since the list may be empty. --- diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 359d6381e8b..aa5c47ca7f4 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -77,9 +77,9 @@ but will never be narrower than 19 characters." ;; This gives 19 on an 80 column window, and take up ;; proportionally more space as the window widens. (min (truncate (/ (window-width) 4.2)) - (seq-max (mapcar (lambda (b) - (length (buffer-name b))) - buffers))))) + (apply #'max 0 (mapcar (lambda (b) + (length (buffer-name b))) + buffers))))) (defcustom Buffer-menu-name-width #'Buffer-menu--dynamic-name-width "Width of buffer name column in the Buffer Menu.