diff options
author | Richard M. Stallman <rms@gnu.org> | 2001-11-13 17:29:40 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2001-11-13 17:29:40 +0000 |
commit | ede8f2fea1fdd675c4eb87c0e95c382ae2707bfe (patch) | |
tree | fdb8f46a7881d2492dfd9d0b3ba7215276fd063c /lisp/ebuff-menu.el | |
parent | fad241d332d59401ef28aadef2589634ccb25d26 (diff) | |
download | emacs-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.el | 16 |
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 |