aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-01-08 20:24:36 +0000
committerRichard M. Stallman1995-01-08 20:24:36 +0000
commitdce4372a8e654011b104f524775b52377713a5a3 (patch)
tree734bea69a5d00e1c8bbace29c5f3147f8d9a608d /src/keymap.c
parenta0a7635faa584d7ceb20c0b05d23bf09da2e54a4 (diff)
downloademacs-dce4372a8e654011b104f524775b52377713a5a3.tar.gz
emacs-dce4372a8e654011b104f524775b52377713a5a3.zip
(store_in_keymap): Copy a cons only if car is a string.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c
index b6a15754b60..4b9e206bca3 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -395,9 +395,10 @@ store_in_keymap (keymap, idx, def)
395 register Lisp_Object idx; 395 register Lisp_Object idx;
396 register Lisp_Object def; 396 register Lisp_Object def;
397{ 397{
398 /* If we are preparing to dump, and DEF might be pure, 398 /* If we are preparing to dump, and DEF is a menu element
399 copy it to ensure it is not pure. */ 399 with a menu item string, copy it to ensure it is not pure. */
400 if (!NILP (Vpurify_flag) && CONSP (def)) 400 if (!NILP (Vpurify_flag) && CONSP (def)
401 && STRINGP (XCONS (def)->car))
401 def = Fcons (XCONS (def)->car, XCONS (def)->cdr); 402 def = Fcons (XCONS (def)->car, XCONS (def)->cdr);
402 403
403 if (!CONSP (keymap) || ! EQ (XCONS (keymap)->car, Qkeymap)) 404 if (!CONSP (keymap) || ! EQ (XCONS (keymap)->car, Qkeymap))