Commit 8573f9ad authored by Karoly Lorentey's avatar Karoly Lorentey

Fix `emacsclient --eval '(progn (find-file "file")'' and the like. (Reported by Han Boetes.)

* lisp/server.el (server-process-filter): Switch to *scratch* immediately
  after creating the frame, before evaluating any -evals.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-510
parent 4d73ec19
......@@ -636,6 +636,10 @@ The following commands are accepted by the client:
(select-frame frame)
(server-client-set client 'frame frame)
(server-client-set client 'terminal (frame-terminal frame))
;; Display *scratch* by default.
(switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
(setq dontkill t))
;; This emacs does not support X.
(server-log "Window system unsupported" proc)
......@@ -689,6 +693,9 @@ The following commands are accepted by the client:
(server-client-set client 'tty (terminal-name frame))
(server-client-set client 'terminal (frame-terminal frame))
;; Display *scratch* by default.
(switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
;; Reply with our pid.
(server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n"))
(setq dontkill t))))
......@@ -753,8 +760,6 @@ The following commands are accepted by the client:
(when frame
(with-selected-frame frame
(switch-to-buffer (or (car buffers)
(get-buffer-create "*scratch*")))
(display-startup-echo-area-message)
(unless inhibit-splash-screen
(condition-case err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment