summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>2002-09-12 09:59:14 +0000
committerFrancesco Potortì <pot@gnu.org>2002-09-12 09:59:14 +0000
commit9d47da55fa268237030549ca3ae130dacd639b36 (patch)
treee439261c6e23579b2ec7d678401658202b0a0a39
parent6296d642dfa6f0ce1be2df04a55cb1b18817829d (diff)
downloademacs-9d47da55fa268237030549ca3ae130dacd639b36.tar.gz
(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 69e09f035a0..0459724fc37 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -166,7 +166,7 @@ static char *noname[] = {
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)
@@ -257,25 +257,23 @@ 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
+ (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 ()
@@ -288,8 +286,8 @@ static char *noname[] = {
(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)