From 836c23295c0d1cce58f58a1bdafe1e624284d86f Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Thu, 17 Sep 2026 18:54:24 +0700 Subject: [PATCH] Two sentences a parked program was still getting wrong MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit basis had the same false promise the eval note did. It branches on the break state, which answers "running" while the program is parked — the agent's listener is alive and nothing has stopped — so disassemble reported that a body delivered while parked installs at the next frame boundary, which is not a boundary the program will reach until somebody runs it again. And flan-rerun had no autoload. The keymap binds it, and flan-mode.el says in as many words why every command there needs a real autoload rather than a declare-function: a user who loaded only flan-mode would otherwise find the key bound to nothing at the exact moment they most want it. --- emacs/flan-mode.el | 4 ++++ lib/dev.ml | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/emacs/flan-mode.el b/emacs/flan-mode.el index 9142370..69adbe9 100644 --- a/emacs/flan-mode.el +++ b/emacs/flan-mode.el @@ -71,6 +71,10 @@ (autoload 'flan-dev "flan-dev" nil t) (autoload 'flan-dev-quit "flan-dev" nil t) (autoload 'flan-dev-restart-program "flan-dev" nil t) +;; And the cheap counterpart, which needs an autoload for the reason above and +;; more than most: it is the command someone reaches for the moment a window +;; closes, which can be the first thing they ever ask the client to do. +(autoload 'flan-rerun "flan-dev" nil t) ;; Bound below, like the rest, and it was the one missing an autoload. (autoload 'flan-disassemble "flan-dev" nil t) ;; The other question about the same function, and the reason it is a second diff --git a/lib/dev.ml b/lib/dev.ml index 5a0cc9f..4c0bd95 100644 --- a/lib/dev.ml +++ b/lib/dev.ml @@ -2214,6 +2214,17 @@ let basis t name = back to say whether it installed this before stopping. Nothing \ further installs until it resumes" m c + (* [state t] answers [Running] for a parked program — the agent's + listener is alive and nothing has stopped — so the frame-boundary + sentence below would be said about a program that will not reach one + until somebody runs it again. Asked of [liveness] first, for the same + reason every guard in this file is. *) + | Running when liveness t = Parked -> + Printf.sprintf + "%s — the last module delivered for this name, accepted for install; \ + the program has finished and is parked, so it installs at the first \ + frame boundary of the next run rather than now" + m | Running -> Printf.sprintf "%s — the last module delivered for this name, accepted for install; \