[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Modules: should_quit vs. process_input in Emacs 27
From: |
Hans-Peter Deifel |
Subject: |
Modules: should_quit vs. process_input in Emacs 27 |
Date: |
Mon, 22 Jul 2019 23:25:33 +0200 |
User-agent: |
mu4e 1.2.0; emacs 27.0.50 |
Hello Emacs hackers,
I'm writing a dynamic module in C that includes a long-running
computation. It uses `should_quit' as per the documentation to check
from time to time if the user wants to quit, in which case the
computation is immediately aborted. This works great on Emacs 26.2, but
doesn't on master: The computation just keeps on computing, no matter
how often the user presses C-g.
The git log and the info manual in master mention the new environment
function `process_inputs' that should be used instead of `should_quit'.
This does indeed work, but now the module is no longer compatible with
Emacs 26.
What should module authors in this case do to keep their modules
compatible with older Emacs versions? Conditional compilation?
Also, what's the purpose of the current `should_quit' in master, if it
doesn't work for the above use-case any more. Why doesn't it simply
behave like the following?
process_input (env) == emacs_process_input_quit
Cheers,
HP
- Modules: should_quit vs. process_input in Emacs 27,
Hans-Peter Deifel <=