]> git.eshelyaron.com Git - emacs.git/commitdiff
(switch-to-completions): If no completions window,
authorKarl Heuer <kwzh@gnu.org>
Sun, 18 Jan 1998 03:32:20 +0000 (03:32 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sun, 18 Jan 1998 03:32:20 +0000 (03:32 +0000)
don't try to switch to it.

lisp/simple.el

index fcb53009dffe433b9bfccc4a3725a8f185b6156c..944f8e9e0e0d4a8c6f3e5ea2070548e8b8b099e7 100644 (file)
@@ -3609,10 +3609,12 @@ select the completion near point.\n\n"))
   ;; Make sure we have a completions window.
   (or (get-buffer-window "*Completions*")
       (minibuffer-completion-help))
-  (select-window (get-buffer-window "*Completions*"))
-  (goto-char (point-min))
-  (search-forward "\n\n")
-  (forward-line 1))
+  (let ((window (get-buffer-window "*Completions*")))
+    (when window
+      (select-window window)
+      (goto-char (point-min))
+      (search-forward "\n\n")
+      (forward-line 1))))
 \f
 ;; Support keyboard commands to turn on various modifiers.