unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: RE: "Invalid face reference" msg logged to *Messages* (but no error)
Date: Tue, 5 May 2009 19:29:58 -0700	[thread overview]
Message-ID: <000d01c9cdf2$8d7e1580$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <jwvskjjm3c6.fsf-monnier+emacs@gnu.org>

> > (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	other threads:[~2009-05-06  2:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 18:54 "Invalid face reference" msg logged to *Messages* (but no error) Drew Adams
2009-05-06  0:12 ` Drew Adams
2009-05-06  1:25   ` Stefan Monnier
2009-05-06  2:29     ` Drew Adams [this message]
2009-05-06  3:01       ` Miles Bader
2009-05-06  3:26       ` Stefan Monnier
2009-05-06  5:54         ` Drew Adams
2009-05-06 18:38       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000d01c9cdf2$8d7e1580$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).