for (i = 0; i < len; i++)
{
- args[i * 2] = Fsingle_key_description (XVECTOR (keys)->contents[i]);
+ args[i * 2] = Fsingle_key_description (XVECTOR (keys)->contents[i],
+ Qnil);
args[i * 2 + 1] = sep;
}
}
for (i = 0; i < len; i++)
{
- args[i * 2] = Fsingle_key_description (XCAR (keys));
+ args[i * 2] = Fsingle_key_description (XCAR (keys), Qnil);
args[i * 2 + 1] = sep;
keys = XCDR (keys);
}
/* This function cannot GC. */
-DEFUN ("single-key-description", Fsingle_key_description, Ssingle_key_description, 1, 1, 0,
+DEFUN ("single-key-description", Fsingle_key_description,
+ Ssingle_key_description, 1, 2, 0,
"Return a pretty description of command character KEY.\n\
-Control characters turn into C-whatever, etc.")
- (key)
- Lisp_Object key;
+Control characters turn into C-whatever, etc.\n\
+Optional argument NO-ANGLES non-nil means don't put angle brackets\n\
+around function keys and event symbols.")
+ (key, no_angles)
+ Lisp_Object key, no_angles;
{
if (CONSP (key) && lucid_event_type_list_p (key))
key = Fevent_convert_list (key);
}
else if (SYMBOLP (key)) /* Function key or event-symbol */
{
- char *buffer = (char *) alloca (STRING_BYTES (XSYMBOL (key)->name) + 5);
- sprintf (buffer, "<%s>", XSYMBOL (key)->name->data);
- return build_string (buffer);
+ if (NILP (no_angles))
+ {
+ char *buffer
+ = (char *) alloca (STRING_BYTES (XSYMBOL (key)->name) + 5);
+ sprintf (buffer, "<%s>", XSYMBOL (key)->name->data);
+ return build_string (buffer);
+ }
+ else
+ return Fsymbol_name (key);
}
else if (STRINGP (key)) /* Buffer names in the menubar. */
return Fcopy_sequence (key);
insert1 (elt_prefix);
/* THIS gets the string to describe the character EVENT. */
- insert1 (Fsingle_key_description (event));
+ insert1 (Fsingle_key_description (event, Qnil));
/* Print a description of the definition of this character.
elt_describer will take care of spacing out far enough
else if (CHAR_TABLE_P (vector))
{
if (complete_char)
- insert1 (Fsingle_key_description (make_number (character)));
+ insert1 (Fsingle_key_description (make_number (character), Qnil));
else
{
/* Print the information for this character set. */
}
else
{
- insert1 (Fsingle_key_description (make_number (character)));
+ insert1 (Fsingle_key_description (make_number (character), Qnil));
}
/* If we find a sub char-table within a char-table,
{
if (char_table_depth == 0)
{
- insert1 (Fsingle_key_description (make_number (i)));
+ insert1 (Fsingle_key_description (make_number (i), Qnil));
}
else if (complete_char)
{
}
else
{
- insert1 (Fsingle_key_description (make_number (i)));
+ insert1 (Fsingle_key_description (make_number (i), Qnil));
}
}