From: Richard M. Stallman Date: Sun, 8 Jan 1995 20:24:36 +0000 (+0000) Subject: (store_in_keymap): Copy a cons only if car is a string. X-Git-Tag: emacs-19.34~5491 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dce4372a8e654011b104f524775b52377713a5a3;p=emacs.git (store_in_keymap): Copy a cons only if car is a string. --- 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) register Lisp_Object idx; register Lisp_Object def; { - /* If we are preparing to dump, and DEF might be pure, - copy it to ensure it is not pure. */ - if (!NILP (Vpurify_flag) && CONSP (def)) + /* If we are preparing to dump, and DEF is a menu element + with a menu item string, copy it to ensure it is not pure. */ + if (!NILP (Vpurify_flag) && CONSP (def) + && STRINGP (XCONS (def)->car)) def = Fcons (XCONS (def)->car, XCONS (def)->cdr); if (!CONSP (keymap) || ! EQ (XCONS (keymap)->car, Qkeymap))