diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-08 13:01:42 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-08 13:01:42 +0200 |
commit | f07bbb67d16365da2abd288b9993f1938dae4c20 (patch) | |
tree | c9e7b62085a0075118b92862c5dcd85b5c0723c7 /lisp/buff-menu.el | |
parent | 119c34cc0aa3d7c814dff4f5b78dd589f0e2a75a (diff) | |
download | emacs-f07bbb67d16365da2abd288b9993f1938dae4c20.tar.gz emacs-f07bbb67d16365da2abd288b9993f1938dae4c20.tar.bz2 emacs-f07bbb67d16365da2abd288b9993f1938dae4c20.zip |
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.
Diffstat (limited to 'lisp/buff-menu.el')
-rw-r--r-- | lisp/buff-menu.el | 6 |
1 files changed, 3 insertions, 3 deletions
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. |