comparison lisp/play/gomoku.el @ 49173:dfa1de5c19ef

(gomoku-mode-map): Use command remapping instead of substitute-key-definition.
author Andreas Schwab <schwab@suse.de>
date Sun, 12 Jan 2003 20:49:41 +0000
parents 8fbfc7c3386c
children 0d8b17d428b5
comparison
equal deleted inserted replaced
49172:0d696afaf14c 49173:dfa1de5c19ef
1 ;;; gomoku.el --- Gomoku game between you and Emacs 1 ;;; gomoku.el --- Gomoku game between you and Emacs
2 2
3 ;; Copyright (C) 1988, 1994, 1996, 2001 Free Software Foundation, Inc. 3 ;; Copyright (C) 1988, 1994, 1996, 2001, 2003 Free Software Foundation, Inc.
4 4
5 ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> 5 ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
6 ;; Maintainer: FSF 6 ;; Maintainer: FSF
7 ;; Adapted-By: ESR, Daniel Pfeiffer <occitan@esperanto.org> 7 ;; Adapted-By: ESR, Daniel Pfeiffer <occitan@esperanto.org>
8 ;; Keywords: games 8 ;; Keywords: games
145 (define-key gomoku-mode-map [mouse-1] 'gomoku-click) 145 (define-key gomoku-mode-map [mouse-1] 'gomoku-click)
146 (define-key gomoku-mode-map [down-mouse-2] 'gomoku-click) 146 (define-key gomoku-mode-map [down-mouse-2] 'gomoku-click)
147 (define-key gomoku-mode-map [mouse-2] 'gomoku-mouse-play) 147 (define-key gomoku-mode-map [mouse-2] 'gomoku-mouse-play)
148 (define-key gomoku-mode-map [drag-mouse-2] 'gomoku-mouse-play) 148 (define-key gomoku-mode-map [drag-mouse-2] 'gomoku-mouse-play)
149 149
150 (substitute-key-definition 'previous-line 'gomoku-move-up 150 (define-key gomoku-mode-map [remap previous-line] 'gomoku-move-up)
151 gomoku-mode-map (current-global-map)) 151 (define-key gomoku-mode-map [remap next-line] 'gomoku-move-down)
152 (substitute-key-definition 'next-line 'gomoku-move-down 152 (define-key gomoku-mode-map [remap beginning-of-line] 'gomoku-beginning-of-line)
153 gomoku-mode-map (current-global-map)) 153 (define-key gomoku-mode-map [remap end-of-line] 'gomoku-end-of-line)
154 (substitute-key-definition 'beginning-of-line 'gomoku-beginning-of-line 154 (define-key gomoku-mode-map [remap undo] 'gomoku-human-takes-back)
155 gomoku-mode-map (current-global-map)) 155 (define-key gomoku-mode-map [remap advertised-undo] 'gomoku-human-takes-back))
156 (substitute-key-definition 'end-of-line 'gomoku-end-of-line
157 gomoku-mode-map (current-global-map))
158 (substitute-key-definition 'undo 'gomoku-human-takes-back
159 gomoku-mode-map (current-global-map))
160 (substitute-key-definition 'advertised-undo 'gomoku-human-takes-back
161 gomoku-mode-map (current-global-map)))
162 156
163 (defvar gomoku-emacs-won () 157 (defvar gomoku-emacs-won ()
164 "For making font-lock use the winner's face for the line.") 158 "For making font-lock use the winner's face for the line.")
165 159
166 (defface gomoku-font-lock-O-face 160 (defface gomoku-font-lock-O-face