From ede8f2fea1fdd675c4eb87c0e95c382ae2707bfe Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 13 Nov 2001 17:29:40 +0000 Subject: [PATCH] (electric-buffer-update-highlight): New function. (electric-buffer-overlay): New variable. (electric-buffer-menu-looper): Call electric-buffer-update-highlight. (electric-buffer-list): Likewise. --- lisp/ebuff-menu.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index b50dbe88065..3d2f87b04b0 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -64,6 +64,7 @@ Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil. (progn (set-buffer buffer) (Electric-buffer-menu-mode) + (electric-buffer-update-highlight) (setq select (catch 'electric-buffer-menu-select (message "<<< Press Return to bury the buffer list >>>") @@ -116,7 +117,8 @@ Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil. (goto-char (point-max)) (forward-line -1) (if (pos-visible-in-window-p (point-max)) - (recenter -1))))) + (recenter -1)))) + (electric-buffer-update-highlight)) (put 'Electric-buffer-menu-mode 'mode-class 'special) (defun Electric-buffer-menu-mode () @@ -263,6 +265,18 @@ Returns to Electric Buffer Menu when done." (message "Buffer %s does not exist!" bufnam) (sit-for 4)))) +(defvar electric-buffer-overlay nil) +(defun electric-buffer-update-highlight () + ;; Make sure we have an overlay to use. + (or electric-buffer-overlay + (progn + (make-local-variable 'electric-buffer-overlay) + (setq electric-buffer-overlay (make-overlay (point) (point))))) + (move-overlay electric-buffer-overlay + (save-excursion (beginning-of-line) (point)) + (save-excursion (end-of-line) (point))) + (overlay-put electric-buffer-overlay 'face 'highlight)) + (provide 'ebuff-menu) ;;; ebuff-menu.el ends here -- 2.39.5