Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
891eb3fe
Commit
891eb3fe
authored
Apr 16, 1995
by
Richard M. Stallman
Browse files
(x-defined-colors): Take frame as optional arg.
Check whether colors are really supported on the display in use.
parent
7c49006b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
lisp/term/x-win.el
lisp/term/x-win.el
+7
-4
No files found.
lisp/term/x-win.el
View file @
891eb3fe
...
...
@@ -490,17 +490,20 @@ This returns ARGS with the arguments that have been processed removed."
"Yellow"
"green yellow"
"GreenYellow"
)
"The full list of X colors from the rgb.text file."
)
"The full list of X colors from the
`
rgb.text
'
file."
)
(
defun
x-defined-colors
()
"Return a list of colors supported by the current X-Display."
(
defun
x-defined-colors
(
&optional
frame
)
"Return a list of colors supported for a particular frame.
The argument FRAME specifies which frame to try.
The value may be different for frames on different X displays."
(
or
frame
(
setq
frame
(
selected-frame
)))
(
let
((
all-colors
x-colors
)
(
this-color
nil
)
(
defined-colors
nil
))
(
while
all-colors
(
setq
this-color
(
car
all-colors
)
all-colors
(
cdr
all-colors
))
(
and
(
x
-color-
defined-p
this-color
)
(
and
(
face
-color-
supported-p
frame
this-color
t
)
(
setq
defined-colors
(
cons
this-color
defined-colors
))))
defined-colors
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment