changeset 47380:05670dbe9339

(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.
author Richard M. Stallman <rms@gnu.org>
date Tue, 10 Sep 2002 16:47:16 +0000
parents 0c38024f4c40
children 660a1a1b2f68
files lisp/play/gamegrid.el
diffstat 1 files changed, 16 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/gamegrid.el	Tue Sep 10 16:45:42 2002 +0000
+++ b/lisp/play/gamegrid.el	Tue Sep 10 16:47:16 2002 +0000
@@ -171,7 +171,7 @@
     face))
 
 (defun gamegrid-make-color-tty-face (color)
-  (let* ((color-str (symbol-value color))
+  (let* ((color-str (if (symbolp color) (symbol-value color) color))
 	 (name (intern (format "gamegrid-color-tty-face-%s" color-str)))
 	 (face (make-face name)))
     (gamegrid-setup-face face color-str)
@@ -262,25 +262,23 @@
   (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
+    (cond ((and gamegrid-use-glyphs
 		window-system-p
-	      (featurep 'xpm))
-	 'glyph)
-	((and gamegrid-use-color
+		(featurep 'xpm))
+	   'glyph)
+	  ((and gamegrid-use-color
 		window-system-p
-	      (gamegrid-color-display-p))
-	 'color-x)
+		(gamegrid-color-display-p))
+	   'color-x)
 	  (window-system-p
-	 'mono-x)
-	((and gamegrid-use-color
-	      (gamegrid-color-display-p))
-	 'color-tty)
-	((fboundp 'set-face-property)
-	 'mono-tty)
-	(t
+	   'mono-x)
+	  ((and gamegrid-use-color
+		(gamegrid-color-display-p))
+	   'color-tty)
+	  ((fboundp 'set-face-property)
+	   'mono-tty)
+	  (t
 	   'emacs-tty))))
 
 (defun gamegrid-set-display-table ()
@@ -293,8 +291,8 @@
     (setq buffer-display-table gamegrid-display-table)))
 
 (defun gamegrid-hide-cursor ()
-  (if (fboundp 'specifierp)
-      (set-specifier text-cursor-visible-p nil (current-buffer))))
+  (make-local-variable 'cursor-type)
+  (setq cursor-type nil))
 
 (defun gamegrid-setup-default-font ()
   (cond ((eq gamegrid-display-mode 'glyph)