changeset 41016:7cbfb84f7362

(electric-buffer-update-highlight): New function. (electric-buffer-overlay): New variable. (electric-buffer-menu-looper): Call electric-buffer-update-highlight. (electric-buffer-list): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Tue, 13 Nov 2001 17:29:40 +0000
parents 987844bd98c9
children 843813f5e7dc
files lisp/ebuff-menu.el
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ebuff-menu.el	Tue Nov 13 16:39:40 2001 +0000
+++ b/lisp/ebuff-menu.el	Tue Nov 13 17:29:40 2001 +0000
@@ -64,6 +64,7 @@
 	  (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 @@
 	 (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 @@
       (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