Mercurial > hg > xemacs-beta
comparison src/cmds.c @ 5861:c87b776ab0e1
Create a new error for when a char is needed but event-to-character gives nil
lisp/ChangeLog addition:
2015-03-14 Aidan Kehoe <kehoea@parhasard.net>
* cmdloop.el (no-character-typed):
New error, for those cases when a keystroke is to be treated as a
character but has no character equivalent.
* cmdloop.el (read-char-1): Use it.
* keymap.el (synthesize-keysym): Use it.
src/ChangeLog addition:
2015-03-14 Aidan Kehoe <kehoea@parhasard.net>
* general-slots.h (Qno_character_typed): New error symbol.
* event-stream.c (syms_of_event_stream): Define it.
New error, for those cases when a keystroke is to be treated as a
character in some context but has no character equivalent.
* cmds.c (Fself_insert_command):
Use it.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 14 Mar 2015 01:40:49 +0000 |
parents | c65b0329894b |
children |
comparison
equal
deleted
inserted
replaced
5860:916b48abd1c6 | 5861:c87b776ab0e1 |
---|---|
344 c = Vlast_command_char; | 344 c = Vlast_command_char; |
345 else | 345 else |
346 c = Fevent_to_character (Vlast_command_event, Qnil, Qnil, Qnil); | 346 c = Fevent_to_character (Vlast_command_event, Qnil, Qnil, Qnil); |
347 | 347 |
348 if (NILP (c)) | 348 if (NILP (c)) |
349 invalid_operation ( | 349 { |
350 "Last typed key has no character equivalent (that we know of)", | 350 Fsignal (Qno_character_typed, Fcopy_event (Vlast_command_event, Qnil)); |
351 Fcopy_event (Vlast_command_event, Qnil)); | 351 } |
352 | 352 |
353 CHECK_CHAR_COERCE_INT (c); | 353 CHECK_CHAR_COERCE_INT (c); |
354 | 354 |
355 ch = XCHAR (c); | 355 ch = XCHAR (c); |
356 | 356 |