diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-05-26 21:51:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-05-26 21:51:07 +0000 |
commit | 9d04a87aad56d7baeee6173a040b43981956cf49 (patch) | |
tree | 1b04706105d8ee37597ee235401d8946b6317aad /src/xfns.c | |
parent | c469713a1e48f9de9d9af232d6c32d7ebccd7c8a (diff) | |
download | emacs-9d04a87aad56d7baeee6173a040b43981956cf49.tar.gz |
(Fx_rebind_key, Fx_rebind_keys): X10 definitions deleted.
(syms_of_xfns): Install them only if X11.
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 87 |
1 files changed, 3 insertions, 84 deletions
diff --git a/src/xfns.c b/src/xfns.c index b073b9161c2..54ce8bb266d 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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 */ #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); |