diff options
author | John Paul Wallington <jpw@pobox.com> | 2003-03-06 03:53:12 +0000 |
---|---|---|
committer | John Paul Wallington <jpw@pobox.com> | 2003-03-06 03:53:12 +0000 |
commit | 463a7342da664c04d7c959b5177e1095de0eda1a (patch) | |
tree | 42edceb232e10e1aba5909314898cb7ec94fe890 /lisp/buff-menu.el | |
parent | e59d29d6b77d482b05dbad88a4841475ac664fc7 (diff) | |
download | emacs-463a7342da664c04d7c959b5177e1095de0eda1a.tar.gz |
(Buffer-menu-mode-map): Add docstring.
(Buffer-menu-buffer): Fix indentation.
(list-buffers-noselect): Calculate header-line spacing to take
into account width of left fringe and left scrollbar.
Diffstat (limited to 'lisp/buff-menu.el')
-rw-r--r-- | lisp/buff-menu.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 696b7245d16..f17666422b3 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -96,7 +96,8 @@ nil for default sorting by visited order.") (defconst Buffer-menu-buffer-column 4) -(defvar Buffer-menu-mode-map nil "") +(defvar Buffer-menu-mode-map nil + "Local keymap for `Buffer-menu-mode' buffers.") (if Buffer-menu-mode-map () @@ -199,8 +200,8 @@ Letters do not insert themselves; instead, they are commands. (error "No buffer named `%s'" name) nil)) (or (and buf (buffer-name buf) buf) - (if error-if-non-existent-p - (error "No buffer on this line") + (if error-if-non-existent-p + (error "No buffer on this line") nil))))) (defun buffer-menu (&optional arg) @@ -556,7 +557,6 @@ For more information, see the function `buffer-menu'." (let* ((old-buffer (current-buffer)) (standard-output standard-output) (mode-end (make-string (- Buffer-menu-mode-width 2) ? )) - ;; Fixme: This is wrong for left-hand scroll-bars. (header (concat "CRM " (Buffer-menu-buffer+size "Buffer" "Size") " Mode" mode-end "File\n")) list desired-point name file mode) @@ -639,8 +639,15 @@ For more information, see the function `buffer-menu'." (princ "\n")) (Buffer-menu-mode) (when Buffer-menu-use-header-line - (set (make-local-variable 'Buffer-menu-header-line) - (concat " " header)) + (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. |