# HG changeset patch # User John Paul Wallington # Date 1047265573 0 # Node ID 9fa70ec97b768c9a843e12d56fad6275076e8f05 # Parent c623407cb87ddbbea246594b15fc0546d42651b0 (electric-buffer-update-highlight): Do nothing if major mode isn't `Electric-buffer-menu-mode'. diff -r c623407cb87d -r 9fa70ec97b76 lisp/ebuff-menu.el --- 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)