[Top][All Lists]

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

RE: definition lines in Info - 1) link, 2) highlight

From: Drew Adams
Subject: RE: definition lines in Info - 1) link, 2) highlight
Date: Tue, 15 Aug 2006 07:57:46 -0700

        > I think it could be a lot simpler.  Just add a loop to
        > Info-fontify-node which would search for that regexp and
        > apply some faces to the parts that match.

        Introducing new faces is never simple.

    It doesn't need to use new faces.  Surely there is some existing
    font lock face that would be usable.

Faces are like global variables - user options. You wouldn't think of
"reusing" some user option that happened to have a default value of t or nil
or 100 that you were after, instead of defining a new user option that had
the same default value - because customizing one might not be appropriate
for the uses of the other. The same is true of faces.

People can, for instance, use a different background for special-display
buffers such as *Info*, and a face that is appropriate for
non-special-display buffers might not then be appropriate for *Info*. Even
an existing Info face might not be appropriate here, depending on how users
might have customized it.

How about waiting until after the release for this, and doing it right,
creating separate faces for this feature?

The other, related suggestion here was more important, and would wait until
after the release anyway (if implemented): link to the source code and
display the current value (for a variable).

BTW, I'm curious - why is introducing new faces not simple? Is it because of
trying to get the default value right for different types of display and
different background values? Perhaps there are some guidelines that might
apply here? I don't know; I'm just curious what the difficulty is.

As I say, better to do it right, after the release, than to do a hurried job
poorly now. But, if you do want to do it now, it might be better to define
new faces that might not have great default values for all contexts than it
would be to reuse existing faces. If you define new faces, even bad ones,
users can at least customize them independently. And users will provide
feedback to help you tweak the default values so they work well in all

reply via email to

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