emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114274: Unify Fx_focus_frame between all ports.


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r114274: Unify Fx_focus_frame between all ports.
Date: Fri, 13 Sep 2013 16:46:47 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114274
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-09-13 20:46:18 +0400
message:
  Unify Fx_focus_frame between all ports.
  * src/frame.h (x_focus_frame): New prototype.
  * src/xfns.c (Fx_focus_frame): Remove.
  (syms_of_xfns): Do not defsubr it.
  (x_focus_frame): X implementation.
  * src/nsfns.m (Fx_focus_frame): Remove.
  (syms_of_nsfns): Do not defsubr it.
  (x_focus_frame): NS implementation.
  * src/w32term.c (Fx_focus_frame): Remove.
  (x_focus_on_frame): Rename to...
  (x_focus_frame): W32 implementation.
  * src/w32term.h (x_focus_on_frame): Remove prototype.
  * src/w32fns.c (Fx_focus_frame): Remove.
  (syms_of_w32fns): Do not defsubr it.
  * src/frame.c (Fx_focus_frame): Define here.
  (syms_of_frame): Defsubr here.
  * src/gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
  * lisp/frame.el (x-focus-frame): Mark as declared in frame.c.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/frame.el                  frame.el-20091113204419-o5vbwnq5f7feedwu-275
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/frame.c                    frame.c-20091113204419-o5vbwnq5f7feedwu-243
  src/frame.h                    frame.h-20091113204419-o5vbwnq5f7feedwu-229
  src/gtkutil.c                  gtkutil.c-20091113204419-o5vbwnq5f7feedwu-2527
  src/nsfns.m                    nsfns.m-20091113204419-o5vbwnq5f7feedwu-8741
  src/w32fns.c                   w32fns.c-20091113204419-o5vbwnq5f7feedwu-945
  src/w32term.c                  w32term.c-20091113204419-o5vbwnq5f7feedwu-950
  src/w32term.h                  w32term.h-20091113204419-o5vbwnq5f7feedwu-954
  src/xfns.c                     xfns.c-20091113204419-o5vbwnq5f7feedwu-274
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-09-13 14:56:03 +0000
+++ b/lisp/ChangeLog    2013-09-13 16:46:18 +0000
@@ -1,3 +1,7 @@
+2013-09-13  Dmitry Antipov  <address@hidden>
+
+       * frame.el (x-focus-frame): Mark as declared in frame.c.
+
 2013-09-13  Stefan Monnier  <address@hidden>
 
        * ls-lisp.el: Use advice-add.

=== modified file 'lisp/frame.el'
--- a/lisp/frame.el     2013-09-01 01:52:54 +0000
+++ b/lisp/frame.el     2013-09-13 16:46:18 +0000
@@ -759,7 +759,7 @@
        (nreverse frame-initial-geometry-arguments))
   (cdr param-list))
 
-(declare-function x-focus-frame "xfns.c" (frame))
+(declare-function x-focus-frame "frame.c" (frame))
 
 (defun select-frame-set-input-focus (frame &optional norecord)
   "Select FRAME, raise it, and set input focus, if possible.

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-09-13 15:03:51 +0000
+++ b/src/ChangeLog     2013-09-13 16:46:18 +0000
@@ -1,5 +1,25 @@
 2013-09-13  Dmitry Antipov  <address@hidden>
 
+       Unify Fx_focus_frame between all ports.
+       * frame.h (x_focus_frame): New prototype.
+       * xfns.c (Fx_focus_frame): Remove.
+       (syms_of_xfns): Do not defsubr it.
+       (x_focus_frame): X implementation.
+       * nsfns.m (Fx_focus_frame): Remove.
+       (syms_of_nsfns): Do not defsubr it.
+       (x_focus_frame): NS implementation.
+       * w32term.c (Fx_focus_frame): Remove.
+       (x_focus_on_frame): Rename to...
+       (x_focus_frame): W32 implementation.
+       * w32term.h (x_focus_on_frame): Remove prototype.
+       * w32fns.c (Fx_focus_frame): Remove.
+       (syms_of_w32fns): Do not defsubr it.
+       * frame.c (Fx_focus_frame): Define here.
+       (syms_of_frame): Defsubr here.
+       * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
+
+2013-09-13  Dmitry Antipov  <address@hidden>
+
        Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
        All of them are replaced with FRAME_DISPLAY_INFO, defined in
        each port to reference the port-specific window system data.

=== modified file 'src/frame.c'
--- a/src/frame.c       2013-09-13 15:03:51 +0000
+++ b/src/frame.c       2013-09-13 16:46:18 +0000
@@ -1901,6 +1901,14 @@
   return FRAME_FOCUS_FRAME (decode_live_frame (frame));
 }
 
+DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
+       doc: /* Set the input focus to FRAME.
+FRAME nil means use the selected frame.  */)
+  (Lisp_Object frame)
+{
+  x_focus_frame (decode_window_system_frame (frame));
+  return Qnil;
+}
 
 
 /* Return the value of frame parameter PROP in frame FRAME.  */
@@ -4524,6 +4532,7 @@
   defsubr (&Svisible_frame_list);
   defsubr (&Sraise_frame);
   defsubr (&Slower_frame);
+  defsubr (&Sx_focus_frame);
   defsubr (&Sredirect_frame_focus);
   defsubr (&Sframe_focus);
   defsubr (&Sframe_parameters);

=== modified file 'src/frame.h'
--- a/src/frame.h       2013-09-13 15:03:51 +0000
+++ b/src/frame.h       2013-09-13 16:46:18 +0000
@@ -1263,6 +1263,7 @@
 
 extern void x_query_colors (struct frame *f, XColor *, int);
 extern void x_query_color (struct frame *f, XColor *);
+extern void x_focus_frame (struct frame *);
 
 #endif /* HAVE_WINDOW_SYSTEM */
 

=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c     2013-09-13 15:03:51 +0000
+++ b/src/gtkutil.c     2013-09-13 16:46:18 +0000
@@ -3975,9 +3975,9 @@
   event.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), mod);
   kbd_buffer_store_event (&event);
 
-   /* Return focus to the frame after we have clicked on a detached
-      tool bar button. */
-   Fx_focus_frame (frame);
+  /* Return focus to the frame after we have clicked on a detached
+     tool bar button. */
+  x_focus_frame (f);
 }
 
 /* Callback function invoked when a tool bar item is pressed in a detached

=== modified file 'src/nsfns.m'
--- a/src/nsfns.m       2013-09-13 15:03:51 +0000
+++ b/src/nsfns.m       2013-09-13 16:46:18 +0000
@@ -1339,13 +1339,9 @@
   return unbind_to (count, frame);
 }
 
-
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
-       doc: /* Set the input focus to FRAME.
-FRAME nil means use the selected frame.  */)
-     (Lisp_Object frame)
+void
+x_focus_frame (struct frame *f)
 {
-  struct frame *f = decode_window_system_frame (frame);
   struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
 
   if (dpyinfo->x_focus_frame != f)
@@ -1356,8 +1352,6 @@
       [[view window] makeKeyAndOrderFront: view];
       unblock_input ();
     }
-
-  return Qnil;
 }
 
 
@@ -2894,7 +2888,6 @@
   defsubr (&Sns_list_services);
   defsubr (&Sns_perform_service);
   defsubr (&Sns_convert_utf8_nfd_to_nfc);
-  defsubr (&Sx_focus_frame);
   defsubr (&Sns_popup_font_panel);
   defsubr (&Sns_popup_color_panel);
 

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2013-09-13 15:03:51 +0000
+++ b/src/w32fns.c      2013-09-13 16:46:18 +0000
@@ -4622,15 +4622,6 @@
   return xfocus;
 }
 
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
-       doc: /* Give FRAME input focus, raising to foreground if necessary.  */)
-  (Lisp_Object frame)
-{
-  x_focus_on_frame (decode_window_system_frame (frame));
-  return Qnil;
-}
-
-
 DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
        doc: /* Internal function called by `color-defined-p', which see.
 \(Note that the Nextstep version of this function ignores FRAME.)  */)
@@ -7857,7 +7848,6 @@
   defsubr (&Sx_close_connection);
   defsubr (&Sx_display_list);
   defsubr (&Sx_synchronize);
-  defsubr (&Sx_focus_frame);
 
   /* W32 specific functions */
 

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2013-09-13 15:03:51 +0000
+++ b/src/w32term.c     2013-09-13 16:46:18 +0000
@@ -5806,7 +5806,7 @@
 /* focus shifting, raising and lowering.  */
 
 void
-x_focus_on_frame (struct frame *f)
+x_focus_frame (struct frame *f)
 {
   struct w32_display_info *dpyinfo = &one_w32_display_info;
 

=== modified file 'src/w32term.h'
--- a/src/w32term.h     2013-09-13 15:03:51 +0000
+++ b/src/w32term.h     2013-09-13 16:46:18 +0000
@@ -199,8 +199,6 @@
                                     Lisp_Object, Lisp_Object,
                                     Lisp_Object, Lisp_Object);
 
-extern void x_focus_on_frame (struct frame *f);
-
 /* also defined in xterm.h XXX: factor out to common header */
 
 extern struct w32_display_info *w32_term_init (Lisp_Object,

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2013-09-13 15:03:51 +0000
+++ b/src/xfns.c        2013-09-13 16:46:18 +0000
@@ -3252,12 +3252,9 @@
    policy.  But I think it's okay to use when it's clearly done
    following a user-command.  */
 
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
-       doc: /* Set the input focus to FRAME.
-FRAME nil means use the selected frame.  */)
-  (Lisp_Object frame)
+void
+x_focus_frame (struct frame *f)
 {
-  struct frame *f = decode_window_system_frame (frame);
   Display *dpy = FRAME_X_DISPLAY (f);
 
   block_input ();
@@ -3279,8 +3276,6 @@
 
   x_uncatch_errors ();
   unblock_input ();
-
-  return Qnil;
 }
 
 
@@ -6170,7 +6165,6 @@
   defsubr (&Sx_close_connection);
   defsubr (&Sx_display_list);
   defsubr (&Sx_synchronize);
-  defsubr (&Sx_focus_frame);
   defsubr (&Sx_backspace_delete_keys_p);
 
   defsubr (&Sx_show_tip);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]