diff options
| author | Richard M. Stallman | 2002-09-20 18:34:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-20 18:34:12 +0000 |
| commit | 4bd2c0134a243449ac0802d290c385c1c61233d8 (patch) | |
| tree | 3ce9f532ec60da9037e3ca345b8b738b2d4fe1db | |
| parent | 3adec967d3621fb66aeb5af1d4ead59391f856ba (diff) | |
| download | emacs-4bd2c0134a243449ac0802d290c385c1c61233d8.tar.gz emacs-4bd2c0134a243449ac0802d290c385c1c61233d8.zip | |
(bb-right): Respect prefix argument.
(bb-left, bb-up, bb-down): Likewise.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/play/blackbox.el | 42 |
2 files changed, 26 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1730550dc9b..e54ec8ab5ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-09-19 Tom Tromey <tromey@redhat.com> | ||
| 2 | |||
| 3 | * play/blackbox.el (bb-right): Respect prefix argument. | ||
| 4 | (bb-left, bb-up, bb-down): Likewise. | ||
| 5 | |||
| 1 | 2002-09-19 Richard M. Stallman <rms@gnu.org> | 6 | 2002-09-19 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * cus-dep.el (custom-make-dependencies): Fix previous change. | 8 | * cus-dep.el (custom-make-dependencies): Fix previous change. |
diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index ea709106e81..bb5aa0b3c1f 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; blackbox.el --- blackbox game in Emacs Lisp | 1 | ;;; blackbox.el --- blackbox game in Emacs Lisp |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1987, 1992, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1986, 1987, 1992, 2001, 2002 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: F. Thomas May <uw-nsr!uw-warp!tom@beaver.cs.washington.edu> | 5 | ;; Author: F. Thomas May <uw-nsr!uw-warp!tom@beaver.cs.washington.edu> |
| 6 | ;; Adapted-By: ESR | 6 | ;; Adapted-By: ESR |
| @@ -275,33 +275,33 @@ a reflection." | |||
| 275 | (insert (format "\nThere are %d balls in the box" (length bb-board))) | 275 | (insert (format "\nThere are %d balls in the box" (length bb-board))) |
| 276 | )) | 276 | )) |
| 277 | 277 | ||
| 278 | (defun bb-right () | 278 | (defun bb-right (count) |
| 279 | (interactive) | 279 | (interactive "p") |
| 280 | (if (= bb-x 8) | 280 | (while (and (> count 0) (< bb-x 8)) |
| 281 | () | ||
| 282 | (forward-char 2) | 281 | (forward-char 2) |
| 283 | (setq bb-x (1+ bb-x)))) | 282 | (setq bb-x (1+ bb-x)) |
| 283 | (setq count (1- count)))) | ||
| 284 | 284 | ||
| 285 | (defun bb-left () | 285 | (defun bb-left (count) |
| 286 | (interactive) | 286 | (interactive "p") |
| 287 | (if (= bb-x -1) | 287 | (while (and (> count 0) (> bb-x -1)) |
| 288 | () | ||
| 289 | (backward-char 2) | 288 | (backward-char 2) |
| 290 | (setq bb-x (1- bb-x)))) | 289 | (setq bb-x (1- bb-x)) |
| 290 | (setq count (1- count)))) | ||
| 291 | 291 | ||
| 292 | (defun bb-up () | 292 | (defun bb-up (count) |
| 293 | (interactive) | 293 | (interactive "p") |
| 294 | (if (= bb-y -1) | 294 | (while (and (> count 0) (> bb-y -1)) |
| 295 | () | ||
| 296 | (previous-line 1) | 295 | (previous-line 1) |
| 297 | (setq bb-y (1- bb-y)))) | 296 | (setq bb-y (1- bb-y)) |
| 297 | (setq count (1- count)))) | ||
| 298 | 298 | ||
| 299 | (defun bb-down () | 299 | (defun bb-down (count) |
| 300 | (interactive) | 300 | (interactive "p") |
| 301 | (if (= bb-y 8) | 301 | (while (and (> count 0) (< bb-y 8)) |
| 302 | () | ||
| 303 | (next-line 1) | 302 | (next-line 1) |
| 304 | (setq bb-y (1+ bb-y)))) | 303 | (setq bb-y (1+ bb-y)) |
| 304 | (setq count (1- count)))) | ||
| 305 | 305 | ||
| 306 | (defun bb-eol () | 306 | (defun bb-eol () |
| 307 | (interactive) | 307 | (interactive) |