Function: projection--declare-cache-var
projection--declare-cache-var is a natively compiled function defined
in projection-core-cache.el.
Signature
(projection--declare-cache-var KEY &key TITLE CATEGORY DESCRIPTION HIDE CACHE-VAR)
Documentation
Declare the properties of a cached project variable.
KEY should be a identifier for the variable as would be passed to
projection--cache-put. TITLE is what the user will be prompted with to select
KEY. CATEGORY is a minibuffer completion category. DESCRIPTION is a full text
description for the key. HIDE if set will not display this variable when it is
unset. CACHE-VAR is the symbol of the variable where KEY will be persisted. If
unset CACHE-VAR and CATEGORY will receive default values.
Source Code
;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-core-cache.el
(cl-defun projection--declare-cache-var (key &key title category description hide cache-var)
"Declare the properties of a cached project variable.
KEY should be a identifier for the variable as would be passed to
`projection--cache-put'. TITLE is what the user will be prompted with to select
KEY. CATEGORY is a minibuffer completion category. DESCRIPTION is a full text
description for the key. HIDE if set will not display this variable when it is
unset. CACHE-VAR is the symbol of the variable where KEY will be persisted. If
unset CACHE-VAR and CATEGORY will receive default values."
(declare (indent defun))
(or category (setq category "Project"))
(or cache-var (setq cache-var 'projection--project-cache))
(setf (alist-get key projection--cache-var-alist)
`(,@(when title (list :title title))
,@(when category (list :category category))
,@(when description (list :description description))
,@(when hide (list :hide hide))
,@(when cache-var (list :cache-var cache-var)))))