unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Oliver Scholz <epameinondas@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: [patch] XPM in gamegrid.el
Date: Wed, 03 Jul 2002 14:39:22 +0200	[thread overview]
Message-ID: <m3znx9bqin.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: <200207021946.g62Jkd802100@aztec.santafe.edu> (Richard Stallman's message of "Tue, 2 Jul 2002 13:46:39 -0600 (MDT)")

Richard Stallman <rms@gnu.org> 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
`gamegrid-face'.

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	other threads:[~2002-07-03 12:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-01 14:01 [patch] XPM in gamegrid.el Oliver Scholz
2002-07-02 19:46 ` Richard Stallman
2002-07-03 12:39   ` Oliver Scholz [this message]
2002-07-04 18:24     ` Richard Stallman
2002-07-04 19:10       ` Stefan Monnier
2002-07-04 23:29         ` Miles Bader
2002-07-05 10:59         ` Per Abrahamsen
2002-07-06 10:01           ` Richard Stallman
2002-07-05 22:05         ` Richard Stallman
2002-07-05 23:30           ` Miles Bader
2002-07-06  3:49             ` Miles Bader
2002-07-06 23:32               ` Richard Stallman
2002-07-06 23:31             ` Richard Stallman
2002-07-08  1:28               ` Miles Bader
2002-07-09  1:44                 ` Richard Stallman
2002-07-09  3:36                   ` Miles Bader
2002-07-08  1:34               ` Miles Bader
2002-07-05  8:08       ` epameinondas
2002-07-05  8:50         ` John Paul Wallington
2002-07-05  8:51         ` Miles Bader
2002-07-05 11:32           ` Oliver Scholz
2002-07-04 18:24     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3znx9bqin.fsf@ID-87814.user.dfncis.de \
    --to=epameinondas@gmx.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).