* lib-src/emacsclient.c (longopts, decode_options, main): Add frame-parameters.
* lisp/server.el (server-create-window-system-frame): Add parameters arg.
(server-process-filter): Doc fix. Handle frame-parameters.
* doc/emacs/misc.texi (emacsclient Options): Mention --frame-parameters.
* doc/man/emacsclient.1: Mention --frame-parameters.
* etc/NEWS: Mention this.
+2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
+
+ * misc.texi (emacsclient Options): Mention --frame-parameters.
+
2011-06-09 Glenn Morris <rgm@gnu.org>
* custom.texi (Specifying File Variables):
argument while supplying the @samp{-c} option, the new frame displays
the @samp{*scratch*} buffer (@pxref{Buffers}).
+@item -F
+@itemx --frame-parameters=@var{alist}
+Set the parameters for a newly-created graphical frame
+(@pxref{Frame Parameters}).
+
@item -d @var{display}
@itemx --display=@var{display}
Tell Emacs to open the given files on the X display @var{display}
+2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
+
+ * emacsclient.1: Mention --frame-parameters.
+
2011-03-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.3 released.
.B -c, \-\-create-frame
create a new frame instead of trying to use the current Emacs frame
.TP
+.B \-F, \-\-frame-parameters=ALIST
+set the parameters of a newly-created frame.
+.TP
.B \-d, \-\-display=DISPLAY
tell the server to display the files on the given display.
.TP
+++
*** New emacsclient argument -q/--quiet suppresses some status messages.
++++
+*** New emacsclient argument --frame-parameters can be used to set the
+frame parameters of a newly-created graphical frame.
+
*** If emacsclient shuts down as a result of Emacs signalling an
error, its exit status is 1.
+2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
+
+ * emacsclient.c (longopts, decode_options, main): Add frame-parameters.
+
2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
* movemail.c: Fix race condition and related bugs (Bug#8836).
/* PID of the Emacs server process. */
int emacs_pid = 0;
+/* If non-NULL, a string that should form a frame parameter alist to
+ be used for the new frame */
+const char *frame_parameters = NULL;
+
static void print_help_and_exit (void) NO_RETURN;
static void fail (void) NO_RETURN;
{ "nw", no_argument, NULL, 't' },
{ "create-frame", no_argument, NULL, 'c' },
{ "alternate-editor", required_argument, NULL, 'a' },
+ { "frame-parameters", required_argument, NULL, 'F' },
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
{ "socket-name", required_argument, NULL, 's' },
#endif
print_help_and_exit ();
break;
+ case 'F':
+ frame_parameters = optarg;
+ break;
+
default:
message (TRUE, "Try `%s --help' for more information\n", progname);
exit (EXIT_FAILURE);
send_to_emacs (emacs_socket, " ");
}
+ if (frame_parameters && !current_frame)
+ {
+ send_to_emacs (emacs_socket, "-frame-parameters ");
+ quote_argument (emacs_socket, frame_parameters);
+ send_to_emacs (emacs_socket, " ");
+ }
+
/* If using the current frame, send tty information to Emacs anyway.
In daemon mode, Emacs may need to occupy this tty if no other
frame is available. */
+2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
+
+ * server.el (server-create-window-system-frame): Add parameters arg.
+ (server-process-filter): Doc fix. Handle frame-parameters.
+
2011-06-25 Juanma Barranquero <lekktu@gmail.com>
Fix bug#8730, bug#8781.
frame))
-(defun server-create-window-system-frame (display nowait proc parent-id)
+(defun server-create-window-system-frame (display nowait proc parent-id
+ &optional parameters)
(add-to-list 'frame-inherited-parameters 'client)
(if (not (fboundp 'make-frame-on-display))
(progn
;; killing emacs on that frame.
(let* ((params `((client . ,(if nowait 'nowait proc))
;; This is a leftover, see above.
- (environment . ,(process-get proc 'env))))
+ (environment . ,(process-get proc 'env))
+ ,@parameters))
(display (or display
(frame-parameter nil 'display)
(getenv "DISPLAY")
`-current-frame'
Forbid the creation of new frames.
+`-frame-parameters ALIST'
+ Set the parameters of the created frame.
+
`-nowait'
Request that the next frame created should not be
associated with this client.
commands
dir
use-current-frame
+ frame-parameters ;parameters for newly created frame
tty-name ; nil, `window-system', or the tty name.
tty-type ; string.
files
;; -current-frame: Don't create frames.
(`"-current-frame" (setq use-current-frame t))
+ ;; -frame-parameters: Set frame parameters
+ (`"-frame-parameters"
+ (let ((alist (pop args-left)))
+ (if coding-system
+ (setq alist (decode-coding-string alist coding-system)))
+ (setq frame-parameters (car (read-from-string alist)))))
+
;; -display DISPLAY:
;; Open X frames on the given display instead of the default.
(`"-display"
(if display (server-select-display display)))
((eq tty-name 'window-system)
(server-create-window-system-frame display nowait proc
- parent-id))
+ parent-id
+ frame-parameters))
;; When resuming on a tty, tty-name is nil.
(tty-name
(server-create-tty-frame tty-name tty-type proc))))