diff options
| author | Karl Heuer | 1994-11-18 05:29:08 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-11-18 05:29:08 +0000 |
| commit | e958fd9aca5fcf723f3552b109467c07a7f02649 (patch) | |
| tree | fa46e7fd0364c619e0ad5d633c2d1f4ebb099bf1 /src | |
| parent | 9e539a3cc3a9d0a7cebb310cefdb01af8fb334a2 (diff) | |
| download | emacs-e958fd9aca5fcf723f3552b109467c07a7f02649.tar.gz emacs-e958fd9aca5fcf723f3552b109467c07a7f02649.zip | |
(Fsingle_key_description): Use type test macros.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keymap.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/keymap.c b/src/keymap.c index 3ed2a9f416a..66f05a53135 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1494,22 +1494,17 @@ Control characters turn into C-whatever, etc.") | |||
| 1494 | 1494 | ||
| 1495 | key = EVENT_HEAD (key); | 1495 | key = EVENT_HEAD (key); |
| 1496 | 1496 | ||
| 1497 | switch (XTYPE (key)) | 1497 | if (INTEGERP (key)) /* Normal character */ |
| 1498 | { | 1498 | { |
| 1499 | case Lisp_Int: /* Normal character */ | ||
| 1500 | *push_key_description (XUINT (key), tem) = 0; | 1499 | *push_key_description (XUINT (key), tem) = 0; |
| 1501 | return build_string (tem); | 1500 | return build_string (tem); |
| 1502 | |||
| 1503 | case Lisp_Symbol: /* Function key or event-symbol */ | ||
| 1504 | return Fsymbol_name (key); | ||
| 1505 | |||
| 1506 | /* Buffer names in the menubar can trigger this. */ | ||
| 1507 | case Lisp_String: | ||
| 1508 | return Fcopy_sequence (key); | ||
| 1509 | |||
| 1510 | default: | ||
| 1511 | error ("KEY must be an integer, cons, symbol, or string"); | ||
| 1512 | } | 1501 | } |
| 1502 | else if (SYMBOLP (key)) /* Function key or event-symbol */ | ||
| 1503 | return Fsymbol_name (key); | ||
| 1504 | else if (STRINGP (key)) /* Buffer names in the menubar. */ | ||
| 1505 | return Fcopy_sequence (key); | ||
| 1506 | else | ||
| 1507 | error ("KEY must be an integer, cons, symbol, or string"); | ||
| 1513 | } | 1508 | } |
| 1514 | 1509 | ||
| 1515 | char * | 1510 | char * |