From 4a840d8bf75c820f240996248f4921258de91177 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jul 1995 12:40:55 +0000 Subject: [PATCH] (imenu-choose-buffer-index): Avoid trying to select WINDOW if it is nil. --- lisp/imenu.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/imenu.el b/lisp/imenu.el index 3fedade04e7..715dcde3773 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -966,7 +966,7 @@ The returned value is on the form (INDEX-NAME . INDEX-POSITION)." (and mouse-triggered (not (equal last-nonmenu-event '(menu-bar))) (let ((window (posn-window (event-start last-nonmenu-event)))) - (or (framep window) (select-window window)))) + (or (framep window) (null window) (select-window window)))) ;; Create a list for this buffer only when needed. (while (eq result t) (setq index-alist (if alist alist (imenu--make-index-alist))) -- 2.39.2