Pārlūkot izejas kodu

Merge branch 'origin-maint'

Eric Schulte 13 gadi atpakaļ
vecāks
revīzija
ce5c5d896b
1 mainītis faili ar 6 papildinājumiem un 5 dzēšanām
  1. 6 5
      lisp/org.el

+ 6 - 5
lisp/org.el

@@ -4447,11 +4447,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."
-  (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))
+  (let* ((appending (string= "+" (substring key (- (length key) 1))))
+	 (key (if appending (substring key 0 (- (length key) 1)) key))
+	 (remainder (org-remove-if (lambda (p) (string= (car p) key)) props))
+	 (previous (cdr (assoc key props))))
+    (if appending
+	(cons (cons key (if previous (concat previous " " val) val)) remainder)
       (cons (cons key val) remainder))))
 
 (defconst org-block-regexp