summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Maus <dmaus@ictsoc.de>2011-08-10 08:14:26 +0200
committerDavid Maus <dmaus@ictsoc.de>2011-08-10 09:43:57 +0200
commit7d5fb7ff3859b691443031c406f5202154b76689 (patch)
tree36d2d83745ef06a00f6763e8028642c0fb90f010
parentb471e56a3e93d402b93a4253df037497b5cec28d (diff)
downloadorg-mode-7d5fb7ff3859b691443031c406f5202154b76689.tar.gz
New function: Return alist based on flat list
* org-macs.el (org-make-parameter-alist): New function. Turn flat list of alternating symbol names and values into an alist with symbol name in car and value in cdr.
-rw-r--r--lisp/org-macs.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index beb1f99..a4db2a1 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -386,6 +386,15 @@ The number of levels is controlled by `org-inlinetask-min-level'"
`(eval (list 'let ,environment ',form)))
(put 'org-eval-in-environment 'lisp-indent-function 1)
+(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)))))
+
(provide 'org-macs)
;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668