summaryrefslogtreecommitdiff
path: root/lisp/ebuff-menu.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-13 17:29:40 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-13 17:29:40 +0000
commitede8f2fea1fdd675c4eb87c0e95c382ae2707bfe (patch)
treefdb8f46a7881d2492dfd9d0b3ba7215276fd063c /lisp/ebuff-menu.el
parentfad241d332d59401ef28aadef2589634ccb25d26 (diff)
downloademacs-ede8f2fea1fdd675c4eb87c0e95c382ae2707bfe.tar.gz
(electric-buffer-update-highlight): New function.
(electric-buffer-overlay): New variable. (electric-buffer-menu-looper): Call electric-buffer-update-highlight. (electric-buffer-list): Likewise.
Diffstat (limited to 'lisp/ebuff-menu.el')
-rw-r--r--lisp/ebuff-menu.el16
1 files changed, 15 insertions, 1 deletions
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