changeset 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 5e8b43cd8e96
children d74ab0c19706
files src/keymap.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
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))