bug#81506: [PATCH] Extend w32 window events to expose IME composition string interface
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
>> + case WM_IME_COMPOSITION:
>> + {
>> + int len = (int) msg.msg.lParam;
>> + char *buf = (char *) msg.msg.wParam;
>> + Lisp_Object str = make_string_from_utf8 (buf, len);
>> + CALLN (Frun_hook_with_args, Qw32_ime_composition_hook, str);
>
> Can't say I like calling Lisp from inside read_socket_hook. Stefan,
> is that safe enough?
IIRC `read_socket_hook` is run "asynchronously" from things like
`maybe_quit` so it's not allowed to run ELisp code. Instead, it needs
to stash data somewhere (typically the input event queue) for later
synchronous processing from the command loop (or the
wait_reading_process_output loop).
=== Stefan