Function: plstore--merge-secret
plstore--merge-secret is a byte-compiled function defined in
plstore.el.gz.
Signature
(plstore--merge-secret PLSTORE)
Documentation
Determine the merged alist of PLSTORE.
Create the merged alist as a copy of the template alist with all placeholder properties that have corresponding properties in the secret alist replaced by their plain-text secret properties.
Source Code
;; Defined in /usr/src/emacs/lisp/plstore.el.gz
(defun plstore--merge-secret (plstore)
"Determine the merged alist of PLSTORE.
Create the merged alist as a copy of the template alist with all
placeholder properties that have corresponding properties in the
secret alist replaced by their plain-text secret properties."
(let ((alist (plstore--get-secret-alist plstore))
modified-alist
modified-plist
modified-entry
entry
plist
placeholder)
(plstore--set-merged-alist
plstore
(copy-tree (plstore--get-alist plstore)))
(setq modified-alist (plstore--get-merged-alist plstore))
(while alist
(setq entry (car alist)
alist (cdr alist)
plist (cdr entry)
modified-entry (assoc (car entry) modified-alist)
modified-plist (cdr modified-entry))
(while plist
;; Search for a placeholder property in the merged alist
;; corresponding to the current secret property.
(setq placeholder
(plist-member
modified-plist
(intern (concat ":secret-"
(substring (symbol-name (car plist)) 1)))))
;; Replace its name with the real, secret property name.
(if placeholder
(setcar placeholder (car plist)))
;; Update its value to the plain-text secret property value.
(setq modified-plist
(plist-put modified-plist (car plist) (car (cdr plist))))
(setq plist (nthcdr 2 plist)))
(setcdr modified-entry modified-plist))))