aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-07-18 06:25:09 +0000
committerJim Blandy1993-07-18 06:25:09 +0000
commitf5ea616372f7f15b402c8d13301cb8ea41d88be9 (patch)
treebc5f4352ca2e840c122aa98ff3d531276a297d24 /src
parent5256403ca5a77ed0b8254a8849a54a96da9710c4 (diff)
downloademacs-f5ea616372f7f15b402c8d13301cb8ea41d88be9.tar.gz
emacs-f5ea616372f7f15b402c8d13301cb8ea41d88be9.zip
* 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.c23
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)
4168 function key map and it's a suffix of the current 4168 function key map and it's a suffix of the current
4169 sequence (i.e. fkey_end == t), replace it with 4169 sequence (i.e. fkey_end == t), replace it with
4170 the binding and restart with fkey_start at the end. */ 4170 the binding and restart with fkey_start at the end. */
4171 if (XTYPE (fkey_next) == Lisp_Vector 4171 if ((VECTORP (fkey_next) || STRINGP (fkey_next))
4172 && fkey_end == t) 4172 && fkey_end == t)
4173 { 4173 {
4174 t = fkey_start + XVECTOR (fkey_next)->size; 4174 int len = Flength (fkey_next);
4175
4176 t = fkey_start + len;
4175 if (t >= bufsize) 4177 if (t >= bufsize)
4176 error ("key sequence too long"); 4178 error ("key sequence too long");
4177 4179
4178 bcopy (XVECTOR (fkey_next)->contents, 4180 if (VECTORP (fkey_next))
4179 keybuf + fkey_start, 4181 bcopy (XVECTOR (fkey_next)->contents,
4180 (t - fkey_start) * sizeof (keybuf[0])); 4182 keybuf + fkey_start,
4183 (t - fkey_start) * sizeof (keybuf[0]));
4184 else if (STRINGP (fkey_next))
4185 {
4186 int i;
4187
4188 for (i = 0; i < len; i++)
4189 XFASTINT (keybuf[fkey_start + i]) =
4190 XSTRING (fkey_next)->data[i];
4191 }
4181 4192
4182 mock_input = t; 4193 mock_input = t;
4183 fkey_start = fkey_end = t; 4194 fkey_start = fkey_end = t;
@@ -4585,7 +4596,7 @@ On such systems, Emacs starts a subshell instead of suspending.")
4585 with a window system; but suspend should be disabled in that case. */ 4596 with a window system; but suspend should be disabled in that case. */
4586 get_frame_size (&width, &height); 4597 get_frame_size (&width, &height);
4587 if (width != old_width || height != old_height) 4598 if (width != old_width || height != old_height)
4588 change_frame_size (0, height, width, 0, 0); 4599 change_frame_size (selected_frame, height, width, 0, 0);
4589 4600
4590 /* Run suspend-resume-hook. */ 4601 /* Run suspend-resume-hook. */
4591 if (!NILP (Vrun_hooks)) 4602 if (!NILP (Vrun_hooks))