From 4f1ab860feefee65a64901e1947e82dcdf1d9bac Mon Sep 17 00:00:00 2001 From: Dave Love Date: Sun, 5 Jan 2003 23:15:36 +0000 Subject: [PATCH] (Buffer-menu-execute): Fix for effect of header line. --- lisp/ChangeLog | 11 +++++++++++ lisp/buff-menu.el | 12 ++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 682e03904c2..0255264eda1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2003-01-05 Dave Love + + * buff-menu.el (Buffer-menu-execute): Fix for effect of header + line. + + * international/mule-diag.el (non-iso-charset-alist): Add + vietnamese-tcvn. + + * international/mule-cmds.el (locale-language-names): Use + Croatian, Swedish. + 2003-01-05 Andreas Schwab * buff-menu.el (Buffer-menu-buffer+size): Don't clobber buffer diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 205a8ab7d32..c7bb7009241 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -332,7 +332,8 @@ and then move up one line. Prefix arg means move that many lines." (interactive) (save-excursion (goto-char (point-min)) - (forward-line 1) + (unless Buffer-menu-use-header-line + (forward-line 1)) (while (re-search-forward "^..S" nil t) (let ((modp nil)) (save-excursion @@ -344,10 +345,11 @@ and then move up one line. Prefix arg means move that many lines." (insert (if modp ?* ? )))))) (save-excursion (goto-char (point-min)) - (forward-line 1) + (unless Buffer-menu-use-header-line + (forward-line 1)) (let ((buff-menu-buffer (current-buffer)) (buffer-read-only nil)) - (while (search-forward "\nD" nil t) + (while (re-search-forward "^D" nil t) (forward-char -1) (let ((buf (Buffer-menu-buffer nil))) (or (eq buf nil) @@ -357,7 +359,8 @@ and then move up one line. Prefix arg means move that many lines." (progn (delete-char 1) (insert ? )) (delete-region (point) (progn (forward-line 1) (point))) - (forward-char -1))))))) + (unless (bobp) + (forward-char -1)))))))) (defun Buffer-menu-select () "Select this line's buffer; also display buffers marked with `>'. @@ -551,6 +554,7 @@ 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) -- 2.39.2