Function: server-goto-toplevel

server-goto-toplevel is a byte-compiled function defined in server.el.gz.

Signature

(server-goto-toplevel PROC)

Source Code

;; Defined in /usr/src/emacs/lisp/server.el.gz
(defun server-goto-toplevel (proc)
  (condition-case nil
      ;; If we're running isearch, we must abort it to allow Emacs to
      ;; display the buffer and switch to it.
      (dolist (buffer (buffer-list))
        (with-current-buffer buffer
          (when (bound-and-true-p isearch-mode)
            (isearch-cancel))))
    ;; Signaled by isearch-cancel.
    (quit (message nil)))
  (when (> (minibuffer-depth) 0)
    ;; We're inside a minibuffer already, so if the emacs-client is trying
    ;; to open a frame on a new display, we might end up with an unusable
    ;; frame because input from that display will be blocked (until exiting
    ;; the minibuffer).  Better exit this minibuffer right away.
    (run-with-timer 0 nil (lambda () (server-execute-continuation proc)))
    (top-level)))