[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/buff-menu.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/buff-menu.el |
Date: |
Fri, 04 Apr 2003 01:21:41 -0500 |
Index: emacs/lisp/buff-menu.el
diff -c emacs/lisp/buff-menu.el:1.60 emacs/lisp/buff-menu.el:1.61
*** emacs/lisp/buff-menu.el:1.60 Wed Mar 5 22:51:53 2003
--- emacs/lisp/buff-menu.el Mon Mar 17 13:12:42 2003
***************
*** 557,565 ****
(let* ((old-buffer (current-buffer))
(standard-output standard-output)
(mode-end (make-string (- Buffer-menu-mode-width 2) ? ))
! (header (concat "CRM " (Buffer-menu-buffer+size "Buffer" "Size")
" Mode" mode-end "File\n"))
list desired-point name file mode)
(save-excursion
(set-buffer (get-buffer-create "*Buffer List*"))
(setq buffer-read-only nil)
--- 557,589 ----
(let* ((old-buffer (current-buffer))
(standard-output standard-output)
(mode-end (make-string (- Buffer-menu-mode-width 2) ? ))
! (header (concat (propertize "CRM " 'face 'fixed-pitch)
! (Buffer-menu-buffer+size "Buffer" "Size")
" Mode" mode-end "File\n"))
list desired-point name file mode)
+ (when Buffer-menu-use-header-line
+ (let ((spaces
+ ;; FIXME: This is using the settings of the current frame rather
+ ;; than the frame into which the buffer will be displayed.
+ (/ (+ 0.0 (or (frame-parameter nil 'left-fringe) 0)
+ (or (if (eq (frame-parameter nil 'vertical-scroll-bars)
+ 'left)
+ (frame-parameter nil 'scroll-bar-width))
+ 0))
+ (frame-char-width)))
+ (pos 0))
+ ;; Turn spaces in the header into stretch specs so they work
+ ;; regardless of the header-line face.
+ (while (string-match "[ \t]+" header pos)
+ (setq pos (match-end 0))
+ (put-text-property (match-beginning 0) pos 'display
+ ;; Assume fixed-size chars
+ (list 'space :align-to (+ spaces pos))
+ header))
+ ;; Add the leading space
+ (setq header (concat (propertize (make-string (floor spaces) ? )
+ 'display (list 'space :width spaces))
+ header))))
(save-excursion
(set-buffer (get-buffer-create "*Buffer List*"))
(setq buffer-read-only nil)
***************
*** 639,654 ****
(princ "\n"))
(Buffer-menu-mode)
(when Buffer-menu-use-header-line
! (let ((spaces
! (/ (+ (or (frame-parameter nil 'left-fringe) 0)
! (or (if (eq (frame-parameter nil 'vertical-scroll-bars)
! 'left)
! (frame-parameter nil 'scroll-bar-width))
! 0))
! (frame-char-width))))
! (set (make-local-variable 'Buffer-menu-header-line)
! (concat (make-string spaces ? ) header)))
! (setq header-line-format 'Buffer-menu-header-line))
;; DESIRED-POINT doesn't have to be set; it is not when the
;; current buffer is not displayed for some reason.
(and desired-point
--- 663,669 ----
(princ "\n"))
(Buffer-menu-mode)
(when Buffer-menu-use-header-line
! (setq header-line-format header))
;; DESIRED-POINT doesn't have to be set; it is not when the
;; current buffer is not displayed for some reason.
(and desired-point
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/buff-menu.el,
Miles Bader <=