From 369fa6d874d37db8174c425e18c5351ddb7a8f52 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 6 Jan 2012 11:20:11 -0700 Subject: [PATCH] only the last value for any specific property is kept * lisp/org.el (org-update-property-plist): Remove old instances of property when adding a new value for property. --- lisp/org.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 3b06347c6..748a2e334 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4446,12 +4446,12 @@ means to push this value onto the list in the variable.") (defun org-update-property-plist (key val props) "Update PROPS with KEY and VAL." - (if (string= "+" (substring key (- (length key) 1))) - (let* ((key (substring key 0 (- (length key) 1))) - (previous (cdr (assoc key props)))) - (cons (cons key (concat previous " " val)) - (org-remove-if (lambda (p) (string= (car p) key)) props))) - (cons (cons key val) props))) + (let ((remainder (org-remove-if (lambda (p) (string= (car p) key)) props))) + (if (string= "+" (substring key (- (length key) 1))) + (let* ((key (substring key 0 (- (length key) 1))) + (previous (cdr (assoc key props)))) + (cons (cons key (concat previous " " val)) remainder)) + (cons (cons key val) remainder)))) (defconst org-block-regexp "^[ \t]*#\\+begin_?\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_?\\1[ \t]*$"