Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2013-11-10 10:25:17 +01:00
commit ca100eaa01
2 changed files with 10 additions and 6 deletions

View File

@ -1609,8 +1609,7 @@ Assume point is at comment beginning."
(point)))
(end (progn (goto-char com-end)
(skip-chars-forward " \r\t\n" limit)
(skip-chars-backward " \t")
(if (bolp) (point) (line-end-position)))))
(if (eobp) (point) (line-beginning-position)))))
(list 'comment
(nconc
(list :begin begin

View File

@ -360,15 +360,20 @@ Some other text
(should
(eq 1
(org-test-with-temp-text "#+keyword: value\n# comment\n#+keyword: value"
(length (org-element-map
(org-element-parse-buffer) 'comment 'identity)))))
(length (org-element-map (org-element-parse-buffer) 'comment
'identity)))))
(should
(equal "comment"
(org-test-with-temp-text "#+keyword: value\n# comment\n#+keyword: value"
(org-element-property
:value
(org-element-map
(org-element-parse-buffer) 'comment 'identity nil t))))))
(org-element-map (org-element-parse-buffer) 'comment
'identity nil t)))))
;; Correctly handle non-empty blank lines at the end of buffer.
(should
(org-test-with-temp-text "# A\n "
(goto-char (org-element-property :end (org-element-at-point)))
(eobp))))
;;;; Comment Block