summaryrefslogtreecommitdiff
path: root/lisp/play/gamegrid.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2002-02-06 11:34:07 +0000
committerEli Zaretskii <eliz@gnu.org>2002-02-06 11:34:07 +0000
commitc7e6cdba5ad5d22c994e1f098b05b82b611327dd (patch)
tree8093e1ea8af7af3e5340be25d709e281441b47c8 /lisp/play/gamegrid.el
parente9a0a549d0746024d5f68f9cb0b45b609a62b163 (diff)
downloademacs-c7e6cdba5ad5d22c994e1f098b05b82b611327dd.tar.gz
(gamegrid-display-type): Treat any
color-capable display as color-x, if display-color-p is fboundp. (gamegrid-make-color-x-face): Don't call gamegrid-color twice. (gamegrid-make-color-tty-face): Use the value of color, not the symbol itself. Don't call gamegrid-color.
Diffstat (limited to 'lisp/play/gamegrid.el')
-rw-r--r--lisp/play/gamegrid.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index 5fdd9bb607f..906ea61ae49 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -166,10 +166,10 @@ static char *noname[] = {
face))
(defun gamegrid-make-color-tty-face (color)
- (let* ((hex (gamegrid-color color 1.0))
- (name (intern (format "gamegrid-color-tty-face-%s" hex)))
+ (let* ((color-str (symbol-value color))
+ (name (intern (format "gamegrid-color-tty-face-%s" color-str)))
(face (make-face name)))
- (gamegrid-setup-face face color)
+ (gamegrid-setup-face face color-str)
face))
(defun gamegrid-make-grid-x-face ()
@@ -190,7 +190,7 @@ static char *noname[] = {
(let* ((hex (gamegrid-color color 1.0))
(name (intern (format "gamegrid-color-x-face-%s" hex)))
(face (make-face name)))
- (gamegrid-setup-face face (gamegrid-color color 1.0))
+ (gamegrid-setup-face face hex)
face))
(defun gamegrid-make-face (data-spec-list color-spec-list)
@@ -257,6 +257,8 @@ static char *noname[] = {
(let ((window-system-p
(or (and (fboundp 'console-on-window-system-p)
(console-on-window-system-p))
+ (and (fboundp 'display-color-p)
+ (display-color-p))
window-system)))
(cond ((and gamegrid-use-glyphs
window-system-p