diff options
| author | Juanma Barranquero | 2022-12-19 02:40:50 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2022-12-19 02:40:50 +0100 |
| commit | 03648965a027b1a0aa46a2ebfa0dab78ef49b200 (patch) | |
| tree | f96977daceea335145193cc408e61c55c92c21b4 | |
| parent | 79e1bff2694444a27036b08e8fa2a6619b40dc2a (diff) | |
| download | emacs-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.el | 4 |
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. |
| 1351 | START-BUFFER is the buffer where we started buffer selection. | 1351 | START-BUFFER is the buffer where we started buffer selection. |
| 1352 | ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." | 1352 | ALL-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. |