Cancelable sit-for wrapper for a long-running Emacs Lisp polling loop
I am writing an Emacs Lisp polling loop that waits between iterations using sit-for , and I want the wait to be interruptible in two ways: by the user pressing C-g , and by an external condition (a process sentinel setting a flag) without relying on keyboard input. My understanding is that sit-for returns t when input arrives and nil on timeout, and that C-g