diff options
| author | Eli Zaretskii | 2000-07-31 15:38:35 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-07-31 15:38:35 +0000 |
| commit | ef649575067fc8f6d43eb66821a94ce76b7eb830 (patch) | |
| tree | 293642bf79efb393cfa62dfbf40e05777a2b2788 | |
| parent | ec45b7bb0c79ad7dbbdd76b683879cbcfa17bb01 (diff) | |
| download | emacs-ef649575067fc8f6d43eb66821a94ce76b7eb830.tar.gz emacs-ef649575067fc8f6d43eb66821a94ce76b7eb830.zip | |
(gomoku-font-lock-O-face, gomoku-font-lock-X-face)
(gomoku-plot-square, gomoku-init-display): Don't use window-system.
| -rw-r--r-- | lisp/play/gomoku.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 90fe1623f0b..59ef472834c 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el | |||
| @@ -143,14 +143,14 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces." | |||
| 143 | "For making font-lock use the winner's face for the line.") | 143 | "For making font-lock use the winner's face for the line.") |
| 144 | 144 | ||
| 145 | (defcustom gomoku-font-lock-O-face | 145 | (defcustom gomoku-font-lock-O-face |
| 146 | (if window-system | 146 | (if (display-color-p) |
| 147 | (list (facemenu-get-face 'fg:red) 'bold)) | 147 | (list (facemenu-get-face 'fg:red) 'bold)) |
| 148 | "*Face to use for Emacs' O." | 148 | "*Face to use for Emacs' O." |
| 149 | :type '(repeat face) | 149 | :type '(repeat face) |
| 150 | :group 'gomoku) | 150 | :group 'gomoku) |
| 151 | 151 | ||
| 152 | (defcustom gomoku-font-lock-X-face | 152 | (defcustom gomoku-font-lock-X-face |
| 153 | (if window-system | 153 | (if (display-color-p) |
| 154 | (list (facemenu-get-face 'fg:green) 'bold)) | 154 | (list (facemenu-get-face 'fg:green) 'bold)) |
| 155 | "*Face to use for your X." | 155 | "*Face to use for your X." |
| 156 | :type '(repeat face) | 156 | :type '(repeat face) |
| @@ -987,8 +987,7 @@ If the game is finished, this command requests for another game." | |||
| 987 | (insert-and-inherit (cond ((= value 1) ?X) | 987 | (insert-and-inherit (cond ((= value 1) ?X) |
| 988 | ((= value 6) ?O) | 988 | ((= value 6) ?O) |
| 989 | (?.))) | 989 | (?.))) |
| 990 | (and window-system | 990 | (and (zerop value) |
| 991 | (zerop value) | ||
| 992 | (put-text-property (1- (point)) (point) 'mouse-face 'highlight)) | 991 | (put-text-property (1- (point)) (point) 'mouse-face 'highlight)) |
| 993 | (delete-char 1) | 992 | (delete-char 1) |
| 994 | (backward-char 1)) | 993 | (backward-char 1)) |
| @@ -1028,9 +1027,8 @@ If the game is finished, this command requests for another game." | |||
| 1028 | (goto-char (point-max)))) | 1027 | (goto-char (point-max)))) |
| 1029 | (setq point (point)) | 1028 | (setq point (point)) |
| 1030 | (insert ?.) | 1029 | (insert ?.) |
| 1031 | (if window-system | 1030 | (put-text-property point (point) |
| 1032 | (put-text-property point (point) | 1031 | 'mouse-face 'highlight)) |
| 1033 | 'mouse-face 'highlight))) | ||
| 1034 | (> (setq i (1- i)) 0)) | 1032 | (> (setq i (1- i)) 0)) |
| 1035 | (if (= i (1- m)) | 1033 | (if (= i (1- m)) |
| 1036 | (setq opoint point)) | 1034 | (setq opoint point)) |