aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2022-12-19 02:40:50 +0100
committerJuanma Barranquero2022-12-19 02:40:50 +0100
commit03648965a027b1a0aa46a2ebfa0dab78ef49b200 (patch)
treef96977daceea335145193cc408e61c55c92c21b4
parent79e1bff2694444a27036b08e8fa2a6619b40dc2a (diff)
downloademacs-03648965a027b1a0aa46a2ebfa0dab78ef49b200.tar.gz
emacs-03648965a027b1a0aa46a2ebfa0dab78ef49b200.zip
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).
-rw-r--r--lisp/bs.el4
1 files changed, 2 insertions, 2 deletions
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."
1346 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame" 1346 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame"
1347 'mouse-face 'highlight)) 1347 'mouse-face 'highlight))
1348 1348
1349(defun bs--get-mode-name (start-buffer _all-buffers) 1349(defun bs--get-mode-name (_start-buffer _all-buffers)
1350 "Return the name of mode of current buffer for Buffer Selection Menu. 1350 "Return the name of mode of current buffer for Buffer Selection Menu.
1351START-BUFFER is the buffer where we started buffer selection. 1351START-BUFFER is the buffer where we started buffer selection.
1352ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." 1352ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
1353 (format-mode-line mode-name nil nil start-buffer)) 1353 (format-mode-line mode-name nil nil nil))
1354 1354
1355(defun bs--get-file-name (_start-buffer _all-buffers) 1355(defun bs--get-file-name (_start-buffer _all-buffers)
1356 "Return string for column `File' in Buffer Selection Menu. 1356 "Return string for column `File' in Buffer Selection Menu.