From 49daa5b1626a2d1fb3327ba27349127dd04156b3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 11 Dec 2005 15:35:14 +0000 Subject: [PATCH] (Fset_keymap_parent, store_in_keymap): Use CHECK_IMPURE. (Flookup_key): Doc fix. (syms_of_keymap) : Doc fix. --- src/keymap.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index 0f17753f186..4583d3121df 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -396,6 +396,7 @@ Return PARENT. PARENT should be nil or another keymap. */) if (EQ (XCDR (prev), parent)) RETURN_UNGCPRO (parent); + CHECK_IMPURE (prev); XSETCDR (prev, parent); break; } @@ -913,6 +914,7 @@ store_in_keymap (keymap, idx, def) { if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt)) { + CHECK_IMPURE (elt); ASET (elt, XFASTINT (idx), def); return def; } @@ -938,6 +940,7 @@ store_in_keymap (keymap, idx, def) { if (EQ (idx, XCAR (elt))) { + CHECK_IMPURE (elt); XSETCDR (elt, def); return def; } @@ -955,6 +958,7 @@ store_in_keymap (keymap, idx, def) keymap_end: /* We have scanned the entire keymap, and not found a binding for IDX. Let's add one. */ + CHECK_IMPURE (insertion_point); XSETCDR (insertion_point, Fcons (Fcons (idx, def), XCDR (insertion_point))); } @@ -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 fail to be a valid sequence of prefix characters in KEYMAP. 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 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 DEFVAR_LISP ("function-key-map", &Vfunction_key_map, - doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. -This allows Emacs to recognize function keys sent from ASCII -terminals at any point in a key sequence. + doc: /* Keymap that translates key sequences to key sequences during input. +This is used mainly for mapping ASCII function key sequences into +real Emacs function key events (symbols). The `read-key-sequence' function replaces any subsequence bound by `function-key-map' with its binding. More precisely, when the active -- 2.39.5