From: Richard M. Stallman Date: Fri, 21 Jul 1995 12:40:55 +0000 (+0000) Subject: (imenu-choose-buffer-index): Avoid trying to select WINDOW if it is nil. X-Git-Tag: emacs-19.34~3224 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a840d8bf75c820f240996248f4921258de91177;p=emacs.git (imenu-choose-buffer-index): Avoid trying to select WINDOW if it is nil. --- 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)))