diff options
author | Jim Blandy <jimb@redhat.com> | 1993-07-18 06:25:09 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-07-18 06:25:09 +0000 |
commit | 499dbf488477d0dbc0b883eb06cb5d7320bac073 (patch) | |
tree | 618865f248912335ea996901485a0933d03fce27 /src | |
parent | bd7c9a2b4937d34f841ca7f8d228926d13546179 (diff) | |
download | emacs-499dbf488477d0dbc0b883eb06cb5d7320bac073.tar.gz |
* keyboard.c (read_key_sequence): Accept both strings and vectors
as bindings in function-key-map.
* keymap.c (Vfunction_key_map in syms_of_keymap): Doc fix.
* keyboard.c (Fsuspend_emacs): Pass selected_frame as the first
argument to change_frame_size, not 0. This function may be called
in an Emacs compiled with multi-frame support.
Diffstat (limited to 'src')
-rw-r--r-- | src/keyboard.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index e0a43095058..c0758af6ea2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4168,16 +4168,27 @@ read_key_sequence (keybuf, bufsize, prompt) function key map and it's a suffix of the current sequence (i.e. fkey_end == t), replace it with the binding and restart with fkey_start at the end. */ - if (XTYPE (fkey_next) == Lisp_Vector + if ((VECTORP (fkey_next) || STRINGP (fkey_next)) && fkey_end == t) { - t = fkey_start + XVECTOR (fkey_next)->size; + int len = Flength (fkey_next); + + t = fkey_start + len; if (t >= bufsize) error ("key sequence too long"); - bcopy (XVECTOR (fkey_next)->contents, - keybuf + fkey_start, - (t - fkey_start) * sizeof (keybuf[0])); + if (VECTORP (fkey_next)) + bcopy (XVECTOR (fkey_next)->contents, + keybuf + fkey_start, + (t - fkey_start) * sizeof (keybuf[0])); + else if (STRINGP (fkey_next)) + { + int i; + + for (i = 0; i < len; i++) + XFASTINT (keybuf[fkey_start + i]) = + XSTRING (fkey_next)->data[i]; + } mock_input = t; fkey_start = fkey_end = t; @@ -4585,7 +4596,7 @@ On such systems, Emacs starts a subshell instead of suspending.") with a window system; but suspend should be disabled in that case. */ get_frame_size (&width, &height); if (width != old_width || height != old_height) - change_frame_size (0, height, width, 0, 0); + change_frame_size (selected_frame, height, width, 0, 0); /* Run suspend-resume-hook. */ if (!NILP (Vrun_hooks)) |