*** Setting `imagemagick-types-inhibit' to t now disables the use of
ImageMagick to view images, set
+** String values for `initial-buffer-choice' also apply to emacsclient
+frames, if emacsclient is only told to open a new frame without
+specifying any file to visit or expression to evaluate.
+
\f
* Editing Changes in Emacs 24.2
+2012-04-20 Chong Yidong <cyd@gnu.org>
+
+ * server.el (server-execute): Respect initial-buffer-choice if it
+ is a string and there are no files to open (Bug#2825).
+ (server-create-window-system-frame, server-create-tty-frame):
+ Don't switch buffers here.
+
2012-04-20 Dan Nicolaescu <dann@gnu.org>
* battery.el (battery-echo-area-format): Display remaining time
(select-frame frame)
(process-put proc 'frame frame)
(process-put proc 'terminal (frame-terminal frame))
-
- ;; Display *scratch* by default.
- (switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
-
frame))
(defun server-create-window-system-frame (display nowait proc parent-id
(select-frame frame)
(process-put proc 'frame frame)
(process-put proc 'terminal (frame-terminal frame))
-
- ;; Display *scratch* by default.
- (switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
frame)))
(defun server-goto-toplevel (proc)
;; including code that needs to wait.
(with-local-quit
(condition-case err
- (let* ((buffers
- (when files
- (server-visit-files files proc nowait))))
-
+ (let ((buffers (server-visit-files files proc nowait)))
(mapc 'funcall (nreverse commands))
+ ;; If we were told only to open a new client, obey
+ ;; `initial-buffer-choice' if it specifies a file.
+ (unless (or files commands)
+ (if (stringp initial-buffer-choice)
+ (find-file initial-buffer-choice)
+ (switch-to-buffer (get-buffer-create "*scratch*")
+ 'norecord)))
+
;; Delete the client if necessary.
(cond
(nowait