emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signal `quit' in a `font-lock-fontify-region-function'


From: Stefan Monnier
Subject: Re: Signal `quit' in a `font-lock-fontify-region-function'
Date: Tue, 28 May 2019 14:24:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I think a larger (apparent) problem is to let user know what's going on.
> Naively issued messages would get overridden with "Quit" in the echo
> area, because the natural response (at least mine) in such situation is
> to mash C-g continuosly, not do it accurately and watch if there is any
> change. And those "excessive" C-g would result in "Quit" message.
> This is also part of the reason I haven't continued with implementing
> this just for my mode, but rather feel it would be better as a general
> Emacs feature.

Right, here's how I could imagine a "desirable" behavior:

- everytime some operation may block Emacs, it should "register"
  somewhere (probably some let-binding of a global var is all it takes).
- After hitting C-g, a timer is started.
- If this timer is reached before the C-g has had to chance to be
  processed, emit a message in the echo area explaining what Emacs is
  currently doing (based on the "registered" information above).
- when we reach the Nth C-g in a row within the same "registered"
  operation, we abort the operation (e.g. by calling an ad-hoc
  function provided while "registering").


-- Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]