]> git.eshelyaron.com Git - emacs.git/commitdiff
(store_in_keymap): Copy a cons only if car is a string.
authorRichard M. Stallman <rms@gnu.org>
Sun, 8 Jan 1995 20:24:36 +0000 (20:24 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 8 Jan 1995 20:24:36 +0000 (20:24 +0000)
src/keymap.c

index b6a15754b60b31ee0404cb11bfe06900614b6391..4b9e206bca3b47b6ce71805e639046b91e89cff1 100644 (file)
@@ -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))