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.
This commit is contained in:
parent
119c34cc0a
commit
f07bbb67d1
1 changed files with 3 additions and 3 deletions
|
@ -77,9 +77,9 @@ but will never be narrower than 19 characters."
|
||||||
;; This gives 19 on an 80 column window, and take up
|
;; This gives 19 on an 80 column window, and take up
|
||||||
;; proportionally more space as the window widens.
|
;; proportionally more space as the window widens.
|
||||||
(min (truncate (/ (window-width) 4.2))
|
(min (truncate (/ (window-width) 4.2))
|
||||||
(seq-max (mapcar (lambda (b)
|
(apply #'max 0 (mapcar (lambda (b)
|
||||||
(length (buffer-name b)))
|
(length (buffer-name b)))
|
||||||
buffers)))))
|
buffers)))))
|
||||||
|
|
||||||
(defcustom Buffer-menu-name-width #'Buffer-menu--dynamic-name-width
|
(defcustom Buffer-menu-name-width #'Buffer-menu--dynamic-name-width
|
||||||
"Width of buffer name column in the Buffer Menu.
|
"Width of buffer name column in the Buffer Menu.
|
||||||
|
|
Loading…
Add table
Reference in a new issue