diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-20 17:38:27 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-20 17:38:27 -0400 |
| commit | a473aa7caae354d04429460beeb03b910fb67dcb (patch) | |
| tree | 2693f4c71757f0f769777daea738291d91dcc04e /tests/test-term-toggle--dispatch.el | |
| parent | 05697e837235a2ee5adf065ce2e70d35262632cc (diff) | |
| download | dotemacs-a473aa7caae354d04429460beeb03b910fb67dcb.tar.gz dotemacs-a473aa7caae354d04429460beeb03b910fb67dcb.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 'tests/test-term-toggle--dispatch.el')
0 files changed, 0 insertions, 0 deletions
