aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2006-02-20 00:56:31 +0000
committerJuanma Barranquero2006-02-20 00:56:31 +0000
commitfff861a2e0ad249c9a7d4ec5c0e8a2c7813e6378 (patch)
tree93c5210900de5f47e3f1c05ea7ef55674a4f5f8f
parentffb2cf00c2960a4c3c63cfd9a72ee2c132006479 (diff)
downloademacs-fff861a2e0ad249c9a7d4ec5c0e8a2c7813e6378.tar.gz
emacs-fff861a2e0ad249c9a7d4ec5c0e8a2c7813e6378.zip
(list-buffers-noselect): Turn also "\n" into a strech spec so it doesn't display
as "^J" on the header line when `Buffer-menu-use-header-line' is t.
-rw-r--r--lisp/buff-menu.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 5388ff9863d..3094da3bfe8 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -706,9 +706,9 @@ For more information, see the function `buffer-menu'."
706 list desired-point) 706 list desired-point)
707 (when Buffer-menu-use-header-line 707 (when Buffer-menu-use-header-line
708 (let ((pos 0)) 708 (let ((pos 0))
709 ;; Turn spaces in the header into stretch specs so they work 709 ;; Turn whitespace chars in the header into stretch specs so
710 ;; regardless of the header-line face. 710 ;; they work regardless of the header-line face.
711 (while (string-match "[ \t]+" header pos) 711 (while (string-match "[ \t\n]+" header pos)
712 (setq pos (match-end 0)) 712 (setq pos (match-end 0))
713 (put-text-property (match-beginning 0) pos 'display 713 (put-text-property (match-beginning 0) pos 'display
714 ;; Assume fixed-size chars in the buffer. 714 ;; Assume fixed-size chars in the buffer.
@@ -726,6 +726,7 @@ For more information, see the function `buffer-menu'."
726 (erase-buffer) 726 (erase-buffer)
727 (setq standard-output (current-buffer)) 727 (setq standard-output (current-buffer))
728 (unless Buffer-menu-use-header-line 728 (unless Buffer-menu-use-header-line
729 ;; Use U+2014 (EM DASH) to underline if possible, else U+002D (HYPHEN-MINUS)
729 (let ((underline (if (char-displayable-p ?—) ?— ?-))) 730 (let ((underline (if (char-displayable-p ?—) ?— ?-)))
730 (insert header 731 (insert header
731 (apply 'string 732 (apply 'string