all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to iterate over properties in a plist?
@ 2015-07-31 21:42 Marcin Borkowski
  2015-07-31 22:18 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Borkowski @ 2015-07-31 21:42 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi all,

I need to iterate over all properties in a plist.  Obviously, mapcar (or
mapc, since I need side effects only) is of no use for me.  I can easily
write a plist-mapc function:

--8<---------------cut here---------------start------------->8---
(defun plist-mapc (function plist)
  "Iterate FUNCTION (a two-argument function) over PLIST.  Error
checking is for weenies."
  (when plist
    (funcall function (car plist) (cadr plist))
    (plist-mapc function (cddr plist))))
--8<---------------cut here---------------end--------------->8---

but maybe it's there already?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-01 22:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.7702.1438378982.904.help-gnu-emacs@gnu.org>
2015-07-31 23:34 ` How to iterate over properties in a plist? Pascal J. Bourguignon
2015-07-31 21:42 Marcin Borkowski
2015-07-31 22:18 ` Stefan Monnier
2015-07-31 22:29   ` Marcin Borkowski
2015-07-31 22:42     ` Dmitry Gutov
2015-08-01 13:34       ` Michael Heerdegen
     [not found]   ` <mailman.7705.1438381807.904.help-gnu-emacs@gnu.org>
2015-07-31 23:33     ` Pascal J. Bourguignon
2015-08-01 22:49       ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.