emacs-devel
[Top][All Lists]
Advanced

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

Re: A bug in tetris


From: Kim F. Storm
Subject: Re: A bug in tetris
Date: Tue, 21 Aug 2007 10:32:11 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     > Maybe the newlines in the gamegrid must be marked to not increase
>     > line height by its own:
>
>     >    (propertize "\n" 'line-height t)
>
>     Isn't it better to make that the default behaviour if a line
>     is not empty?
>
> Did we discuss this question when that feature was added?

I don't remember.

> Was there any particular reason to handle this the way we did?

I answered (vaguely) yesterday, but I now recall the reasoning
for not making it standard:

In most cases, I would assume that if you put a face
(with a smaller line height) on the text on a whole line, 
you also put that face on the newline if you want the whole
line to have the smaller line height.

If you leave the default face on the newline, you (probably)
want to have the default line spacing for the line even if the
text on the line is in a smaller face.

So this is the current default behaviour (as it was in 21.x)
-- which IMO is correct for normal use cases.

In the rare case where a line is in the default face, but only
contains (small height) images (e.g. in a game grid or a sliced image)
do you get into a case where the height of the newline may get into
the way -- that is why I made a special line-height=t property for the
newline to handle such unusual cases.

The insert-sliced-image function uses this property.

Game grid functions should do that too.

Conclusion: I think we should keep the current default.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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