1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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).
This commit is contained in:
Juanma Barranquero 2022-12-19 02:40:50 +01:00
parent 79e1bff269
commit 03648965a0

View file

@ -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.