Mercurial > emacs
changeset 50068:9fa70ec97b76
(electric-buffer-update-highlight): Do nothing
if major mode isn't `Electric-buffer-menu-mode'.
author | John Paul Wallington <jpw@pobox.com> |
---|---|
date | Mon, 10 Mar 2003 03:06:13 +0000 |
parents | c623407cb87d |
children | fc4e98a22d7e |
files | lisp/ebuff-menu.el |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ebuff-menu.el Mon Mar 10 01:09:05 2003 +0000 +++ b/lisp/ebuff-menu.el Mon Mar 10 03:06:13 2003 +0000 @@ -269,15 +269,16 @@ (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)) + (when (eq major-mode 'Electric-buffer-menu-mode) + ;; 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)