emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Font-lock.el uses strange value for min-colors (Was x-display-color-


From: Jan D.
Subject: Re: Font-lock.el uses strange value for min-colors (Was x-display-color-cells returns wrong number)
Date: Sun, 29 Feb 2004 22:58:52 +0100

A better way to find out the number of colors that can be displayed
at the same time is (1 << DisplayPlanes(...)).  There is no need to
distinguish between visual types if number of colors is calculated this
way.

I don't know enough about X to even parse the last sentence, but I do
think display-color-cells should return the number of distinct colors
Emacs can use.  It sounds like display-color-cells does that on every
platform except X (MS-Windows, MS-DOS, Unix tty, don't know about the
Mac).  That function is advertised as one that returns the number of
distinct colors, so IMHO it had better do what we say it does.

The number of planes it the same as the number of bits in a pixel,
i.e. 8 for 256 color displays, 16 for 65536 colors, and so on.

So on X the number of colors Emacs can use are
  (ash 1 (x-display-planes))

I can do the change, but I don't know if x-display-color-cells or
display-color-cells should change yet.  I'll have to check where
else x-display-color-cells is used.  I will do it within a day or so.

        Jan D.






reply via email to

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