if (this_shadowed)
{
SET_PT (PT - 1);
- static char const fmt[] = " (currently shadowed by `%s')";
- USE_SAFE_ALLOCA;
- char *buffer = SAFE_ALLOCA (sizeof fmt +
- SBYTES (SYMBOL_NAME (shadowed_by)));
- esprintf (buffer, fmt, SDATA (SYMBOL_NAME (shadowed_by)));
- insert_string (buffer);
- SAFE_FREE();
+ if (SYMBOLP (shadowed_by))
+ {
+ static char const fmt[] = " (currently shadowed by `%s')";
+ USE_SAFE_ALLOCA;
+ char *buffer =
+ SAFE_ALLOCA (sizeof fmt + SBYTES (SYMBOL_NAME (shadowed_by)));
+ esprintf (buffer, fmt, SDATA (SYMBOL_NAME (shadowed_by)));
+ insert_string (buffer);
+ SAFE_FREE();
+ }
+ else /* Could be a keymap, a lambda, or a keyboard macro. */
+ insert_string (" (currently shadowed)");
SET_PT (PT + 1);
}
}