org-export: Change signatures of first-sibling-p and last-sibling-p
* contrib/lisp/org-export.el (org-export-first-sibling-p, org-export-last-sibling-p): Remove communication channel from signature. * contrib/lisp/org-e-html.el (org-e-html-headline): Apply signature changes. * contrib/lisp/org-e-latex.el (org-e-latex-headline): Apply signature changes. * contrib/lisp/org-e-odt.el (org-e-odt-headline): Change code comments.
This commit is contained in:
parent
4dee3eb952
commit
f56e862b1e
|
@ -2116,10 +2116,10 @@ holding contextual information."
|
|||
(itemized-body (org-e-html-format-list-item
|
||||
contents type nil nil full-text)))
|
||||
(concat
|
||||
(and (org-export-first-sibling-p headline info)
|
||||
(and (org-export-first-sibling-p headline)
|
||||
(org-e-html-begin-plain-list type))
|
||||
itemized-body
|
||||
(and (org-export-last-sibling-p headline info)
|
||||
(and (org-export-last-sibling-p headline)
|
||||
(org-e-html-end-plain-list type)))))
|
||||
;; Case 3. Standard headline. Export it as a section.
|
||||
(t
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
(declare-function org-export-data "org-export" (data info))
|
||||
(declare-function org-export-directory "org-export" (type plist))
|
||||
(declare-function org-export-expand-macro "org-export" (macro info))
|
||||
(declare-function org-export-first-sibling-p "org-export" (headline info))
|
||||
(declare-function org-export-first-sibling-p "org-export" (headline))
|
||||
(declare-function org-export-footnote-first-reference-p "org-export"
|
||||
(footnote-reference info))
|
||||
(declare-function org-export-format-code "org-export"
|
||||
|
@ -61,7 +61,7 @@
|
|||
(declare-function org-export-unravel-code "org-export" (element))
|
||||
(declare-function org-export-inline-image-p "org-export"
|
||||
(link &optional extensions))
|
||||
(declare-function org-export-last-sibling-p "org-export" (headline info))
|
||||
(declare-function org-export-last-sibling-p "org-export" (headline))
|
||||
(declare-function org-export-low-level-p "org-export" (headline info))
|
||||
(declare-function org-export-output-file-name
|
||||
"org-export" (extension &optional subtreep pub-dir))
|
||||
|
@ -1277,14 +1277,14 @@ holding contextual information."
|
|||
(let ((low-level-body
|
||||
(concat
|
||||
;; If the headline is the first sibling, start a list.
|
||||
(when (org-export-first-sibling-p headline info)
|
||||
(when (org-export-first-sibling-p headline)
|
||||
(format "\\begin{%s}\n" (if numberedp 'enumerate 'itemize)))
|
||||
;; Itemize headline
|
||||
"\\item " full-text "\n" headline-label pre-blanks contents)))
|
||||
;; If headline is not the last sibling simply return
|
||||
;; LOW-LEVEL-BODY. Otherwise, also close the list, before any
|
||||
;; blank line.
|
||||
(if (not (org-export-last-sibling-p headline info)) low-level-body
|
||||
(if (not (org-export-last-sibling-p headline)) low-level-body
|
||||
(replace-regexp-in-string
|
||||
"[ \t\n]*\\'"
|
||||
(format "\n\\\\end{%s}" (if numberedp 'enumerate 'itemize))
|
||||
|
|
|
@ -2893,10 +2893,10 @@ holding contextual information."
|
|||
;; (itemized-body (org-e-odt-format-list-item
|
||||
;; contents type nil nil full-text)))
|
||||
;; (concat
|
||||
;; (and (org-export-first-sibling-p headline info)
|
||||
;; (and (org-export-first-sibling-p headline)
|
||||
;; (org-e-odt-begin-plain-list type))
|
||||
;; itemized-body
|
||||
;; (and (org-export-last-sibling-p headline info)
|
||||
;; (and (org-export-last-sibling-p headline)
|
||||
;; "</text:list>"))))
|
||||
;; Case 3. Standard headline. Export it as a section.
|
||||
(t
|
||||
|
|
|
@ -2882,15 +2882,13 @@ Any tag belonging to this list will also be removed."
|
|||
(member tag tags)))
|
||||
(org-element-property :tags element)))
|
||||
|
||||
(defun org-export-first-sibling-p (headline info)
|
||||
"Non-nil when HEADLINE is the first sibling in its sub-tree.
|
||||
INFO is the plist used as a communication channel."
|
||||
(defun org-export-first-sibling-p (headline)
|
||||
"Non-nil when HEADLINE is the first sibling in its sub-tree."
|
||||
(not (eq (org-element-type (org-export-get-previous-element headline))
|
||||
'headline)))
|
||||
|
||||
(defun org-export-last-sibling-p (headline info)
|
||||
"Non-nil when HEADLINE is the last sibling in its sub-tree.
|
||||
INFO is the plist used as a communication channel."
|
||||
(defun org-export-last-sibling-p (headline)
|
||||
"Non-nil when HEADLINE is the last sibling in its sub-tree."
|
||||
(not (org-export-get-next-element headline)))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue