diff options
| author | Jim Blandy | 1992-07-21 04:09:28 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-07-21 04:09:28 +0000 |
| commit | 151bdc833ef6611acf656aef027513d578b44592 (patch) | |
| tree | da1b882779041aa7d7d30c58224673c92cd611f3 | |
| parent | 0b0ef30f7987eb125e05d0a653036cd7f58a6c43 (diff) | |
| download | emacs-151bdc833ef6611acf656aef027513d578b44592.tar.gz emacs-151bdc833ef6611acf656aef027513d578b44592.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/frame.el | 6 | ||||
| -rw-r--r-- | lisp/play/blackbox.el | 49 | ||||
| -rw-r--r-- | src/lread.c | 4 |
3 files changed, 28 insertions, 31 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index 4d0165f5bc9..c3e28eaaeea 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -245,15 +245,15 @@ configuration, and other parameters set as specified in CONFIGURATION." | |||
| 245 | ;;;; Convenience functions for accessing and interactively changing | 245 | ;;;; Convenience functions for accessing and interactively changing |
| 246 | ;;;; frame parameters. | 246 | ;;;; frame parameters. |
| 247 | 247 | ||
| 248 | (defun frame-width (&optional frame) | 248 | (defun frame-height (&optional frame) |
| 249 | "Return number of lines available for display on FRAME. | 249 | "Return number of lines available for display on FRAME. |
| 250 | If FRAME is omitted, describe the currently selected frame." | 250 | If FRAME is omitted, describe the currently selected frame." |
| 251 | (cdr (assq 'width (frame-parameters frame)))) | 251 | (cdr (assq 'height (frame-parameters frame)))) |
| 252 | 252 | ||
| 253 | (defun frame-width (&optional frame) | 253 | (defun frame-width (&optional frame) |
| 254 | "Return number of columns available for display on FRAME. | 254 | "Return number of columns available for display on FRAME. |
| 255 | If FRAME is omitted, describe the currently selected frame." | 255 | If FRAME is omitted, describe the currently selected frame." |
| 256 | (cdr (assq 'height (frame-parameters frame)))) | 256 | (cdr (assq 'width (frame-parameters frame)))) |
| 257 | 257 | ||
| 258 | (defun set-frame-height (h) | 258 | (defun set-frame-height (h) |
| 259 | (interactive "NHeight: ") | 259 | (interactive "NHeight: ") |
diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index cc4e2066690..acca97d2335 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el | |||
| @@ -81,27 +81,20 @@ | |||
| 81 | (define-key blackbox-mode-map "\C-e" 'bb-eol) | 81 | (define-key blackbox-mode-map "\C-e" 'bb-eol) |
| 82 | (define-key blackbox-mode-map "\C-a" 'bb-bol) | 82 | (define-key blackbox-mode-map "\C-a" 'bb-bol) |
| 83 | (define-key blackbox-mode-map " " 'bb-romp) | 83 | (define-key blackbox-mode-map " " 'bb-romp) |
| 84 | (define-key blackbox-mode-map [insert] 'bb-romp) | ||
| 84 | (define-key blackbox-mode-map "\C-m" 'bb-done) | 85 | (define-key blackbox-mode-map "\C-m" 'bb-done) |
| 86 | (define-key blackbox-mode-map [kp-enter] 'bb-done) | ||
| 85 | 87 | ||
| 86 | ;; This is a kluge. What we really want is a general | 88 | ;; This is a kluge. What we really want is a general |
| 87 | ;; feature for reminding terminal keys to the functions | 89 | ;; feature for reminding terminal keys to the functions |
| 88 | ;; corresponding to them in local maps | 90 | ;; corresponding to them in local maps. |
| 89 | (if (featurep 'keypad) | 91 | (mapcar (function |
| 90 | (let (keys) | 92 | (lambda (funk) |
| 91 | (if (setq keys (function-key-sequence ?u)) ; Up Arrow | 93 | (mapcar (function |
| 92 | (define-key blackbox-mode-map keys 'bb-up)) | 94 | (lambda (key) |
| 93 | (if (setq keys (function-key-sequence ?d)) ; Down Arrow | 95 | (define-key blackbox-mode-map key funk))) |
| 94 | (define-key blackbox-mode-map keys 'bb-down)) | 96 | (where-is-internal funk)))) |
| 95 | (if (setq keys (function-key-sequence ?l)) ; Left Arrow | 97 | '(previous-line next-line backward-character forward-character))) |
| 96 | (define-key blackbox-mode-map keys 'bb-left)) | ||
| 97 | (if (setq keys (function-key-sequence ?r)) ; Right Arrow | ||
| 98 | (define-key blackbox-mode-map keys 'bb-right)) | ||
| 99 | (if (setq keys (function-key-sequence ?e)) ; Enter | ||
| 100 | (define-key blackbox-mode-map keys 'bb-done)) | ||
| 101 | (if (setq keys (function-key-sequence ?I)) ; Insert | ||
| 102 | (define-key blackbox-mode-map keys 'bb-romp)) | ||
| 103 | ))) | ||
| 104 | |||
| 105 | 98 | ||
| 106 | ;; Blackbox mode is suitable only for specially formatted data. | 99 | ;; Blackbox mode is suitable only for specially formatted data. |
| 107 | (put 'blackbox-mode 'mode-class 'special) | 100 | (put 'blackbox-mode 'mode-class 'special) |
| @@ -139,9 +132,10 @@ your score. | |||
| 139 | 132 | ||
| 140 | Overview of play: | 133 | Overview of play: |
| 141 | 134 | ||
| 142 | To play blackbox, call the function `blackbox'. An optional prefix | 135 | \\<blackbox-mode-map>\ |
| 143 | argument specifies the number of balls to be hidden in the box; the | 136 | To play blackbox, type \\[blackbox]. An optional prefix argument |
| 144 | default is four. | 137 | specifies the number of balls to be hidden in the box; the default is |
| 138 | four. | ||
| 145 | 139 | ||
| 146 | The cursor can be moved around the box with the standard cursor | 140 | The cursor can be moved around the box with the standard cursor |
| 147 | movement keys. | 141 | movement keys. |
| @@ -150,14 +144,14 @@ To shoot a ray, move the cursor to the edge of the box and press SPC. | |||
| 150 | The result will be determined and the playfield updated. | 144 | The result will be determined and the playfield updated. |
| 151 | 145 | ||
| 152 | You may place or remove balls in the box by moving the cursor into the | 146 | You may place or remove balls in the box by moving the cursor into the |
| 153 | box and pressing \\<bb-romp>. | 147 | box and pressing \\[bb-romp]. |
| 154 | 148 | ||
| 155 | When you think the configuration of balls you have placed is correct, | 149 | When you think the configuration of balls you have placed is correct, |
| 156 | press \\<bb-done>. You will be informed whether you are correct or not, and | 150 | press \\[bb-done]. You will be informed whether you are correct or |
| 157 | be given your score. Your score is the number of letters and numbers | 151 | not, and be given your score. Your score is the number of letters and |
| 158 | around the outside of the box plus five for each incorrectly placed | 152 | numbers around the outside of the box plus five for each incorrectly |
| 159 | ball. If you placed any balls incorrectly, they will be indicated | 153 | placed ball. If you placed any balls incorrectly, they will be |
| 160 | with `x', and their actual positions indicated with `o'. | 154 | indicated with `x', and their actual positions indicated with `o'. |
| 161 | 155 | ||
| 162 | Details: | 156 | Details: |
| 163 | 157 | ||
| @@ -408,7 +402,8 @@ a reflection." | |||
| 408 | (bb-update-board c) | 402 | (bb-update-board c) |
| 409 | (1+ (bb-show-bogus-balls-2 (cdr list-1) list-2 c))))) | 403 | (1+ (bb-show-bogus-balls-2 (cdr list-1) list-2 c))))) |
| 410 | 404 | ||
| 411 | ;; blackbox.el ends here | 405 | (defun bb-outside-box (x y) |
| 406 | (or (= x -1) (= x 8) (= y -1) (= y 8))) | ||
| 412 | 407 | ||
| 413 | (defun bb-goto (pos) | 408 | (defun bb-goto (pos) |
| 414 | (goto-char (+ (* (car pos) 2) (* (cdr pos) 22) 26))) | 409 | (goto-char (+ (* (car pos) 2) (* (cdr pos) 22) 26))) |
diff --git a/src/lread.c b/src/lread.c index db0ff297783..279f64a81b7 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1049,8 +1049,10 @@ isfloat_string (cp) | |||
| 1049 | } | 1049 | } |
| 1050 | return (*cp == 0 | 1050 | return (*cp == 0 |
| 1051 | && (state == (LEAD_INT|DOT_CHAR|TRAIL_INT) | 1051 | && (state == (LEAD_INT|DOT_CHAR|TRAIL_INT) |
| 1052 | || state == (DOT_CHAR|TRAIL_INT) | ||
| 1052 | || state == (LEAD_INT|E_CHAR|EXP_INT) | 1053 | || state == (LEAD_INT|E_CHAR|EXP_INT) |
| 1053 | || state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT))); | 1054 | || state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT) |
| 1055 | || state == (DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT))); | ||
| 1054 | } | 1056 | } |
| 1055 | #endif /* LISP_FLOAT_TYPE */ | 1057 | #endif /* LISP_FLOAT_TYPE */ |
| 1056 | 1058 | ||