emacs-devel
[Top][All Lists]
Advanced

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

Re: "Invalid face reference" msg logged to *Messages* (but no error)


From: Eli Zaretskii
Subject: Re: "Invalid face reference" msg logged to *Messages* (but no error)
Date: Wed, 06 May 2009 21:38:51 +0300

> From: "Drew Adams" <address@hidden>
> Date: Tue, 5 May 2009 19:29:58 -0700
> Cc: address@hidden
> 
> I wonder too why such a thing is not handled as an error, or even as a message
> to the echo area, but just logged in *Messages*. Is it the case perhaps that 
> we
> never raise an error from the redisplay code?

In addition to everything others wrote about the reason(s), there's
one more: signaling an error itself triggers redisplay -- to display
the error message.  Now, if you do that because redisplay code itself
encountered a fatal error, you will almost certainly immediately
trigger the same problem again, because redisplay triggered by
signaling an error will want to redisplay the entire selected frame.
So you will have an endless loop of fatal errors and a stuck Emacs
that is only good to be killed.

That is why in the few situations where we need to report something
fatal from redisplay code, we display it somewhere, like in the mode
line, instead of signaling an error in the usual way.  See, for
example, what we do with invalid EOL type display in
decode_mode_spec_coding (on xdisp.c).  Less fatal errors simply go to
*Messages*.




reply via email to

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