From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>
Cc: 4835@emacsbugs.donarmstrong.com
Subject: bug#4835: 23.1; Improper `Invalid face reference' messages. Performance degraded.
Date: Sat, 31 Oct 2009 12:09:37 -0700 [thread overview]
Message-ID: <C2D26CC220BF45AAAA09DB25F28A5FA7@us.oracle.com> (raw)
In-Reply-To: <87ws2bfkyt.fsf@stupidchicken.com>
> > 2. The code I had seems nevertheless to "work", in the sense that it
> > does what I expect (highlights the column). Except that it
> > logs those messages and the performance is terrible.
>
> I suspect this is because parts of font-lock do this:
> (if (stringp matcher)
> (re-search-forward matcher end t)
> (funcall matcher end)))
>
> while other parts do this:
> (font-lock-eval-keywords (if (fboundp keywords)
> (funcall keywords)
> (eval keywords)))))
>
> If `matcher' is a lambda expression, the first will work as expected,
> because you can pass a lambda to funcall. But the second will do the
> wrong thing.
>
> We should probably fix the code to check for and disallow lambda
> expressions (and the docs), assuming not too much external code is
> relying on the unintended behavior.
This part of the thread is only tangentially related to the bug report, but
anyway:
Why is it necessary to restrict the function to a symbol - why disallow lambda
forms? IOW, why can't we use (functionp keywords) instead of (fboundp keywords)?
After all, we're just calling `funcall', and all `funcall' requires of its
function arg is that it be `functionp'. Is there a real reason for the current
restriction to symbols?
Besides, as I noted in a previous mail, the font-lock code itself apparently
uses a lambda form in this way.
Just asking. I don't claim to understand the font-lock code.
next prev parent reply other threads:[~2009-10-31 19:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-31 18:59 bug#4835: 23.1; Improper `Invalid face reference' messages. Performance degraded Chong Yidong
2009-10-31 19:09 ` Drew Adams [this message]
2009-10-31 19:37 ` Chong Yidong
2009-10-31 19:51 ` Drew Adams
2009-10-31 20:57 ` Chong Yidong
2009-10-31 21:10 ` Drew Adams
2009-10-31 22:05 ` Chong Yidong
2009-10-31 22:40 ` Drew Adams
2009-10-31 23:42 ` Chong Yidong
2009-11-01 0:04 ` Drew Adams
2009-11-09 23:44 ` Drew Adams
2009-12-09 18:23 ` Drew Adams
2009-12-09 23:12 ` bojohan+news
2009-12-10 17:36 ` Drew Adams
2009-12-11 4:49 ` Kevin Rodgers
2009-12-12 4:48 ` Stefan Monnier
2016-04-27 20:20 ` Lars Ingebrigtsen
2016-04-27 21:19 ` Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2009-10-30 22:48 Drew Adams
2009-10-31 3:26 ` Stefan Monnier
2009-10-31 7:41 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2D26CC220BF45AAAA09DB25F28A5FA7@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=4835@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.