[Top][All Lists]

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

bug#5683: 23.1.93; list-colors-display doesn't show all colors

From: Markus Prepens
Subject: bug#5683: 23.1.93; list-colors-display doesn't show all colors
Date: Sat, 06 Mar 2010 23:07:19 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv: Gecko/20100227 Thunderbird/3.0.3

When I evaluate (defvar my-x-colors (ns-list-colors)) the complete color list is put to my-x-colors.

I think your impression is right: The code is correct, but the calling order during startup might be the problem. Maybe this is a hint:

Step 1: Startup Emacs with the -Q switch
Step 2: Enter M-: (setq x-colors (ns-list-colors))
Step 3: Enter M-x list-colors-display and the complete list of all colors appears in the *Colors* buffer.

Without step 1 and 2 the *Colors* buffer shows only 37 colors.

I make further investigations, what is going on.

Any hints are welcome ...


On 06/03/2010 10:01, Eli Zaretskii wrote:
[Please don't drop address@hidden from the list of addressees,
so that the history of this bug is archived on the bug tracker, and
also so others could chime in to this discussion.]

Date: Fri, 05 Mar 2010 22:57:19 +0100
From: Markus Prepens<address@hidden>

Function defined-colors seems to cause the trouble.  I stepped down the
code to xw-defined-colors in file ns-win.el. It uses the list x-colors.
It contains only 42 colors.

x-colors is initialized with the return value of ns-list-colors:

(defvar x-colors (ns-list-colors)

What I am wondering about is that ns-list-colors returns a correct list
of 794 colors.

What is wrong with the assignment of (ns-list-colors) to x-colors?

Nothing's wrong.  I suspect that some code modifies x-colors after it
is assigned.  Can you see if evaluating the following form

   (defvar my-x-colors (ns-list-colors))

puts the full 794-color list in my-x-colors?  (To evaluate the
expression, put the cursor immediately after the right parenthesis and
type "C-x C-e".)

reply via email to

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