# HG changeset patch # User Karl Heuer # Date 885094340 0 # Node ID 2483aa76b98d287818d78f313986c34eeea658ee # Parent 910d4cdbf81f0d732fcdbce5966995a61b9ba880 (switch-to-completions): If no completions window, don't try to switch to it. diff -r 910d4cdbf81f -r 2483aa76b98d lisp/simple.el --- 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.