diff options
| author | Chong Yidong | 2012-04-20 18:04:19 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-20 18:04:19 +0800 |
| commit | de6ff46dce80a715d46c34ff46f01a28afb63db9 (patch) | |
| tree | 2c75ba401e4b3bbc3079eddedac99ffaac083e54 /lisp/server.el | |
| parent | c07a4c0b599e0debfb10acdf02ac6559b998a88a (diff) | |
| download | emacs-de6ff46dce80a715d46c34ff46f01a28afb63db9.tar.gz emacs-de6ff46dce80a715d46c34ff46f01a28afb63db9.zip | |
* lisp/server.el (server-execute): Respect initial-buffer-choice
if it is a string and there are no files to open.
(server-create-window-system-frame, server-create-tty-frame):
Don't switch buffers here.
Fixes: debbugs:2825
Diffstat (limited to 'lisp/server.el')
| -rw-r--r-- | lisp/server.el | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/server.el b/lisp/server.el index 123fea3743a..f9c8ea5c577 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -821,10 +821,6 @@ This handles splitting the command if it would be bigger than | |||
| 821 | (select-frame frame) | 821 | (select-frame frame) |
| 822 | (process-put proc 'frame frame) | 822 | (process-put proc 'frame frame) |
| 823 | (process-put proc 'terminal (frame-terminal frame)) | 823 | (process-put proc 'terminal (frame-terminal frame)) |
| 824 | |||
| 825 | ;; Display *scratch* by default. | ||
| 826 | (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) | ||
| 827 | |||
| 828 | frame)) | 824 | frame)) |
| 829 | 825 | ||
| 830 | (defun server-create-window-system-frame (display nowait proc parent-id | 826 | (defun server-create-window-system-frame (display nowait proc parent-id |
| @@ -857,9 +853,6 @@ This handles splitting the command if it would be bigger than | |||
| 857 | (select-frame frame) | 853 | (select-frame frame) |
| 858 | (process-put proc 'frame frame) | 854 | (process-put proc 'frame frame) |
| 859 | (process-put proc 'terminal (frame-terminal frame)) | 855 | (process-put proc 'terminal (frame-terminal frame)) |
| 860 | |||
| 861 | ;; Display *scratch* by default. | ||
| 862 | (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) | ||
| 863 | frame))) | 856 | frame))) |
| 864 | 857 | ||
| 865 | (defun server-goto-toplevel (proc) | 858 | (defun server-goto-toplevel (proc) |
| @@ -1230,12 +1223,17 @@ The following commands are accepted by the client: | |||
| 1230 | ;; including code that needs to wait. | 1223 | ;; including code that needs to wait. |
| 1231 | (with-local-quit | 1224 | (with-local-quit |
| 1232 | (condition-case err | 1225 | (condition-case err |
| 1233 | (let* ((buffers | 1226 | (let ((buffers (server-visit-files files proc nowait))) |
| 1234 | (when files | ||
| 1235 | (server-visit-files files proc nowait)))) | ||
| 1236 | |||
| 1237 | (mapc 'funcall (nreverse commands)) | 1227 | (mapc 'funcall (nreverse commands)) |
| 1238 | 1228 | ||
| 1229 | ;; If we were told only to open a new client, obey | ||
| 1230 | ;; `initial-buffer-choice' if it specifies a file. | ||
| 1231 | (unless (or files commands) | ||
| 1232 | (if (stringp initial-buffer-choice) | ||
| 1233 | (find-file initial-buffer-choice) | ||
| 1234 | (switch-to-buffer (get-buffer-create "*scratch*") | ||
| 1235 | 'norecord))) | ||
| 1236 | |||
| 1239 | ;; Delete the client if necessary. | 1237 | ;; Delete the client if necessary. |
| 1240 | (cond | 1238 | (cond |
| 1241 | (nowait | 1239 | (nowait |