changeset 826:e9b9a1cff2c9

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Tue, 21 Jul 1992 04:09:28 +0000
parents f3eb45ffe06d
children 731cb9bcbad0
files lisp/frame.el lisp/play/blackbox.el src/lread.c
diffstat 3 files changed, 28 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Tue Jul 21 02:48:51 1992 +0000
+++ b/lisp/frame.el	Tue Jul 21 04:09:28 1992 +0000
@@ -245,15 +245,15 @@
 ;;;; Convenience functions for accessing and interactively changing
 ;;;; frame parameters.
 
-(defun frame-width (&optional frame)
+(defun frame-height (&optional frame)
   "Return number of lines available for display on FRAME.
 If FRAME is omitted, describe the currently selected frame."
-  (cdr (assq 'width (frame-parameters frame))))
+  (cdr (assq 'height (frame-parameters frame))))
 
 (defun frame-width (&optional frame)
   "Return number of columns available for display on FRAME.
 If FRAME is omitted, describe the currently selected frame."
-  (cdr (assq 'height (frame-parameters frame))))
+  (cdr (assq 'width (frame-parameters frame))))
 
 (defun set-frame-height (h)
   (interactive "NHeight: ")
--- a/lisp/play/blackbox.el	Tue Jul 21 02:48:51 1992 +0000
+++ b/lisp/play/blackbox.el	Tue Jul 21 04:09:28 1992 +0000
@@ -81,27 +81,20 @@
   (define-key blackbox-mode-map "\C-e" 'bb-eol)
   (define-key blackbox-mode-map "\C-a" 'bb-bol)
   (define-key blackbox-mode-map " " 'bb-romp)
+  (define-key blackbox-mode-map [insert] 'bb-romp)
   (define-key blackbox-mode-map "\C-m" 'bb-done)
+  (define-key blackbox-mode-map [kp-enter] 'bb-done)
 
   ;; This is a kluge.  What we really want is a general
   ;; feature for reminding terminal keys to the functions
-  ;; corresponding to them in local maps
-  (if (featurep 'keypad)
-      (let (keys)
-	(if (setq keys (function-key-sequence ?u)) ; Up Arrow
-	    (define-key blackbox-mode-map keys 'bb-up))
-	(if (setq keys (function-key-sequence ?d)) ; Down Arrow
-	    (define-key blackbox-mode-map keys 'bb-down))
-	(if (setq keys (function-key-sequence ?l)) ; Left Arrow
-	    (define-key blackbox-mode-map keys 'bb-left))
-	(if (setq keys (function-key-sequence ?r)) ; Right Arrow
-	    (define-key blackbox-mode-map keys 'bb-right))
-	(if (setq keys (function-key-sequence ?e)) ; Enter
-	    (define-key blackbox-mode-map keys 'bb-done))
-	(if (setq keys (function-key-sequence ?I)) ; Insert
-	    (define-key blackbox-mode-map keys 'bb-romp))
-	)))
-
+  ;; corresponding to them in local maps.
+  (mapcar (function
+	   (lambda (funk)
+	     (mapcar (function
+		      (lambda (key)
+			(define-key blackbox-mode-map key funk)))
+		     (where-is-internal funk))))
+	  '(previous-line next-line backward-character forward-character)))
 
 ;; Blackbox mode is suitable only for specially formatted data.
 (put 'blackbox-mode 'mode-class 'special)
@@ -139,9 +132,10 @@
 
 Overview of play:
 
-To play blackbox, call the function `blackbox'.  An optional prefix
-argument specifies the number of balls to be hidden in the box; the
-default is four.
+\\<blackbox-mode-map>\
+To play blackbox, type \\[blackbox].  An optional prefix argument
+specifies the number of balls to be hidden in the box; the default is
+four.
 
 The cursor can be moved around the box with the standard cursor
 movement keys.
@@ -150,14 +144,14 @@
 The result will be determined and the playfield updated.
 
 You may place or remove balls in the box by moving the cursor into the
-box and pressing \\<bb-romp>.
+box and pressing \\[bb-romp].
 
 When you think the configuration of balls you have placed is correct,
-press \\<bb-done>.  You will be informed whether you are correct or not, and
-be given your score.  Your score is the number of letters and numbers
-around the outside of the box plus five for each incorrectly placed
-ball.  If you placed any balls incorrectly, they will be indicated
-with `x', and their actual positions indicated with `o'.
+press \\[bb-done].  You will be informed whether you are correct or
+not, and be given your score.  Your score is the number of letters and
+numbers around the outside of the box plus five for each incorrectly
+placed ball.  If you placed any balls incorrectly, they will be
+indicated with `x', and their actual positions indicated with `o'.
 
 Details:
 
@@ -408,7 +402,8 @@
     (bb-update-board c)
     (1+ (bb-show-bogus-balls-2 (cdr list-1) list-2 c)))))
 
-;; blackbox.el ends here
+(defun bb-outside-box (x y)
+  (or (= x -1) (= x 8) (= y -1) (= y 8)))
 
 (defun bb-goto (pos)
   (goto-char (+ (* (car pos) 2) (* (cdr pos) 22) 26)))
--- a/src/lread.c	Tue Jul 21 02:48:51 1992 +0000
+++ b/src/lread.c	Tue Jul 21 04:09:28 1992 +0000
@@ -1049,8 +1049,10 @@
     }
   return (*cp == 0
 	  && (state == (LEAD_INT|DOT_CHAR|TRAIL_INT)
+	      || state == (DOT_CHAR|TRAIL_INT)
 	      || state == (LEAD_INT|E_CHAR|EXP_INT)
-	      || state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)));
+	      || state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)
+	      || state == (DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)));
 }
 #endif /* LISP_FLOAT_TYPE */