From 04a3f7c9c69faa59f1d9c6343dbb22b3faad3d52 Mon Sep 17 00:00:00 2001 From: David Maus Date: Tue, 2 Aug 2011 15:43:15 +0200 Subject: [PATCH] New function: Return alist of parameters based on flat list * org-macs.el (org-make-parameter-alist): New function. Return alist of parameters based on flat list. --- lisp/org-macs.el | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 4062f07..7a0cc60 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -376,6 +376,15 @@ The number of levels is controlled by `org-inlinetask-min-level'" (format-seconds string seconds) (format-time-string string (seconds-to-time seconds)))) +(defun org-make-parameter-alist (flat) + "Return alist based on FLAT. +FLAT is a list with alternating symbol names and values. The +returned alist is a list of lists with the symbol name in car and +the value in cdr." + (when flat + (cons (list (car flat) (cadr flat)) + (org-make-parameter-alist (cddr flat))))) + (defmacro org-eval-in-environment (environment form) `(eval '(let ,environment ,form))) (put 'org-eval-in-environment 'lisp-indent-function 1) -- 1.7.2.5