From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.devel Subject: Re: [patch] XPM in gamegrid.el Date: Wed, 03 Jul 2002 14:39:22 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200207021946.g62Jkd802100@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1025695249 7256 127.0.0.1 (3 Jul 2002 11:20:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2002 11:20:49 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17PiBk-0001sv-00 for ; Wed, 03 Jul 2002 13:20:48 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17PiHE-0007Lu-00 for ; Wed, 03 Jul 2002 13:26:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17PiC5-0000gN-00; Wed, 03 Jul 2002 07:21:09 -0400 Original-Received: from dialin-145-254-208-096.arcor-ip.net ([145.254.208.96] helo=localhost.localdomain) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17Pi9w-0000WW-00; Wed, 03 Jul 2002 07:18:57 -0400 Original-Received: (from egoge@localhost) by localhost.localdomain (8.11.4/8.11.4) id g63CdMq15185; Wed, 3 Jul 2002 14:39:22 +0200 X-Authentication-Warning: localhost.localdomain: egoge set sender to epameinondas@gmx.de using -f Original-To: rms@gnu.org In-Reply-To: <200207021946.g62Jkd802100@aztec.santafe.edu> (Richard Stallman's message of "Tue, 2 Jul 2002 13:46:39 -0600 (MDT)") X-Operating-System: Linux from Scratch X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& Original-Lines: 48 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu) X-MIME-Autoconverted: from 8bit to quoted-printable by localhost.localdomain id g63CdMq15185 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5396 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5396 Richard Stallman 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 defa= ult > + ;; 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 --=20 Oliver Scholz 15 Messidor an 210 de la R=E9volution Taunusstr. 25 Libert=E9, Egalit=E9, Fraternit=E9! 60329 Frankfurt a. M. Tel. (069) 97 40 99 42