org-element: Fix for affiliated keywords parsing

* lisp/org-element.el (org-element--collect-affiliated-keywords): Fix
  return value.
* testing/lisp/test-org-element.el: Add test.
This commit is contained in:
Nicolas Goaziou 2012-09-23 09:49:32 +02:00
parent 1fea5530e3
commit 393acf0df8
2 changed files with 7 additions and 1 deletions

View File

@ -3547,7 +3547,7 @@ position of point and CDR is nil."
;; They will be parsed as a paragraph.
(when (looking-at "[ \t]*$") (goto-char origin) (setq output nil))
;; Return value.
(cons (point) output))))
(cons origin output))))

View File

@ -165,6 +165,12 @@ Some other text
:name
(org-test-with-temp-text "#+NAME: para\nParagraph"
(org-element-at-point)))))
(should
(= 1
(org-element-property
:begin
(org-test-with-temp-text "#+NAME: para\nParagraph"
(org-element-at-point)))))
;; Parse multiple keywords.
(should
(equal