About Lectures Research Software Blog
Musical Site
MySpace
Facebook

Moods Blog

Dojo Shin Kaï

RSS Feed
Thank you!

XHTML 1.0 conformant
CSS 2.0 conformant
Didier Verna's scientific blog: Lisp, Emacs, LaTeX and random stuff.

Tag - face property

Entries feed - Comments feed

Tuesday, December 27 2011

XEmacs now has a "foreback" face property

The "foreback" face property at workHere's another new face property in XEmacs. This one is probably not going to be used ever, but still it fixes one particular problem. Until now, XEmacs used the background and foreground colors to display a face background bitmap (as opposed to a regular pixmap). This basically rendered the text unreadable.

The new face property is called "foreback" (I'm running short of sensible property names these days). It's the "foreground of the background" if you will. When a face has a background bitmap, it uses the regular background color for bitmap's background, but the foreback color for the bitmap's foreground. See the attached screenshot for a concrete example of the problem it fixes.

The bitmap I used for this example is X11's xsnow bitmap. Nice Christmas XEmacs screenshot, isn't it? :-)

In order to set a face's foreback color, either use the Custom interface, or the set-face-foreback function.

Thursday, December 22 2011

XEmacs now has a "flush" face property

The "flush" face property at workI have just implemented a new face property in XEmacs 21.5, called "flush". When some text is displayed in a face which has this property set to t (it's a Boolean property), then the face extends until the right border of the window instead of just the end of the actual line of text. The effect is only visible if the face has a non-default background color or pixmap and gives the text segment the appearance of a block instead of being ragged right. In fact (if that rings a bell to you), this is the equivalent of the block value for the HTML display property.

See the attached screenshot for an example. In that particular case, the buffer displays an article in Gnus and the concerned face is mm-uu-extract. You can see two versions of the same buffer, with and without the property set. There are a number of situations in which setting a face to flush is nicer visually. Probably the most obvious case is that of text selection. Below is a list of faces that I'm currently setting to flush. I'll be updating this list as needed. In order to set a face to flush, either use the Custom interface or the set-face-flush-p function directly.

zmacs-region
diff-nonexistent-face
gnus-summary-cancelled[-face]
mm-uu-extract
mmm-default-submode-face
mmm-code-submode-face
French Flag English Flag
Copyright (C) 2008 -- 2013 Didier Verna didier@lrde.epita.fr