Commit 49daa5b1 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fset_keymap_parent, store_in_keymap): Use CHECK_IMPURE.

(Flookup_key): Doc fix.
(syms_of_keymap) <function-key-map>: Doc fix.
parent d4c6530f
...@@ -396,6 +396,7 @@ Return PARENT. PARENT should be nil or another keymap. */) ...@@ -396,6 +396,7 @@ Return PARENT. PARENT should be nil or another keymap. */)
if (EQ (XCDR (prev), parent)) if (EQ (XCDR (prev), parent))
RETURN_UNGCPRO (parent); RETURN_UNGCPRO (parent);
CHECK_IMPURE (prev);
XSETCDR (prev, parent); XSETCDR (prev, parent);
break; break;
} }
...@@ -913,6 +914,7 @@ store_in_keymap (keymap, idx, def) ...@@ -913,6 +914,7 @@ store_in_keymap (keymap, idx, def)
{ {
if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt)) if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt))
{ {
CHECK_IMPURE (elt);
ASET (elt, XFASTINT (idx), def); ASET (elt, XFASTINT (idx), def);
return def; return def;
} }
...@@ -938,6 +940,7 @@ store_in_keymap (keymap, idx, def) ...@@ -938,6 +940,7 @@ store_in_keymap (keymap, idx, def)
{ {
if (EQ (idx, XCAR (elt))) if (EQ (idx, XCAR (elt)))
{ {
CHECK_IMPURE (elt);
XSETCDR (elt, def); XSETCDR (elt, def);
return def; return def;
} }
...@@ -955,6 +958,7 @@ store_in_keymap (keymap, idx, def) ...@@ -955,6 +958,7 @@ store_in_keymap (keymap, idx, def)
keymap_end: keymap_end:
/* We have scanned the entire keymap, and not found a binding for /* We have scanned the entire keymap, and not found a binding for
IDX. Let's add one. */ IDX. Let's add one. */
CHECK_IMPURE (insertion_point);
XSETCDR (insertion_point, XSETCDR (insertion_point,
Fcons (Fcons (idx, def), XCDR (insertion_point))); Fcons (Fcons (idx, def), XCDR (insertion_point)));
} }
...@@ -1217,7 +1221,7 @@ A number as value means KEY is "too long"; ...@@ -1217,7 +1221,7 @@ A number as value means KEY is "too long";
that is, characters or symbols in it except for the last one that is, characters or symbols in it except for the last one
fail to be a valid sequence of prefix characters in KEYMAP. fail to be a valid sequence of prefix characters in KEYMAP.
The number is how many characters at the front of KEY The number is how many characters at the front of KEY
it takes to reach a non-prefix command. it takes to reach a non-prefix key.
Normally, `lookup-key' ignores bindings for t, which act as default Normally, `lookup-key' ignores bindings for t, which act as default
bindings, used when nothing else in the keymap applies; this makes it bindings, used when nothing else in the keymap applies; this makes it
...@@ -3836,9 +3840,9 @@ the same way. The "active" keymaps in each alist are used before ...@@ -3836,9 +3840,9 @@ the same way. The "active" keymaps in each alist are used before
DEFVAR_LISP ("function-key-map", &Vfunction_key_map, DEFVAR_LISP ("function-key-map", &Vfunction_key_map,
doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. doc: /* Keymap that translates key sequences to key sequences during input.
This allows Emacs to recognize function keys sent from ASCII This is used mainly for mapping ASCII function key sequences into
terminals at any point in a key sequence. real Emacs function key events (symbols).
The `read-key-sequence' function replaces any subsequence bound by The `read-key-sequence' function replaces any subsequence bound by
`function-key-map' with its binding. More precisely, when the active `function-key-map' with its binding. More precisely, when the active
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment