;ELC   
;;; Compiled
;;; in Emacs version 29.3
;;; with all optimizations.



(require 'compat)#@36 The location of persist directory.
(defvar persist--directory-location (locate-user-emacs-file "persist") (#$ . 101))#@29 List of symbols to persist.
(defvar persist--symbols nil (#$ . 224))#@197 Special hook run on loading a variable.

Hook functions are called with two values: the symbol and the
value it will be set to.  If any function returns nil, the
variable is not set to the value.
(defvar persist-load-hook nil (#$ . 299))#@73 Return the file name at which SYMBOL does or will persist.

(fn SYMBOL)
(defalias 'persist--file-location #[257 "\301\302!\303N\206 \"\207" [persist--directory-location expand-file-name symbol-name persist-location] 5 (#$ . 542)])#@64 Set symbol up for persistence.

(fn SYMBOL LOCATION INITVALUE)
(defalias 'persist--defvar-1 #[771 "\203	 \300\"\210\301\"\210\302!\207" [persist-location persist-symbol persist-load] 6 (#$ . 782)])#@395 Define SYMBOL as a persistent variable and return SYMBOL.

This form is nearly equivalent to `defvar', except that the
variable persists between Emacs sessions.  When this form is
evaluated, the variable's default value is always set to
INITVALUE.

It does not support the optional parameters.  Both INITVALUE and
DOCSTRING need to be given.

(fn SYMBOL INITVALUE DOCSTRING &optional LOCATION)
(defalias 'persist-defvar '(macro . #[1027 "\300\301F\302\303DF\303DF\207" [progn defvar persist--defvar-1 quote] 10 (#$ . 992)]))
(byte-code "\300\301\302\303#\210\304\301\305\306#\304\301\307\310#\300\207" [put persist-defvar edebug-form-spec (symbolp form stringp &optional form) function-put doc-string-elt 3 lisp-indent-function defun] 5)#@250 Set the directory for persisting the value of symbol.

This does not force the loading of value from this directory, so
to persist a variable, you will normally need to call
`persist-load' to load a previously saved location.

(fn SYMBOL DIRECTORY)
(defalias 'persist-location #[514 "\300\301\302!#\207" [put persist-location expand-file-name] 7 (#$ . 1746)])#@388 Make SYMBOL a persistent variable.

INITVALUE is the value to which SYMBOL will be set if `persist-reset' is
called.  INITVALUE is set for the session and will itself not persist
across sessions.

This does force the loading of value from this directory, so to
persist a variable, you will normally need to call `persist-load'
to load a previously saved location.

(fn SYMBOL INITVALUE)
(defalias 'persist-symbol #[514 "\235\203 \210\202 B\301\302\303#\210\301\304\305!#\207" [persist--symbols put persist t persist-default persist-copy] 7 (#$ . 2114)])#@65 Return non-nil if SYMBOL is a persistent variable.

(fn SYMBOL)
(defalias 'persist--persistant-p #[257 "\211\300N\207" [persist] 3 (#$ . 2684)])#@147 Save SYMBOL now.

Normally, it should not be necessary to call this explicitly, as
variables persist automatically when Emacs exits.

(fn SYMBOL)
(defalias 'persist-save #[257 "\306!\204 \307\310\311\"!\210\312!\313J\314!\"\203$ \315!\205^ \316!\207\317!\315!\2041 \320!\210\321\322\323\"r\211q\210\324\325\"\216\326\211\211\323\211\211\327Jp\".\210\330ed\326\331%*\262\262\207" [print-circle print-escape-nonascii print-escape-control-characters print-quoted print-length print-level persist--persistant-p error format "Symbol %s is not persistent" persist--file-location persist-equal persist-default file-exists-p delete-file file-name-directory mkdir generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] nil print write-region quiet] 10 (#$ . 2835)])#@51 Return the default value for SYMBOL.

(fn SYMBOL)
(defalias 'persist-default #[257 "\211\300N\207" [persist-default] 3 (#$ . 3677)])#@64 Set the value of SYMBOL to a copy of the default.

(fn SYMBOL)
(defalias 'persist-reset #[257 "\211\300\301!!L\207" [persist-copy persist-default] 5 (#$ . 3815)])#@46 Load the saved value of SYMBOL.

(fn SYMBOL)
(defalias 'persist-load #[257 "\300\301!!\205. \302\303\304\"r\211q\210\305\306\"\216\307\301!!\210\310p!\311\312#\205) L*\262\262\207" [file-exists-p persist--file-location generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents read run-hook-with-args-until-failure persist-load-hook] 7 (#$ . 3984)])#@105 Stop the value in SYMBOL from persisting.

This does not remove any saved value of SYMBOL.

(fn SYMBOL)
(defalias 'persist-unpersist #[257 "\301\302\303#\210\304\"\211\207" [persist--symbols put persist nil remove] 5 (#$ . 4424)])#@30 Save all persistent symbols.
(defalias 'persist--save-all #[0 "\301\302\"\207" [persist--symbols mapc persist-save] 3 (#$ . 4664)])
(add-hook 'kill-emacs-hook 'persist--save-all)#@251 Return non-nil when the values of A and B are equal.
A and B are compared using `equal' unless they are both hash
tables.  In that case, the following are compared:

- hash table count
- hash table predicate
- values, using `persist-equal'

(fn A B)
(defalias 'persist-equal #[514 "\300!\203/ \300!\203/ \301!\301!U\2052 \302!\302!=\2052 \3032. \304\305\306\"\"\210\3070\207\232\207" [hash-table-p hash-table-count hash-table-test done maphash make-closure #[514 "\301\302\300?#\"?\205 \303\304\305\"\207" [V0 persist-equal gethash throw done nil] 8 "\n\n(fn KEY A-VALUE)"] t] 6 (#$ . 4850)])#@31 Return copy of OBJ.

(fn OBJ)
(defalias 'persist-copy #[257 "\300!\203\n \301!\207\302\303\"\207" [hash-table-p copy-hash-table compat--copy-tree t] 4 (#$ . 5462)])
(provide 'persist)
