;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require persist seq] 2) (defalias 'with-local-temp-persist '(macro . #[(&rest body) "\301\302\303BB\304BB\207" [body unwind-protect let ((persist--directory-location "./persist/") (persist--symbols nil)) ((delete-directory "./persist" t))] 4])) (byte-code "\300\301\302\303#\210\304\305\306\307\305\310\311\310\312\310&\"\210\304\313\306\307\313\310\314\310\312\310&\"\210\304\315\306\307\315\310\316\310\312\310&\"\210\304\317\306\307\317\320\321\310\312\310&\"\210\304\322\306\307\322\310\323\310\312\310&\"\210\304\324\306\307\324\310\325\310\312\310&\"\210\304\326\306\307\326\310\327\310\312\310&\"\210\304\330\306\307\330\310\331\310\312\310&\"\207" [put with-local-temp-persist edebug-form-spec body ert-set-test test-persist-symbol record ert-test nil #[nil "\304\305!\306\307\216\306\310 \311\n\312\"\210\313 \n\"*\211)\204!\314 !\210))\207" [#1=#:value-9399 #2=#:form-description-9400 sym persist--symbols gensym #4="ert-form-evaluation-aborted-" nil #[nil "\302\303\304\305\257\306 !\207" [#1# #2# (should #3=(let ((persist--symbols nil) (sym (cl-gensym))) (persist-symbol sym 10) (seq-contains persist--symbols sym))) :form #3# :value ert--signal-should-execution] 5] cl-gensym persist-symbol 10 seq-contains ert-fail] 3] :passed test-persist-save-only-persistant #[nil "\306\307!\310\211\311\3121\"\313\216\314\216\315\310\316\317 !+\211)0\2023\320\321\n\322\320$\210\211)\210 \204B\323\324\n \325\326D\"!\210+)\207" [#6=#:value-9401 #5=#:form-description-9402 #:form-description-fn-9404 #:errorp9403 persist--symbols persist--directory-location gensym #4# nil #[nil "\207" [#5#] 1] (error) #[nil "\302\303\304\305\257\306 !\207" [#6# #5# (should-error (with-local-temp-persist #7=(persist-save (cl-gensym))) :type 'error :exclude-subtypes t) :form (unwind-protect (let ((persist--directory-location #9="./persist/") (persist--symbols nil)) #7#) (delete-directory #8="./persist" t)) :value ert--signal-should-execution] 5] #[nil "\300\301\302\"\207" [delete-directory #8# t] 3] #9# persist-save cl-gensym t ert--should-error-handle-error error ert-fail append :fail-reason #18="did not signal an error" -condition-] 6] test-persist-save #[nil "\306\216\307\310\311 \312\3131\314\315\n!)C0\202#\316 @ A)D6\3177\3108\320\216\321 6\"\2117)\203>\3228!\210)7\210+\n\323L\210\324\n\323\"\210\325\n!\210\326\327!9\310:\330\216\331\2119)\204g\322:!\210)9\210)\312;\3321~\314\315\n!)C0\202\210\316; @ A)D<\333=\310>\334\216\321;<\"\211=)\203\244\322>!\210)=\210+\n\335L\210\325\n!\210\312?\3361\303\314\315\n!)C0\202\315\316? @ A)D@\337A\310B\340\216\321?@\"\211A)\204\351\322B!\210)A\210+\341C\3421\314\343\344\345!DrDq\210\346\216\347\315\n!!\210\350 ,D0\202\316C @ A)DE\351F\310G\352\216\321CE\"\211F)\2048\322G!\210)F\210+\325H\3531J\354C0\202T\316H @ A)DI\355J\310\211K\356LM\3571v\360\216\321HI\"\211J)0\202\212N\331M\361LN\362\310$\210N\211J)\210M\204\233\322\363L \364\365D\"!\210+J.\207" [persist--symbols persist--directory-location sym #10=#:fn-9405 signal-hook-function err #[nil "\300\301\302\"\207" [delete-directory #8# t] 3] #9# nil cl-gensym file-exists-p (error) ert--should-signal-hook persist--file-location signal #11=#:ert-form-evaluation-aborted-9408 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#10# #19=#:args-9406 #20=#:value-9407 -explainer- #21=#:form-description-9409 (should-not (file-exists-p (persist--file-location sym))) :form eql #11# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail 10 persist-symbol persist-save gensym #4# #[nil "\302\303\304\305\257\306 !\207" [#22=#:value-9410 #23=#:form-description-9411 (should t) :form t :value ert--signal-should-execution] 5] t (error) #12=#:ert-form-evaluation-aborted-9415 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#24=#:fn-9412 #25=#:args-9413 #26=#:value-9414 -explainer- #27=#:form-description-9416 (should-not (file-exists-p (persist--file-location sym))) :form eql #12# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] 20 (error) #13=#:ert-form-evaluation-aborted-9420 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#28=#:fn-9417 #29=#:args-9418 #30=#:value-9419 -explainer- #31=#:form-description-9421 (should (file-exists-p (persist--file-location sym))) :form eql #13# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] string-match-p (error) #14="20" generate-new-buffer #45=" *temp*" #[nil "\301!\205 \302!\207" [#33=#:temp-buffer buffer-name kill-buffer] 2] insert-file-contents buffer-string #15=#:ert-form-evaluation-aborted-9425 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#32=#:fn-9422 #34=#:args-9423 #35=#:value-9424 -explainer- #36=#:form-description-9426 (should (string-match-p #14# (with-temp-buffer (insert-file-contents (persist--file-location sym)) (buffer-string)))) :form eql #15# :value string-match-p ert-explainer :explanation apply ert--signal-should-execution] 6] (error) fred #17=#:ert-form-evaluation-aborted-9430 #[nil "\207" [#16=#:form-description-9431] 1] (error) #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#37=#:fn-9427 #38=#:args-9428 #39=#:value-9429 -explainer- #16# (should-error (persist-save 'fred)) :form eql #17# :value persist-save ert-explainer :explanation apply ert--signal-should-execution] 6] ert--should-error-handle-error error append :fail-reason #18# #19# #20# #21# #22# #23# #24# #25# #26# #27# #28# #29# #30# #31# #32# #33# #34# #35# #36# #37# #38# #39# #16# #:form-description-fn-9433 #:errorp9432 -condition-] 6] test-persist-save-non-number "Test saving something that is not a number.\n\n`test-persist-save' missed " #[nil "\306\216\307\310\311 \211\312L\210\313\n\312\"\210\314\n!\210\315\316!\310\317\216\320\211)\204)\321\f!\210) \210)\322\3231?\324'\325\n!)C0\202K(\326(@(A)D)\327*\310+\330\216\331 )\"\211*)\203f\321+!\210)*\210+\n\332L\210\314\n!\210\322,\3331\206\324'\325\n!)C0\202\223(\326,(@(A)D-\334.\310/\335\216\331,-\"\211.)\204\257\321/!\210).\210+\3360\3371\331\324'\332\340\341!1r1q\210\342\216\343\325\n!!\210\344 ,D0\202\346(\3260(@(A)D2\3453\3104\346\216\33102\"\2113)\204\3214!\210)3.\207" [persist--symbols persist--directory-location sym #40=#:value-9434 #41=#:form-description-9435 #42=#:fn-9436 #[nil "\300\301\302\"\207" [delete-directory #8# t] 3] #9# nil cl-gensym "fred" persist-symbol persist-save gensym #4# #[nil "\302\303\304\305\257\306 !\207" [#40# #41# (should t) :form t :value ert--signal-should-execution] 5] t ert-fail file-exists-p (error) ert--should-signal-hook persist--file-location signal #43=#:ert-form-evaluation-aborted-9439 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#42# #47=#:args-9437 #48=#:value-9438 -explainer- #49=#:form-description-9440 (should-not (file-exists-p (persist--file-location sym))) :form eql #43# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] apply "george" (error) #44=#:ert-form-evaluation-aborted-9444 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#50=#:fn-9441 #51=#:args-9442 #52=#:value-9443 -explainer- #53=#:form-description-9445 (should (file-exists-p (persist--file-location sym))) :form eql #44# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] string-match-p (error) generate-new-buffer #45# #[nil "\301!\205 \302!\207" [#55=#:temp-buffer buffer-name kill-buffer] 2] insert-file-contents buffer-string #46=#:ert-form-evaluation-aborted-9449 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#54=#:fn-9446 #56=#:args-9447 #57=#:value-9448 -explainer- #58=#:form-description-9450 (should (string-match-p "george" (with-temp-buffer (insert-file-contents (persist--file-location sym)) (buffer-string)))) :form eql #46# :value string-match-p ert-explainer :explanation apply ert--signal-should-execution] 6] signal-hook-function err #47# #48# #49# #50# #51# #52# #53# #54# #55# #56# #57# #58#] 5] test-persist-load #[nil "\306\216\307\310\311 \211\312L\210\313\n\314\"\210\315\n!\210\316\3171'\320\312\nJ)D0\2020\321 @ A)D\322\310 \323\216\324 \"\211)\204K\325 !\210)\210+\n\326L\210\316!\3271f\320\326\nJ)D0\202p\321! @ A)D\"\330#\310$\331\216\324!\"\"\211#)\204\214\325$!\210)#\210+\332\n!\210\316%\3331\247\320\312\nJ)D0\202\261\321% @ A)D&\334'\310(\335\216\324%&\"\211')\204\315\325(!\210)'.\207" [persist--symbols persist--directory-location sym #59=#:fn-9451 signal-hook-function err #[nil "\300\301\302\"\207" [delete-directory #8# t] 3] #9# nil cl-gensym 10 persist-symbol 1 persist-save equal (error) ert--should-signal-hook signal #60=#:ert-form-evaluation-aborted-9454 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#59# #63=#:args-9452 #64=#:value-9453 -explainer- #65=#:form-description-9455 (should (equal 10 (symbol-value sym))) :form eql #60# :value equal ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail 30 (error) #61=#:ert-form-evaluation-aborted-9459 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#66=#:fn-9456 #67=#:args-9457 #68=#:value-9458 -explainer- #69=#:form-description-9460 (should (equal 30 (symbol-value sym))) :form eql #61# :value equal ert-explainer :explanation apply ert--signal-should-execution] 6] persist-load (error) #62=#:ert-form-evaluation-aborted-9464 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#70=#:fn-9461 #71=#:args-9462 #72=#:value-9463 -explainer- #73=#:form-description-9465 (should (equal 10 (symbol-value sym))) :form eql #62# :value equal ert-explainer :explanation apply ert--signal-should-execution] 6] #63# #64# #65# #66# #67# #68# #69# #70# #71# #72# #73#] 4] test-persist-remove #[nil "\306\216\307\310\311 \312\3131\314\n)C0\202!\315 @ A)D\316\310\317\216\320 \"\211)\203<\321!\210)\210+\322\n\323\"\210\312\3241V\314\n)C0\202`\315 @ A)D\325 \310!\326\216\320\"\211 )\204|\321!!\210) \210+\327\n!\210\312\"\3301\225\314\n)C0\202\237\315\" @ A)D#\331$\310%\332\216\320\"#\"\211$)\203\273\321%!\210)$.\207" [persist--symbols persist--directory-location sym #74=#:fn-9466 signal-hook-function err #[nil "\300\301\302\"\207" [delete-directory #8# t] 3] #9# nil cl-gensym persist--persistant-p (error) ert--should-signal-hook signal #75=#:ert-form-evaluation-aborted-9469 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#74# #78=#:args-9467 #79=#:value-9468 -explainer- #80=#:form-description-9470 (should-not (persist--persistant-p sym)) :form eql #75# :value persist--persistant-p ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail persist-symbol 10 (error) #76=#:ert-form-evaluation-aborted-9474 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#81=#:fn-9471 #82=#:args-9472 #83=#:value-9473 -explainer- #84=#:form-description-9475 (should (persist--persistant-p sym)) :form eql #76# :value persist--persistant-p ert-explainer :explanation apply ert--signal-should-execution] 6] persist-unpersist (error) #77=#:ert-form-evaluation-aborted-9479 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#85=#:fn-9476 #86=#:args-9477 #87=#:value-9478 -explainer- #88=#:form-description-9480 (should-not (persist--persistant-p sym)) :form eql #77# :value persist--persistant-p ert-explainer :explanation apply ert--signal-should-execution] 6] #78# #79# #80# #81# #82# #83# #84# #85# #86# #87# #88#] 3] test-persist-defvar #[nil "\306\216\307\310\311\312!\210\313\314!\210\315\316\310\"\210\317\3201\321C0\202(\322 @ A)D\323\310 \324\216\325\n\f\"\211)\203?\326 !\210) \210+\317!\3271P\316C0\202Z\322! @ A)D\"\330#\310$\331\216\325!\"\"\211#)\204v\326$!\210)#\210+\332%\3331\217\334&\314\335\316!)D0\202\231\322% @ A)D'\336(\310)\337\216\325%'\"\211()\204\265\326)!\210)(.\207" [persist--symbols persist--directory-location #90=#:fn-9481 err #91=#:args-9482 #92=#:value-9483 #[nil "\300\301\302\"\207" [delete-directory #8# t] 3] #9# nil (lambda (#89=#:def-tmp-var) (defvar test-no-persist-variable #89# "docstring")) 10 (lambda (#89#) (defvar test-persist-variable #89# "docstring")) 20 persist--defvar-1 test-persist-variable persist--persistant-p (error) test-no-persist-variable signal #93=#:ert-form-evaluation-aborted-9484 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#90# #91# #92# -explainer- #96=#:form-description-9485 (should-not (persist--persistant-p 'test-no-persist-variable)) :form eql #93# :value persist--persistant-p ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail (error) #94=#:ert-form-evaluation-aborted-9489 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#97=#:fn-9486 #98=#:args-9487 #99=#:value-9488 -explainer- #100=#:form-description-9490 (should (persist--persistant-p 'test-persist-variable)) :form eql #94# :value persist--persistant-p ert-explainer :explanation apply ert--signal-should-execution] 6] = (error) ert--should-signal-hook persist-default #95=#:ert-form-evaluation-aborted-9494 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#101=#:fn-9491 #102=#:args-9492 #103=#:value-9493 -explainer- #104=#:form-description-9495 (should (= 20 (persist-default 'test-persist-variable))) :form eql #95# :value = ert-explainer :explanation apply ert--signal-should-execution] 6] #96# #97# #98# #99# #100# #101# signal-hook-function #102# #103# #104#] 3] test-persist-location #[nil "\306\216\307 \310\311\312\"\210\313L\210\314\313\"\210\315\311\"\210\316\3171/\320\321\322!\323\"\324!)D0\2028\325 @ A)D\326\3279\330\216\331 \f\"\211)\204O\3329!\210) \210+\333!\210\334:\3351i\320\324!)C0\202s\325: @ A)D;\336<\327=\337\216\331:;\"\211<)\203\217\332=!\210)<\210+\340L\210\333!\210\334>\3411\256\320\324!)C0\202\270\325> @ A)D?\342@\327A\343\216\331>?\"\211@)\204\324\332A!\210)@\210+\344B\3451\375\320\346\347\350!CrCq\210\351\216\352\324!!\210\353 ,D0\202\325B @ A)DD\354E\327F\355\216\331BD\"\211E)\204#\332F!\210)E\210+\333G\35615\357C0\202?\325G @ A)DH\360I\327\211J\361KL\3621a\363\216\331GH\"\211I)0\202uM\312L\364KM\365\327$\210M\211I)\210L\204\206\332\366K \367\370D\"!\210+I-\207" [sym #105=#:fn-9496 signal-hook-function err #106=#:args-9497 #107=#:value-9498 #[nil "\300\301\302\"\207" [delete-directory "./persist-defined-location" t] 3] cl-gensym delete-directory "./persist-defined-location" t 10 persist-symbol persist-location equal (error) ert--should-signal-hook expand-file-name symbol-name #108="./persist-defined-location/" persist--file-location signal #109=#:ert-form-evaluation-aborted-9499 nil #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#105# #106# #107# -explainer- #116=#:form-description-9500 (should (equal (expand-file-name (symbol-name sym) #108#) (persist--file-location sym))) :form eql #109# :value equal ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail persist-save file-exists-p (error) #110=#:ert-form-evaluation-aborted-9504 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#117=#:fn-9501 #118=#:args-9502 #119=#:value-9503 -explainer- #120=#:form-description-9505 (should-not (file-exists-p (persist--file-location sym))) :form eql #110# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] 20 (error) #111=#:ert-form-evaluation-aborted-9509 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#121=#:fn-9506 #122=#:args-9507 #123=#:value-9508 -explainer- #124=#:form-description-9510 (should (file-exists-p (persist--file-location sym))) :form eql #111# :value file-exists-p ert-explainer :explanation apply ert--signal-should-execution] 6] string-match-p (error) #112="20" generate-new-buffer #45# #[nil "\301!\205 \302!\207" [#126=#:temp-buffer buffer-name kill-buffer] 2] insert-file-contents buffer-string #113=#:ert-form-evaluation-aborted-9514 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#125=#:fn-9511 #127=#:args-9512 #128=#:value-9513 -explainer- #129=#:form-description-9515 (should (string-match-p #112# (with-temp-buffer (insert-file-contents (persist--file-location sym)) (buffer-string)))) :form eql #113# :value string-match-p ert-explainer :explanation apply ert--signal-should-execution] 6] (error) fred #115=#:ert-form-evaluation-aborted-9519 #[nil "\207" [#114=#:form-description-9520] 1] (error) #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#130=#:fn-9516 #131=#:args-9517 #132=#:value-9518 -explainer- #114# (should-error (persist-save 'fred)) :form eql #115# :value persist-save ert-explainer :explanation apply ert--signal-should-execution] 6] ert--should-error-handle-error error append :fail-reason #18# #116# #117# #118# #119# #120# #121# #122# #123# #124# #125# #126# #127# #128# #129# #130# #131# #132# #114# #:form-description-fn-9522 #:errorp9521 -condition-] 6]] 10)