1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-06 14:02:07 -08:00

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
This commit is contained in:
Karoly Lorentey 2006-02-12 03:45:02 +00:00
parent 4d73ec190e
commit 8573f9ad33

View file

@ -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