mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-15 17:00:26 +00:00
(store_in_keymap): Copy a cons only if car is a string.
This commit is contained in:
parent
a0a7635faa
commit
dce4372a8e
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user