changeset 20663:2483aa76b98d

(switch-to-completions): If no completions window, don't try to switch to it.
author Karl Heuer <kwzh@gnu.org>
date Sun, 18 Jan 1998 03:32:20 +0000
parents 910d4cdbf81f
children a3e36554a095
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sun Jan 18 03:29:06 1998 +0000
+++ b/lisp/simple.el	Sun Jan 18 03:32:20 1998 +0000
@@ -3609,10 +3609,12 @@
   ;; 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))))
 
 ;; Support keyboard commands to turn on various modifiers.