Re: Print key-value pairs from both plist and alist
Heime <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <y16mSYKKfn3Mc_4DPXmCR9WYqgK3_YNhQ5sJ1dTXkQ_ys49yhzid1DIZ_8vSokUUuS6jggEwDjtxdZdRknKCOSieinbJ9JNpXAfTGWtY59w=@protonmail.com> |
On Saturday, April 11th, 2026 at 10:46 AM, [email protected] <[email protected]> wrote: > Heime <[email protected]> writes: > > >> > >> C-h P map: > >> > >> "map.el provides generic map-manipulation functions that work on > >> alists, plists, hash-tables, and arrays. All functions are > >> prefixed with "map-"." > >> > >> Some of the functions in this library: > >> > >> mapp > >> Function: Return non-nil if MAP is a map (alist/plist, hash-table, array,...). > >> > >> map-keys > >> Function: Return the list of keys in MAP. > >> > >> map-values > >> Function: Return the list of values in MAP. > >> > >> map-do > >> Function: Apply FUNCTION to each element of MAP and return nil. > > > > "C-h f map-do" did not give me anything > > > > 1. Check to see whether ‘map.el’ or ‘map.el.gz’ is in your > Emacs distribution’s lisp/emacs-lisp/ directory. M-x locate > ought to be able to find the location of one of these two > files. Also, M-x locate-library RET map RET ought to be > able to locate ‘map.elc’. For some reason I get "Can't find the locate command" > 2. Starting with ‘emacs -Q’ and then C-h f map-do as the first > key sequence should give a *Help* buffer with the following > contents: > > map-do is a byte-code-function in ‘map.el’. > > (map-do FUNCTION MAP) > > Apply FUNCTION to each element of MAP and return nil. > FUNCTION is called with two arguments, the key and the value. > > > This is a generic function. > > Implementations: > > (map-do FUNCTION (MAP array)) in ‘map.el’. > > Undocumented > > (map-do FUNCTION (MAP list)) in ‘map.el’. > > Undocumented > > (map-do FUNCTION (MAP hash-table)) in ‘map.el’. > > Undocumented > > -- > The lyf so short, the craft so long to lerne. > - Geoffrey Chaucer, The Parliament of Birds. >