[Top][All Lists]

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

RE: Question about font-lock-compile-keywords

From: Drew Adams
Subject: RE: Question about font-lock-compile-keywords
Date: Tue, 12 Sep 2006 08:36:21 -0700

        font-lock-compile-keywords added an optional arg for Emacs
        22. It looks, from a quick glance, as if a non-nil value
        for that arg gives behavior similar to what the function
        did in Emacs 21 and 20.

        Wouldn't it be better for the optional arg to be
        complemented, so that a value of nil gave (more or less)
        the pre-22 behavior? Wouldn't that make things easier for
        third-party libraries that call font-lock-compile-keywords
        (with no second arg)?

    That seems like a good idea in principle, but which behavior do real
    third-party libraries which use font-lock-compile-keywords actually
    want?  (Are there really any?)

I don't have any concrete info to help, here. I just thought it seemed a bit
backwards. More typically, optional args are added in such a way that the
nil value is more or less compatible with the previous version, without the
new arg (when feasible).

FWIW, this came up as I was trying to use, in Emacs 20, some Emacs 22 code
that called font-lock-remove-keywords. I first tried simply adding a
definition of that function, but things soon got more complex. It was in
exploring this that I discovered the new, backward-seeming arg to

reply via email to

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