aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-20 17:38:27 -0400
committerCraig Jennings <c@cjennings.net>2026-06-20 17:38:27 -0400
commit50a3c9b8edc6311b1cdcf08119a131f5ae2903c8 (patch)
treee76346f6ac30f73cca8332398eaffcd08ca32345 /modules
parentfd1654d3179cc6aa6ae59b2a1569e1c024a326e6 (diff)
downloaddotemacs-50a3c9b8edc6311b1cdcf08119a131f5ae2903c8.tar.gz
dotemacs-50a3c9b8edc6311b1cdcf08119a131f5ae2903c8.zip
refactor(theme-studio): restore studio state after mutating gates via withSavedState
Seven gates (locktest, mocktest, gallerytest, safetest, ndtest, viewlocktest, expandpersisttest) mutated PALETTE/MAP/SYNTAX/UIMAP/PKGMAP/LOCKED and restored nothing, so opening the studio at one of those #hashes left its state corrupted for interactive use. Wrap each in withSavedState(keys, body), scoped to the keys that gate touches: snapshot the named globals, run the body, restore in a finally. Uses a JSON-round-trip clone (the studio objects carry values structuredClone throws on — the same clone the gates' own local saves use). The 14 gates that already restore locally are left as-is. Verified: all 44 gates green, the restore round-trip holds for reassignment + in-place + Set mutation, and a forced assertion in a wrapped gate still reports FAIL.
Diffstat (limited to 'modules')
0 files changed, 0 insertions, 0 deletions