(setq item "HKEY_CURRENT_USER\\Software\\Data")
(mapcar '(lambda (x) (cons x (vl-registry-read item x))) (vl-registry-descendents item ""))
so
_1$(setq item "HKEY_CURRENT_USER\\Software\\Data")
(mapcar '(lambda (x) (list x (vl-registry-read item x))) (vl-registry-descendents item ""))
returns
(("Width" "134") ("Length1" "500") ("Length3" "530") ("Length2" "540"))
(setq item "HKEY_CURRENT_USER\\Software\\Data"
lst '("Length1" "Length2" "Length3")
) ;_ end of setq
(vl-remove-if-not
(function
(lambda (x)
(member (car x) lst)
) ;_ end of lambda
) ;_ end of function
(mapcar '(lambda (x) (cons x (vl-registry-read item x))) (vl-registry-descendents item ""))
) ;_ end of vl-remove-if-not
(mapcar
(function
(lambda (key)
(cons key (vl-registry-read item key))
) ;_ end of lambda
) ;_ end of function
'("Length1" "Length2" "Length3")
) ;_ end of mapcar
and more ways. Unfortunally i have no time to write them (and i think you can create some more ways and codes ;))
There are many ways to get what you want:Code: [Select](setq item "HKEY_CURRENT_USER\\Software\\Data"
lst '("Length1" "Length2" "Length3")
) ;_ end of setq
(vl-remove-if-not
(function
(lambda (x)
(member (car x) lst)
) ;_ end of lambda
) ;_ end of function
(mapcar '(lambda (x) (cons x (vl-registry-read item x))) (vl-registry-descendents item ""))
) ;_ end of vl-remove-if-notCode: [Select](mapcar
and more ways. Unfortunally i have no time to write them (and i think you can create some more ways and codes ;))
(function
(lambda (key)
(cons key (vl-registry-read item key))
) ;_ end of lambda
) ;_ end of function
'("Length1" "Length2" "Length3")
) ;_ end of mapcar
(mapcar
(function
(lambda (key)
(vl-registry-read item key)
) ;_ end of lambda
) ;_ end of function
'("Length1" "Length2" "Length3")
) ;_ end of mapcar
But i prefer to proceed with dotpairs and use assoc function: codes used this method are more scalable and clear.