Prevent adding of extra space to value if property already exists

* org.el (org-entry-put): Prevent adding of extra space to value if
  property already exists.

Fixes a regression reported by Wujun Zhou.
This commit is contained in:
David Maus 2011-05-24 20:55:35 +02:00
parent 7c4360823a
commit b6384bbcbe
1 changed files with 4 additions and 4 deletions

View File

@ -13900,13 +13900,13 @@ and the new value.")
(if (re-search-forward (if (re-search-forward
(org-re-property property) (cdr range) t) (org-re-property property) (cdr range) t)
(progn (progn
(delete-region (match-beginning 1) (match-end 1)) (delete-region (match-beginning 0) (match-end 0))
(goto-char (match-beginning 1))) (goto-char (match-beginning 0)))
(goto-char (cdr range)) (goto-char (cdr range))
(insert "\n") (insert "\n")
(backward-char 1) (backward-char 1)
(org-indent-line-function) (org-indent-line-function))
(insert ":" property ":")) (insert ":" property ":")
(and value (insert " " value)) (and value (insert " " value))
(org-indent-line-function))))) (org-indent-line-function)))))
(run-hook-with-args 'org-property-changed-functions property value))) (run-hook-with-args 'org-property-changed-functions property value)))