[Top][All Lists]

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

Re: [patch] XPM in gamegrid.el

From: Oliver Scholz
Subject: Re: [patch] XPM in gamegrid.el
Date: Wed, 03 Jul 2002 14:39:22 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

> A comment I saw raises a question:
>     +    ;; Adjust the height of the default face to the height of the
>     +    ;; images. Unlike XEmacs, Emacs doesn't allow to make the default
>     +    ;; face buffer-local; so we do this with an overlay.
> Why would it be useful to make the default face buffer-local
> rather than simply specifying a different face on the text?
> (such as with a text property)?

A different face is necessary when the images are smaller in height
than the default face. Otherwise there would be an ugly space between
lines of grids.

Packages (games) that use gamegrid.el are supposed to change the
buffer via the function `gamegrid-set-cell'. To use text properties
instead of an overlay wouldn't take more than a simple change to this
functions. I used an overlay mainly because I am not sure if all
existing games refrain from using a simple `insert' or `insert-char'
somewhere to put text into the buffer. This would not inherit the text
property then. I wanted to emulate the behaviour of XEmacs as close as
possible, since so far all XPM stuff in games was designed for
XEmacs. Do you think I should change this?

To have true buffer local faces would be nice. It is absolutely
possible that different heights are necessary for different games. I
emulated buffer local faces by creating faces whose name-symbols
contain the buffer name (gamegrid does already something similar for
the color-faces) and that are accessible via the buffer-local variable

BTW: I'd like to write a few comments and document strings and a
commentary section for gamegrid.el. After all it is a _library_ and I
don't think that it is good, if everyone who wants to use it has to
read the full source first. I'd like to have a few more games in Emacs
for the moments of rethinking and recreation while I am actually
working and writing in a different buffer. Of course, my English is
lousy, but it is probably better than nothing. Is this o.k. for you?

    -- Oliver

Oliver Scholz               15 Messidor an 210 de la Révolution
Taunusstr. 25               Liberté, Egalité, Fraternité!
60329 Frankfurt a. M.
Tel. (069) 97 40 99 42

reply via email to

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