[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-trunk-diffs] Changes to emacs/src/sysdep.c
From: |
Juri Linkov |
Subject: |
Re: [Emacs-trunk-diffs] Changes to emacs/src/sysdep.c |
Date: |
Sun, 05 Dec 2004 22:23:23 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Stefan <address@hidden> writes:
>> What did you wish to do using emergency escape under a window system?
>
> Get out of a infinite elisp loop executed while inhibit-quit is non-nil
> (e.g. an infinite loop in a post-command-hook or a timer).
I don't quite understand why it is assumed that everything run by
a post-command-hook or a timer is a critical code not allowed to be
interrupted with C-g? One of the timers where such assumption has
a negative effect is the isearch lazy highlighting timer which often
enters into a very deep loop (several minutes and more) trying to
fontify regexps with nested repetition constructs, and which is not
interruptible with C-g.
Surely, it is possible to enclose the whole `isearch-lazy-highlight-update'
function in `with-local-quit' block, if the assumption that timers should
be non-interruptible by default is somehow justified.
> Yes, I can kill the Emacs process, but it's a real pity to have to do that
> when there's nothing really wrong with it.
> Of course, all those cases are bugs we should fix, but they do happen,
> sometimes while writing/testing/debugging code.
Is it a bug that regex.c can't detect long or infinite loops?
--
Juri Linkov
http://www.jurta.org/emacs/