emacs-devel
[Top][All Lists]
Advanced

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

[Feature request] face property `raise'


From: Wedler, Christoph
Subject: [Feature request] face property `raise'
Date: Mon, 7 Apr 2003 19:33:20 +0200

I would like to see a face property `raise' with the same semantics as
the display property `raise'.  At least, I would like to see that such a
property is considered a good idea.

A face in Emacs is a named collection of graphical attributes (see
<info:(elisp)Faces>).

There are a couple of advantages of faces versus display properties
(`image' and STRING don't really relate well to the other display
properties), I'll demonstrate them with an example `subscript-face':

 1. With faces, you have a nice mechanism which abstracts the logical
    property "being a subscript" from some physical properties (e.g.,
    "baseline raised by 0.3ex", "font-size 80%", ...)

 2. Users can use the usual way to customize things.

 3. There is a standard mechanism to "merge" faces.  Packagages which
    use text properties have to define their own merging code.

 4. Since faces are named, packages can easily remove the faces from a
    text region.  If a package A uses text properties, it's much more
    difficult just to remove the properties where A is the owner.

 5. There is a package which can set faces according to the syntactical
    structure of the code/text: font-lock.  We could easily define
    font-lock keywords for super- and subscripts.

    (I know that the font-lock.el in the Emacs development version has
    the variable `font-lock-extra-managed-props' which you might think
    might be used to set display properties, but it doesn't help
    too much due to 3 and 4 above.)

- Christoph




reply via email to

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