Mercurial > emacs
comparison lisp/play/landmark.el @ 30542:f03ab02d1f4e
(lm-font-lock-face-O, lm-font-lock-face-X)
(lm-plot-square, lm-init-display): Don't use window-system.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 31 Jul 2000 15:37:49 +0000 |
parents | d270a933be88 |
children | e559f0aa6b2d |
comparison
equal
deleted
inserted
replaced
30541:d5e4d3d5012c | 30542:f03ab02d1f4e |
---|---|
215 | 215 |
216 (defvar lm-emacs-won () | 216 (defvar lm-emacs-won () |
217 "*For making font-lock use the winner's face for the line.") | 217 "*For making font-lock use the winner's face for the line.") |
218 | 218 |
219 (defvar lm-font-lock-face-O | 219 (defvar lm-font-lock-face-O |
220 (if window-system | 220 (if (display-color-p) |
221 (list (facemenu-get-face 'fg:red) 'bold)) | 221 (list (facemenu-get-face 'fg:red) 'bold)) |
222 "*Face to use for Emacs' O.") | 222 "*Face to use for Emacs' O.") |
223 | 223 |
224 (defvar lm-font-lock-face-X | 224 (defvar lm-font-lock-face-X |
225 (if window-system | 225 (if (display-color-p) |
226 (list (facemenu-get-face 'fg:green) 'bold)) | 226 (list (facemenu-get-face 'fg:green) 'bold)) |
227 "*Face to use for your X.") | 227 "*Face to use for your X.") |
228 | 228 |
229 (defvar lm-font-lock-keywords | 229 (defvar lm-font-lock-keywords |
230 '(("O" . lm-font-lock-face-O) | 230 '(("O" . lm-font-lock-face-O) |
891 ((= value 3) ?S) | 891 ((= value 3) ?S) |
892 ((= value 4) ?E) | 892 ((= value 4) ?E) |
893 ((= value 5) ?W) | 893 ((= value 5) ?W) |
894 ((= value 6) ?^))) | 894 ((= value 6) ?^))) |
895 | 895 |
896 (and window-system | 896 (and (zerop value) |
897 (zerop value) | |
898 (put-text-property (1- (point)) (point) 'mouse-face 'highlight)) | 897 (put-text-property (1- (point)) (point) 'mouse-face 'highlight)) |
899 (delete-char 1) | 898 (delete-char 1) |
900 (backward-char 1)) | 899 (backward-char 1)) |
901 (sit-for 0)) ; Display NOW | 900 (sit-for 0)) ; Display NOW |
902 | 901 |
932 (append-to-buffer (current-buffer) opoint (point)) | 931 (append-to-buffer (current-buffer) opoint (point)) |
933 (setq i (- i 2))) | 932 (setq i (- i 2))) |
934 (goto-char (point-max)))) | 933 (goto-char (point-max)))) |
935 (setq point (point)) | 934 (setq point (point)) |
936 (insert ?=) | 935 (insert ?=) |
937 (if window-system | 936 (put-text-property point (point) |
938 (put-text-property point (point) | 937 'mouse-face 'highlight)) |
939 'mouse-face 'highlight))) | |
940 (> (setq i (1- i)) 0)) | 938 (> (setq i (1- i)) 0)) |
941 (if (= i (1- m)) | 939 (if (= i (1- m)) |
942 (setq opoint point)) | 940 (setq opoint point)) |
943 (insert-char ?\n lm-square-height)) | 941 (insert-char ?\n lm-square-height)) |
944 (or (eq (char-after 1) ?.) | 942 (or (eq (char-after 1) ?.) |