Mercurial > emacs
changeset 10008:b83150a8020d
(Fsingle_key_description): Use type test macros.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 18 Nov 1994 05:29:08 +0000 |
parents | 10fc4417831d |
children | 82f3daf76995 |
files | src/keymap.c |
diffstat | 1 files changed, 7 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keymap.c Fri Nov 18 05:22:33 1994 +0000 +++ b/src/keymap.c Fri Nov 18 05:29:08 1994 +0000 @@ -1494,22 +1494,17 @@ key = EVENT_HEAD (key); - switch (XTYPE (key)) + if (INTEGERP (key)) /* Normal character */ { - case Lisp_Int: /* Normal character */ *push_key_description (XUINT (key), tem) = 0; return build_string (tem); - - case Lisp_Symbol: /* Function key or event-symbol */ - return Fsymbol_name (key); - - /* Buffer names in the menubar can trigger this. */ - case Lisp_String: - return Fcopy_sequence (key); - - default: - error ("KEY must be an integer, cons, symbol, or string"); } + else if (SYMBOLP (key)) /* Function key or event-symbol */ + return Fsymbol_name (key); + else if (STRINGP (key)) /* Buffer names in the menubar. */ + return Fcopy_sequence (key); + else + error ("KEY must be an integer, cons, symbol, or string"); } char *