[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock and shell scripts: Raises redisplay errors in highlight pa
From: |
T. V. Raman |
Subject: |
Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern: |
Date: |
Wed, 12 Jul 2006 21:08:19 -0700 |
Here are some more details on this problem.
The error is definitely being raised -- but also caught by the
condition-case handler in functions
font-lock-default-fontify-buffer and
font-lock-default-fontify-region.
The condition-case in those functions means that
toggle-debug-on-error does not give a backtrace alas.
But I am able to reliably trigger it as follows:
Open an empty file and put it in sh-mode.
Type:
#!/bin/bash
export a=1
You see the error immediately after you hit the ' ' after the
keyword "export".
The error being raised (from searching the font-lock.el sources,
it's one of the font-lock-apply-* functions)
Error during redisplay: (error No match 6 in highlight (6
font-lock-builtin-face))
So two questions:
1) Might be marginally benefitial even for the mainstream emacs user
to not have these errors raised and handled --
--- what variables in my sh-mode/font-lock environment should I
look at to chase down and fix the cause of the error in the first
place? (Note that I'm running with font-lock turned on at the
highest level).
2) And I'll possibly file this as a separate bug report once
Stephane elaborates on what he said toward the end of his
note:
How can I tell programmatically at run time if an error that is
raised has a handler somewhere above in the call stack waiting to
handle it?
If I had (2), then my advice on error could be smart in the
following way:
When (error ...) is called:
Before-Advice:
A) Check if there is a handler waiting to catch the error.
B) If yes, do nothing;
C) Else give the user auditory feedback.
I could achieve an equivalent effect if I knew how to check the
following in elisp:
Check if an error has "bubbled" all the way up the call stack.
Note that I have to advice error in Emacspeak because too many
useful Emacs packages use (error ...) to signal useful
information ---as an example, VM (the mail reader I use)
uses error to signal end of folder.
would be nice if
>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:
>> One possibility is that I'm noticing these errors when
>> others dont because I advice 'error in emacspeak to get
>> auditory alerts for errors. Since 'error does not return,
>> this has to be a before advice. A side-consequence of
>> this is that errors that are later by an error-handler
>> further up the call stack end up still getting signaled
>> auditorally.
Stefan>
Stefan> Please post a feature request with M-x
Stefan> report-emacs-bug: it should be possible to customize
Stefan> the top-level handling of errors (currently hardcoded
Stefan> in cmd_error_internal).
Stefan>
Stefan>
Stefan> Stefan
Thanks,
--Raman
--
Best Regards,
--raman
Email: address@hidden
WWW: http://emacspeak.sf.net/raman/
AIM: emacspeak GTalk: address@hidden
PGP: http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman
IRC: irc://irc.freenode.net/#emacs
- font-lock and shell scripts: Raises redisplay errors in highlight pattern:, T. V. Raman, 2006/07/05
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, Romain Francoise, 2006/07/06
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, Kim F. Storm, 2006/07/06
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, T. V. Raman, 2006/07/07
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, Richard Stallman, 2006/07/14
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, T. V. Raman, 2006/07/14
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, David Kastrup, 2006/07/14
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, Chong Yidong, 2006/07/14
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, T. V. Raman, 2006/07/14
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, Richard Stallman, 2006/07/15
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, T. V. Raman, 2006/07/15
- Re: font-lock and shell scripts: Raises redisplay errors in highlight pattern:, Richard Stallman, 2006/07/16