(Fx_rebind_key, Fx_rebind_keys): X10 definitions deleted.
authorRichard M. Stallman <rms@gnu.org>
Wed, 26 May 1993 21:51:07 +0000 (21:51 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 26 May 1993 21:51:07 +0000 (21:51 +0000)
(syms_of_xfns): Install them only if X11.

src/xfns.c

index b073b91..54ce8bb 100644 (file)
@@ -3333,88 +3333,7 @@ See the documentation of `x-rebind-key' for more information.")
     }
   return Qnil;
 }
-#else
-DEFUN ("x-rebind-key", Fx_rebind_key, Sx_rebind_key, 3, 3, 0,
-  "Rebind KEYCODE, with shift bits SHIFT-MASK, to new string NEWSTRING.\n\
-KEYCODE and SHIFT-MASK should be numbers representing the X keyboard code\n\
-and shift mask respectively.  NEWSTRING is an arbitrary string of keystrokes.\n\
-If SHIFT-MASK is nil, then KEYCODE's key will be bound to NEWSTRING for\n\
-all shift combinations.\n\
-Shift Lock  1     Shift    2\n\
-Meta       4      Control  8\n\
-\n\
-For values of KEYCODE, see /usr/lib/Xkeymap.txt (remember that the codes\n\
-in that file are in octal!)\n\
-\n\
-NOTE: due to an X bug, this function will not take effect unless one has\n\
-a `~/.Xkeymap' file.  (See the documentation for the `keycomp' program.)\n\
-This problem will be fixed in X version 11.")
-
-  (keycode, shift_mask, newstring)
-     register Lisp_Object keycode;
-     register Lisp_Object shift_mask;
-     register Lisp_Object newstring;
-{
-  char *rawstring;
-  int keysym, rawshift;
-  int i, strsize;
-  
-  CHECK_NUMBER (keycode, 1);
-  if (!NILP (shift_mask))
-    CHECK_NUMBER (shift_mask, 2);
-  CHECK_STRING (newstring, 3);
-  strsize = XSTRING (newstring)->size;
-  rawstring = (char *) xmalloc (strsize);
-  bcopy (XSTRING (newstring)->data, rawstring, strsize);
-
-  keysym = ((unsigned) (XINT (keycode))) & 255;
-
-  if (NILP (shift_mask))
-    {
-      for (i = 0; i <= 15; i++)
-       XRebindCode (keysym, i<<11, rawstring, strsize);
-    }
-  else
-    {
-      rawshift = (((unsigned) (XINT (shift_mask))) & 15) << 11;
-      XRebindCode (keysym, rawshift, rawstring, strsize);
-    }
-  return Qnil;
-}
-  
-DEFUN ("x-rebind-keys", Fx_rebind_keys, Sx_rebind_keys, 2, 2, 0,
-  "Rebind KEYCODE to list of strings STRINGS.\n\
-STRINGS should be a list of 16 elements, one for each shift combination.\n\
-nil as element means don't change.\n\
-See the documentation of `x-rebind-key' for more information.")
-  (keycode, strings)
-     register Lisp_Object keycode;
-     register Lisp_Object strings;
-{
-  register Lisp_Object item;
-  register char *rawstring;
-  KeySym rawkey, modifier[1];
-  int strsize;
-  register unsigned i;
-
-  CHECK_NUMBER (keycode, 1);
-  CHECK_CONS (strings, 2);
-  rawkey = (KeySym) ((unsigned) (XINT (keycode))) & 255;
-  for (i = 0; i <= 15; strings = Fcdr (strings), i++)
-    {
-      item = Fcar (strings);
-      if (!NILP (item))
-       {
-         CHECK_STRING (item, 2);
-         strsize = XSTRING (item)->size;
-         rawstring = (char *) xmalloc (strsize);
-         bcopy (XSTRING (item)->data, rawstring, strsize);
-         XRebindCode (rawkey, i << 11, rawstring, strsize);
-       }
-    }
-  return Qnil;
-}
-#endif /* not HAVE_X11 */
+#endif /* HAVE_X11 */
 \f
 #ifdef HAVE_X11
 Visual *
@@ -3694,6 +3613,8 @@ unless you set the mouse color.");
   defsubr (&Sx_display_visual_class);
   defsubr (&Sx_display_backing_store);
   defsubr (&Sx_display_save_under);
+  defsubr (&Sx_rebind_key);
+  defsubr (&Sx_rebind_keys);
 #if 0
   defsubr (&Sx_track_pointer);
   defsubr (&Sx_grab_pointer);
@@ -3711,8 +3632,6 @@ unless you set the mouse color.");
 #if 0
   defsubr (&Sx_horizontal_line);
 #endif
-  defsubr (&Sx_rebind_key);
-  defsubr (&Sx_rebind_keys);
   defsubr (&Sx_open_connection);
   defsubr (&Sx_close_current_connection);
   defsubr (&Sx_synchronize);