emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f07bbb6: Fix up previous list-buffers patch to work when there's


From: Lars Ingebrigtsen
Subject: master f07bbb6: Fix up previous list-buffers patch to work when there's no buffer
Date: Sat, 8 Aug 2020 07:01:52 -0400 (EDT)

branch: master
commit f07bbb67d16365da2abd288b9993f1938dae4c20
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/buff-menu.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 359d638..aa5c47c 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]