diff --git a/emacs/flan-cnr.el b/emacs/flan-cnr.el index 35164b6..59b2eb2 100644 --- a/emacs/flan-cnr.el +++ b/emacs/flan-cnr.el @@ -342,7 +342,14 @@ list already says it." (interactive) (let ((expr (get-text-property (point) 'flan-cnr-inspect))) (unless expr - (user-error "flan: %s" (flan-cnr--why 'locals))) + ;; Two different misses, and saying the wrong one sends someone looking + ;; for a missing feature when they are one keystroke away. Being *on* a + ;; frame is the common case — the frame line is what the eye lands on — + ;; so name TAB rather than repeating why a local might be absent. + (user-error + (if (get-text-property (point) 'flan-cnr-frame) + "flan: this is the frame's own line; TAB opens it, then i on a local" + "flan: point is not on a local — TAB opens a frame, i inspects a local in it"))) (require 'flan-inspect) (flan-inspect expr))) diff --git a/sand.flan b/sand.flan index 116f226..12165a3 100644 --- a/sand.flan +++ b/sand.flan @@ -108,6 +108,7 @@ (return)) (let [left? (and (> col 0) (empty-at? y (- col 1))) right? (and (< col (- cols 1)) (empty-at? y (+ col 1)))] + (pause) (when (or left? right?) (let [side (cond (not left?) 1 @@ -418,8 +419,6 @@ col (/ (i32 (.x m)) cell-size)] (paint-at row col))) -(defstruct Pause []) - ;; Every cross-function call in a dev build routes through an indirection cell, ;; so redefining this from the REPL reaches the running loop on the next frame. ;; No `varfn` (Janet), no `let update = ref` (OCaml), no var-routing (jank). @@ -441,7 +440,6 @@ (when (rl/key-released? :space) (next-color) (plink 1.4)) (when (rl/mouse-button-pressed? :right) (reset-view) (plink 0.6)) (when (rl/mouse-button-pressed? :left) (plink 1.0)) - (when (rl/key-pressed? :f) (error (Pause {}))) (when (rl/key-pressed? :m) (toggle-music)) ;; The pad, when there is one. Pressed and released are separate events here ;; too, for the same reason.