summaryrefslogtreecommitdiff
path: root/lisp/ebuff-menu.el
diff options
context:
space:
mode:
authorJohn Paul Wallington <jpw@pobox.com>2003-03-10 03:06:13 +0000
committerJohn Paul Wallington <jpw@pobox.com>2003-03-10 03:06:13 +0000
commit080314d3e617f35a34a3af48727be33357019536 (patch)
tree808dc0a4df22cdeb083c86d5bb07f9ef7eaff05e /lisp/ebuff-menu.el
parente361e87a42039b3561876926f4f05f1d6652dced (diff)
downloademacs-080314d3e617f35a34a3af48727be33357019536.tar.gz
(electric-buffer-update-highlight): Do nothing
if major mode isn't `Electric-buffer-menu-mode'.
Diffstat (limited to 'lisp/ebuff-menu.el')
-rw-r--r--lisp/ebuff-menu.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index 21a366f944d..03309415437 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -269,15 +269,16 @@ Returns to Electric Buffer Menu when done."
(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)