diff src/keymap.c @ 10367:e1c7a3f0c15f

(store_in_keymap): Copy a cons only if car is a string.
author Richard M. Stallman <rms@gnu.org>
date Sun, 08 Jan 1995 20:24:36 +0000
parents ebb2a456a3e8
children 8cf015100d54
line wrap: on
line diff
--- a/src/keymap.c	Sun Jan 08 20:19:47 1995 +0000
+++ b/src/keymap.c	Sun Jan 08 20:24:36 1995 +0000
@@ -395,9 +395,10 @@
      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))