org-export: Remove :point-max property

* contrib/lisp/org-export.el (org-export-last-sibling-p): Make use
  of :genealogy property instead.
(org-export-get-point-max): Removed function.
(org-export-collect-tree-properties): Remove :point-max property.
This commit is contained in:
Nicolas Goaziou 2012-01-18 23:45:02 +01:00
parent 0bd090379b
commit 46ff3b7a56
1 changed files with 3 additions and 23 deletions

View File

@ -654,10 +654,6 @@ standard mode."
;; - category :: global ;; - category :: global
;; - type :: list (as returned by `org-element-parse-buffer') ;; - type :: list (as returned by `org-element-parse-buffer')
;; + `point-max' :: Last ending position in the parse tree.
;; - category :: global
;; - type :: integer
;; + `preserve-breaks' :: Non-nil means transcoding should preserve ;; + `preserve-breaks' :: Non-nil means transcoding should preserve
;; all line breaks. ;; all line breaks.
;; - category :: option ;; - category :: option
@ -1115,8 +1111,6 @@ Following tree properties are set:
`:parse-tree' Whole parse tree. `:parse-tree' Whole parse tree.
`:point-max' Last position in the parse tree
`:target-list' List of all targets in the parse tree. `:target-list' List of all targets in the parse tree.
`:use-select-tags' Non-nil when parsed tree use a special tag to `:use-select-tags' Non-nil when parsed tree use a special tag to
@ -1136,7 +1130,6 @@ Following tree properties are set:
(nconc (nconc
`(:parse-tree `(:parse-tree
,data ,data
:point-max ,(org-export-get-point-max data info)
:target-list :target-list
,(org-element-map data 'target (lambda (target local) target) info) ,(org-element-map data 'target (lambda (target local) target) info)
:headline-numbering ,(org-export-collect-headline-numbering data info) :headline-numbering ,(org-export-collect-headline-numbering data info)
@ -1174,18 +1167,6 @@ OPTIONS is a plist holding export options."
;; minimum level to 1 nonetheless. ;; minimum level to 1 nonetheless.
(if (= min-level 10000) 1 min-level)))) (if (= min-level 10000) 1 min-level))))
(defun org-export-get-point-max (data options)
"Return last exportable ending position in DATA.
DATA is parsed tree as returned by `org-element-parse-buffer'.
OPTIONS is a plist holding export options."
(let ((pos-max 1))
(mapc (lambda (blob)
(unless (and (eq (car blob) 'headline)
(org-export-skip-p blob options))
(setq pos-max (org-element-get-property :end blob))))
(org-element-get-contents data))
pos-max))
(defun org-export-collect-headline-numbering (data options) (defun org-export-collect-headline-numbering (data options)
"Return numbering of all exportable headlines in a parse tree. "Return numbering of all exportable headlines in a parse tree.
@ -2113,10 +2094,9 @@ INFO is the plist used as a communication channel."
(defun org-export-last-sibling-p (headline info) (defun org-export-last-sibling-p (headline info)
"Non-nil when HEADLINE is the last sibling in its sub-tree. "Non-nil when HEADLINE is the last sibling in its sub-tree.
INFO is the plist used as a communication channel." INFO is the plist used as a communication channel."
(= (org-element-get-property :end headline) (equal
(or (org-element-get-property (car (last (org-element-get-contents (car (plist-get info :genealogy)))))
:end (org-export-get-parent-headline headline info)) headline))
(plist-get info :point-max))))
;;;; For Include Keywords ;;;; For Include Keywords