"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
A blast from the past (March 2013).
Michael Sperber writes:
> ;;;###autoload
> (defmacro while-no-input (&rest body)
> "Execute BODY only as long as there's no pending input.
> If input arrives, that ends the execution of BODY,
> and `while-no-input' returns t. Quitting makes it return nil.
> If BODY finishes, `while-no-input' returns whatever value BODY produced."
> (declare (debug t) (indent 0))
> (let ((catch-sym (make-symbol "input")))
> `(with-local-quit
> (catch ',catch-sym
> (let ((throw-on-input ',catch-sym))
> (or (input-pending-p)
> (progn ,@body)))))))
Does this actually work in XEmacs? AFAICS there's no symbol
`throw-on-input' in XEmacs 21.5. Nor, again AFAICS, is there anything
here that actually catches the `quit' signal.
You're, sorry about that. Now, my inclination is to merge it from GNU
Emacs. Would that be OK with you?
--
Regards,
Mike
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta