aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2002-02-06 11:34:07 +0000
committerEli Zaretskii2002-02-06 11:34:07 +0000
commitc7e6cdba5ad5d22c994e1f098b05b82b611327dd (patch)
tree8093e1ea8af7af3e5340be25d709e281441b47c8
parente9a0a549d0746024d5f68f9cb0b45b609a62b163 (diff)
downloademacs-c7e6cdba5ad5d22c994e1f098b05b82b611327dd.tar.gz
emacs-c7e6cdba5ad5d22c994e1f098b05b82b611327dd.zip
(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.
-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[] = {
166 face)) 166 face))
167 167
168(defun gamegrid-make-color-tty-face (color) 168(defun gamegrid-make-color-tty-face (color)
169 (let* ((hex (gamegrid-color color 1.0)) 169 (let* ((color-str (symbol-value color))
170 (name (intern (format "gamegrid-color-tty-face-%s" hex))) 170 (name (intern (format "gamegrid-color-tty-face-%s" color-str)))
171 (face (make-face name))) 171 (face (make-face name)))
172 (gamegrid-setup-face face color) 172 (gamegrid-setup-face face color-str)
173 face)) 173 face))
174 174
175(defun gamegrid-make-grid-x-face () 175(defun gamegrid-make-grid-x-face ()
@@ -190,7 +190,7 @@ static char *noname[] = {
190 (let* ((hex (gamegrid-color color 1.0)) 190 (let* ((hex (gamegrid-color color 1.0))
191 (name (intern (format "gamegrid-color-x-face-%s" hex))) 191 (name (intern (format "gamegrid-color-x-face-%s" hex)))
192 (face (make-face name))) 192 (face (make-face name)))
193 (gamegrid-setup-face face (gamegrid-color color 1.0)) 193 (gamegrid-setup-face face hex)
194 face)) 194 face))
195 195
196(defun gamegrid-make-face (data-spec-list color-spec-list) 196(defun gamegrid-make-face (data-spec-list color-spec-list)
@@ -257,6 +257,8 @@ static char *noname[] = {
257 (let ((window-system-p 257 (let ((window-system-p
258 (or (and (fboundp 'console-on-window-system-p) 258 (or (and (fboundp 'console-on-window-system-p)
259 (console-on-window-system-p)) 259 (console-on-window-system-p))
260 (and (fboundp 'display-color-p)
261 (display-color-p))
260 window-system))) 262 window-system)))
261 (cond ((and gamegrid-use-glyphs 263 (cond ((and gamegrid-use-glyphs
262 window-system-p 264 window-system-p