[Top][All Lists]

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

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

From: Drew Adams
Subject: RE: "Invalid face reference" msg logged to *Messages* (but no error)
Date: Tue, 5 May 2009 19:29:58 -0700

> > (add-text-properties 99 111 (face (quote some-face)))
> This code isn't correct, because it calls `face' as a function.
> So I guess you mean
>    (add-text-properties 99 111 '(face (quote some-face)))

Yes, that was actually from the debugger, so it was after arg evaluation.

> in which case the fix is to use
>    (add-text-properties 99 111 '(face some-face))

Duh. Hard to believe I didn't notice that. Thanks for the extra eyeballs.

> > N is incremented thereafter, with seemingly each event.  My guess is
> > that it is redisplay that is logging/updating the message - 
> > it doesn't seem to be related to the code being evaluated.  The 
> > add-text-property call seems only to be what initiates it.
> Yes, the message comes from redisplay.

I had the same code in several places (different commands) actually, from
copy+pasting no doubt. What's odd it that it still worked. The only difference I
can see is the message logged to *Messages*. The face was added properly,
combined with other text properties properly when that was the case, etc. I
don't understand it, but that's the case.

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?

Anyway, thanks for clearing this up. 

reply via email to

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