summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2004-07-16 13:15:09 +0000
committerEli Zaretskii <eliz@gnu.org>2004-07-16 13:15:09 +0000
commitb6fdd1efe6c347beda90d7d37bda4daf2b612727 (patch)
tree17e4ba22edf90708115f392c75989c3ba04e93b0
parentf9253326af7800854e57e82d0a4b66529664dc2c (diff)
downloademacs-b6fdd1efe6c347beda90d7d37bda4daf2b612727.tar.gz
(list-buffers-noselect): Append the buffer's process status to its mode name.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/buff-menu.el14
2 files changed, 15 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8bd1b75edf3..6b2d3eb4145 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-16 Stephan Stahl <stahl@eos.franken.de> (tiny change)
+
+ * buff-menu.el (list-buffers-noselect): Append the buffer's
+ process status to its mode name.
+
2004-07-16 Kim F. Storm <storm@cua.dk>
* simple.el (inhibit-mark-movement): New defvar.
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index da1c8ed586e..1ccaab1c6a3 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -613,7 +613,7 @@ For more information, see the function `buffer-menu'."
" "
(Buffer-menu-make-sort-button "Mode" 4) mode-end
(Buffer-menu-make-sort-button "File" 5) "\n"))
- list desired-point name file)
+ list desired-point name mode file)
(when Buffer-menu-use-header-line
(let ((pos 0))
;; Turn spaces in the header into stretch specs so they work
@@ -638,8 +638,14 @@ For more information, see the function `buffer-menu'."
(mapcar
(lambda (buffer)
(with-current-buffer buffer
- (setq name (buffer-name)
- file (buffer-file-name))
+ (save-window-excursion
+ (setq name (buffer-name)
+ mode (progn
+ (set-window-buffer (selected-window) buffer)
+ (concat (format-mode-line mode-name)
+ (if mode-line-process
+ (format-mode-line mode-line-process))))
+ file (buffer-file-name)))
(cond
;; Don't mention internal buffers.
((and (string= (substring name 0 1) " ") (null file)))
@@ -665,7 +671,7 @@ For more information, see the function `buffer-menu'."
?% ? )
;; Identify modified buffers.
(if (buffer-modified-p) ?* ? ))
- name (buffer-size) mode-name file)))))
+ name (buffer-size) mode file)))))
(buffer-list))))
(dolist (buffer
(if Buffer-menu-sort-column