GNU bug report logs - #4835
something about message-log-max? - see msg#95

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 30 Oct 2009 22:55:05 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Chong Yidong'" <cyd <at> stupidchicken.com>
Cc: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>,
        <4835 <at> debbugs.gnu.org>
Subject: bug#4835: 23.1; Improper `Invalid face reference' messages. Performance degraded.
Date: Sat, 31 Oct 2009 12:09:37 -0700
> > 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.




This bug report was last modified 9 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.