[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107972: * lisp/server.el (server-exe
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107972: * lisp/server.el (server-execute): Respect initial-buffer-choice |
Date: |
Fri, 20 Apr 2012 18:04:19 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107972
fixes bug(s): http://debbugs.gnu.org/2825
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Fri 2012-04-20 18:04:19 +0800
message:
* 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.
modified:
etc/NEWS
lisp/ChangeLog
lisp/server.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-04-17 21:38:34 +0000
+++ b/etc/NEWS 2012-04-20 10:04:19 +0000
@@ -53,6 +53,10 @@
*** 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.
+
* Editing Changes in Emacs 24.2
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-04-20 08:48:50 +0000
+++ b/lisp/ChangeLog 2012-04-20 10:04:19 +0000
@@ -1,3 +1,10 @@
+2012-04-20 Chong Yidong <address@hidden>
+
+ * 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 <address@hidden>
* battery.el (battery-echo-area-format): Display remaining time
=== modified file 'lisp/server.el'
--- a/lisp/server.el 2012-04-20 08:48:50 +0000
+++ b/lisp/server.el 2012-04-20 10:04:19 +0000
@@ -821,10 +821,6 @@
(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
@@ -857,9 +853,6 @@
(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)
@@ -1230,12 +1223,17 @@
;; 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107972: * lisp/server.el (server-execute): Respect initial-buffer-choice,
Chong Yidong <=