diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-01-08 20:24:36 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-01-08 20:24:36 +0000 |
commit | 35e766b27ed16ec375989238eb9fffddcf6f73e8 (patch) | |
tree | 24e2bdd7339ed0a27a3c33af213f50850254a7e2 /src/keymap.c | |
parent | 6371b5c81c8ea331013ecbbafac2cb4e5d88618c (diff) | |
download | emacs-35e766b27ed16ec375989238eb9fffddcf6f73e8.tar.gz |
(store_in_keymap): Copy a cons only if car is a string.
Diffstat (limited to 'src/keymap.c')
-rw-r--r-- | src/keymap.c | 7 |
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) 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)) |