aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-09-10 16:47:16 +0000
committerRichard M. Stallman2002-09-10 16:47:16 +0000
commita5bce90d94822212dac326081badb4bb2474efba (patch)
tree5114841e1cfeb559ca7919ee4cc91ac41cd63fe5
parentf0397cde4bd5abc4e459bf061f0910f2fcca4024 (diff)
downloademacs-a5bce90d94822212dac326081badb4bb2474efba.tar.gz
emacs-a5bce90d94822212dac326081badb4bb2474efba.zip
(gamegrid-make-color-tty-face): Handle string as COLOR arg.
(gamegrid-display-type): Don't assume display-color-p implies a color-x terminal. (gamegrid-hide-cursor): Set `cursor-type' local variable.
-rw-r--r--lisp/play/gamegrid.el34
1 files changed, 16 insertions, 18 deletions
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index de005b40891..b8f7050ed00 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -171,7 +171,7 @@ static char *noname[] = {
171 face)) 171 face))
172 172
173(defun gamegrid-make-color-tty-face (color) 173(defun gamegrid-make-color-tty-face (color)
174 (let* ((color-str (symbol-value color)) 174 (let* ((color-str (if (symbolp color) (symbol-value color) color))
175 (name (intern (format "gamegrid-color-tty-face-%s" color-str))) 175 (name (intern (format "gamegrid-color-tty-face-%s" color-str)))
176 (face (make-face name))) 176 (face (make-face name)))
177 (gamegrid-setup-face face color-str) 177 (gamegrid-setup-face face color-str)
@@ -262,25 +262,23 @@ static char *noname[] = {
262 (let ((window-system-p 262 (let ((window-system-p
263 (or (and (fboundp 'console-on-window-system-p) 263 (or (and (fboundp 'console-on-window-system-p)
264 (console-on-window-system-p)) 264 (console-on-window-system-p))
265 (and (fboundp 'display-color-p)
266 (display-color-p))
267 window-system))) 265 window-system)))
268 (cond ((and gamegrid-use-glyphs 266 (cond ((and gamegrid-use-glyphs
269 window-system-p 267 window-system-p
270 (featurep 'xpm)) 268 (featurep 'xpm))
271 'glyph) 269 'glyph)
272 ((and gamegrid-use-color 270 ((and gamegrid-use-color
273 window-system-p 271 window-system-p
274 (gamegrid-color-display-p)) 272 (gamegrid-color-display-p))
275 'color-x) 273 'color-x)
276 (window-system-p 274 (window-system-p
277 'mono-x) 275 'mono-x)
278 ((and gamegrid-use-color 276 ((and gamegrid-use-color
279 (gamegrid-color-display-p)) 277 (gamegrid-color-display-p))
280 'color-tty) 278 'color-tty)
281 ((fboundp 'set-face-property) 279 ((fboundp 'set-face-property)
282 'mono-tty) 280 'mono-tty)
283 (t 281 (t
284 'emacs-tty)))) 282 'emacs-tty))))
285 283
286(defun gamegrid-set-display-table () 284(defun gamegrid-set-display-table ()
@@ -293,8 +291,8 @@ static char *noname[] = {
293 (setq buffer-display-table gamegrid-display-table))) 291 (setq buffer-display-table gamegrid-display-table)))
294 292
295(defun gamegrid-hide-cursor () 293(defun gamegrid-hide-cursor ()
296 (if (fboundp 'specifierp) 294 (make-local-variable 'cursor-type)
297 (set-specifier text-cursor-visible-p nil (current-buffer)))) 295 (setq cursor-type nil))
298 296
299(defun gamegrid-setup-default-font () 297(defun gamegrid-setup-default-font ()
300 (cond ((eq gamegrid-display-mode 'glyph) 298 (cond ((eq gamegrid-display-mode 'glyph)