[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font lock with functions
From: |
Adam Porter |
Subject: |
Re: font lock with functions |
Date: |
Tue, 31 Mar 2020 05:42:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
David Engster <address@hidden> writes:
> It is very easy during testing to completely hang your Emacs session
> if one of the font-lock functions hangs. One usually needs to kill
> Emacs in this case.
Often using "pkill -SIGUSR2 emacs" can help. If that works to interrupt
Emacs and display a backtrace, you can then switch to the buffer being
font-locked and disable the mode doing the font-locking (i.e. removing
the font-lock keywords). Then when you close the backtrace, Emacs
should not go back into the font-locking loop in your code. At least,
this usually worked for me when I was working on prism.el. Sometimes
some random mashing of C-g helps as well. And once in a while, running
"pkill -SIGUSR2 emacs" in a shell loop a few hundred times, while
randomly mashing C-g in Emacs, works as a last resort. :)
If even that doesn't help, then you may want to code in one Emacs
instance and test the code in another.
And, yes, Anders's font-lock packages are very helpful. I've catalogued
some of those and other tools here:
https://github.com/alphapapa/emacs-package-dev-handbook#highlighting--font-locking
- Re: emacs rendering comparisson between emacs23 and emacs26.3, (continued)
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Stefan Monnier, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/03/29
- emacs-tree-sitter and font-lock (was: emacs rendering comparisson between emacs23 and emacs26.3), Stefan Monnier, 2020/03/29
- Re: emacs-tree-sitter and font-lock, Dmitry Gutov, 2020/03/29
- font lock with functions (was: emacs rendering comparisson between emacs23 and emacs26.3), David Engster, 2020/03/31
- Re: font lock with functions,
Adam Porter <=
- Re: font lock with functions, Stefan Monnier, 2020/03/31
- Re: font lock with functions, Dmitry Gutov, 2020/03/31
- Re: font lock with functions, Stefan Monnier, 2020/03/31
- Re: font lock with functions, Dmitry Gutov, 2020/03/31
- Re: font lock with functions, Stephen Leake, 2020/03/31
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, 조성빈, 2020/03/29
- Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/03/29