From: Juanma Barranquero Date: Mon, 19 Dec 2022 01:40:50 +0000 (+0100) Subject: bs.el: Use the right buffer context to compute the mode name X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03648965a027b1a0aa46a2ebfa0dab78ef49b200;p=emacs.git bs.el: Use the right buffer context to compute the mode name * lisp/bs.el (bs--get-mode-name): The function is already called with the correct buffer as current-buffer; and anyway, START-BUFFER is usually the wrong one to pass to `format-mode-line'. This fixes a bug introduced in 48d33090d0 and c2699583be (back in 2008-01-04). --- diff --git a/lisp/bs.el b/lisp/bs.el index 2823e87a9f4..d6df89138db 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -1346,11 +1346,11 @@ ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame" 'mouse-face 'highlight)) -(defun bs--get-mode-name (start-buffer _all-buffers) +(defun bs--get-mode-name (_start-buffer _all-buffers) "Return the name of mode of current buffer for Buffer Selection Menu. START-BUFFER is the buffer where we started buffer selection. ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." - (format-mode-line mode-name nil nil start-buffer)) + (format-mode-line mode-name nil nil nil)) (defun bs--get-file-name (_start-buffer _all-buffers) "Return string for column `File' in Buffer Selection Menu.