From a0451be18b2581f5288e1123ee7bbd2aabccbe52 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 10 Feb 2021 01:23:41 +0100 Subject: Use lexical-binding in almost all of play/*.el * lisp/play/5x5.el: Use lexical-binding. (5x5-draw-grid-end, 5x5-draw-grid, 5x5-solver) (5x5-solve-suggest): Silence byte-compiler. * lisp/play/cookie1.el: Use lexical-binding. (cookie-shuffle-vector, cookie-apropos): Silence byte-compiler. * lisp/play/zone.el: Use lexical-binding. (zone): Convert lambda to proper lexical closure. (zone-replace-char, zone-fill-out-screen): Silence byte-compiler. * lisp/play/blackbox.el: * lisp/play/doctor.el: * lisp/play/gametree.el: * lisp/play/hanoi.el: Use lexical-binding. * test/lisp/play/cookie1-resources/cookies: * test/lisp/play/cookie1-tests.el: New files. --- lisp/play/blackbox.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/play/blackbox.el') diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index e3854b55a14..61b0878b1c5 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -1,4 +1,4 @@ -;;; blackbox.el --- blackbox game in Emacs Lisp +;;; blackbox.el --- blackbox game in Emacs Lisp -*- lexical-binding: t -*- ;; Copyright (C) 1985-1987, 1992, 2001-2021 Free Software Foundation, ;; Inc. -- cgit v1.2.3 From d6bfa30860358c54b689e2e82d8c8d59b424ac45 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 14 Feb 2021 18:14:36 +0100 Subject: Do command markup in blackbox.el --- lisp/play/blackbox.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lisp/play/blackbox.el') diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index 61b0878b1c5..13bcdcc8595 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -274,45 +274,45 @@ a reflection." )) (defun bb-right (count) - (interactive "p") + (interactive "p" blackbox-mode) (while (and (> count 0) (< bb-x 8)) (forward-char 2) (setq bb-x (1+ bb-x)) (setq count (1- count)))) (defun bb-left (count) - (interactive "p") + (interactive "p" blackbox-mode) (while (and (> count 0) (> bb-x -1)) (backward-char 2) (setq bb-x (1- bb-x)) (setq count (1- count)))) (defun bb-up (count) - (interactive "p") + (interactive "p" blackbox-mode) (while (and (> count 0) (> bb-y -1)) (with-no-warnings (previous-line)) (setq bb-y (1- bb-y)) (setq count (1- count)))) (defun bb-down (count) - (interactive "p") + (interactive "p" blackbox-mode) (while (and (> count 0) (< bb-y 8)) (with-no-warnings (next-line)) (setq bb-y (1+ bb-y)) (setq count (1- count)))) (defun bb-eol () - (interactive) + (interactive nil blackbox-mode) (setq bb-x 8) (bb-goto (cons bb-x bb-y))) (defun bb-bol () - (interactive) + (interactive nil blackbox-mode) (setq bb-x -1) (bb-goto (cons bb-x bb-y))) (defun bb-romp () - (interactive) + (interactive nil blackbox-mode) (cond ((and (or (= bb-x -1) (= bb-x 8)) @@ -379,7 +379,7 @@ a reflection." (defun bb-done () "Finish the game and report score." - (interactive) + (interactive nil blackbox-mode) (let (bogus-balls) (cond ((not (= (length bb-balls-placed) (length bb-board))) -- cgit v1.2.3