From: Dmitry Antipov Date: Sun, 24 Mar 2013 05:29:35 +0000 (+0400) Subject: * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~526^2~103 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2bf7d27acd741bf870d6ca0c74dbed7b7260b5ad;p=emacs.git * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument to be optional or nil. Adjust comment and convert it to docstring. * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message. * frame.c (display_x_get_resource, Fx_get_resource): Break long line. --- diff --git a/src/ChangeLog b/src/ChangeLog index 16e70324af2..fb1c4fdc64c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-03-24 Dmitry Antipov + + * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument + to be optional or nil. Adjust comment and convert it to docstring. + * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message. + * frame.c (display_x_get_resource, Fx_get_resource): Break long line. + 2013-03-24 Paul Eggert Static checking by GCC 4.8-20130319. diff --git a/src/frame.c b/src/frame.c index 615b31c978d..5360c1c701d 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3495,7 +3495,8 @@ The optional arguments COMPONENT and SUBCLASS add to the key and the class, respectively. You must specify both of them or neither. If you specify them, the key is `INSTANCE.COMPONENT.ATTRIBUTE' and the class is `Emacs.CLASS.SUBCLASS'. */) - (Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass) + (Lisp_Object attribute, Lisp_Object class, Lisp_Object component, + Lisp_Object subclass) { #ifdef HAVE_X_WINDOWS check_x (); @@ -3508,7 +3509,9 @@ and the class is `Emacs.CLASS.SUBCLASS'. */) /* Get an X resource, like Fx_get_resource, but for display DPYINFO. */ Lisp_Object -display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass) +display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, + Lisp_Object class, Lisp_Object component, + Lisp_Object subclass) { return xrdb_get_resource (dpyinfo->xrdb, attribute, class, component, subclass); diff --git a/src/xfaces.c b/src/xfaces.c index eb33a38a491..6db6ac7683f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3395,21 +3395,22 @@ set_font_frame_param (Lisp_Object frame, Lisp_Object lface) } } - -/* Get the value of X resource RESOURCE, class CLASS for the display - of frame FRAME. This is here because ordinary `x-get-resource' - doesn't take a frame argument. */ - DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource, - Sinternal_face_x_get_resource, 3, 3, 0, doc: /* */) + Sinternal_face_x_get_resource, 2, 3, 0, + doc: /* Get the value of X resource RESOURCE, class CLASS. +Returned value is for the display of frame FRAME. If FRAME is not +specified or nil, use selected frame. This function exists because +ordinary `x-get-resource' doesn't take a frame argument. */) (Lisp_Object resource, Lisp_Object class, Lisp_Object frame) { Lisp_Object value = Qnil; + struct frame *f; + CHECK_STRING (resource); CHECK_STRING (class); - CHECK_LIVE_FRAME (frame); + f = decode_live_frame (frame); block_input (); - value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)), + value = display_x_get_resource (FRAME_X_DISPLAY_INFO (f), resource, class, Qnil, Qnil); unblock_input (); return value; diff --git a/src/xselect.c b/src/xselect.c index 5b90d7def22..e9a8e2107db 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2571,7 +2571,7 @@ x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, return 1; } -DEFUN ("x-send-client-message", Fx_send_client_event, +DEFUN ("x-send-client-message", Fx_send_client_message, Sx_send_client_message, 6, 6, 0, doc: /* Send a client message of MESSAGE-TYPE to window DEST on DISPLAY.