Use `org-element-type-p'
This commit is contained in:
16
ox-rst.el
16
ox-rst.el
@@ -385,7 +385,7 @@ the title.
|
|||||||
|
|
||||||
When optional argument TOC is non-nil, use optional title if
|
When optional argument TOC is non-nil, use optional title if
|
||||||
possible. It doesn't apply to `inlinetask' elements."
|
possible. It doesn't apply to `inlinetask' elements."
|
||||||
(let* ((headlinep (eq (org-element-type element) 'headline))
|
(let* ((headlinep (org-element-type-p element 'headline))
|
||||||
(numbers
|
(numbers
|
||||||
;; Numbering is specific to headlines.
|
;; Numbering is specific to headlines.
|
||||||
(and headlinep (org-export-numbered-headline-p element info)
|
(and headlinep (org-export-numbered-headline-p element info)
|
||||||
@@ -837,7 +837,7 @@ a communication channel."
|
|||||||
(if tag tag (concat bullet checkbox))
|
(if tag tag (concat bullet checkbox))
|
||||||
(let ((contents (org-rst--indent-string contents width)))
|
(let ((contents (org-rst--indent-string contents width)))
|
||||||
(if (and (not tag)
|
(if (and (not tag)
|
||||||
(eq (org-element-type (car (org-element-contents item))) 'paragraph))
|
(org-element-type-p (car (org-element-contents item)) 'paragraph))
|
||||||
(org-trim contents)
|
(org-trim contents)
|
||||||
(concat "\n" contents))))))
|
(concat "\n" contents))))))
|
||||||
|
|
||||||
@@ -980,7 +980,7 @@ INFO is a plist holding contextual information."
|
|||||||
;; attributes cannot be set on a per link basis.
|
;; attributes cannot be set on a per link basis.
|
||||||
(let* ((parent (org-export-get-parent-element link))
|
(let* ((parent (org-export-get-parent-element link))
|
||||||
(link (let ((container (org-export-get-parent link)))
|
(link (let ((container (org-export-get-parent link)))
|
||||||
(if (and (eq 'link (org-element-type container))
|
(if (and (org-element-type-p container 'link)
|
||||||
(org-rst-inline-image-p link info))
|
(org-rst-inline-image-p link info))
|
||||||
container
|
container
|
||||||
link))))
|
link))))
|
||||||
@@ -1195,8 +1195,8 @@ containing export options. Modify DATA by side-effect and return it."
|
|||||||
(org-element-map data '(entity latex-fragment subscript superscript)
|
(org-element-map data '(entity latex-fragment subscript superscript)
|
||||||
(lambda (object)
|
(lambda (object)
|
||||||
;; Skip objects already wrapped.
|
;; Skip objects already wrapped.
|
||||||
(when (and (not (eq (org-element-type
|
(when (and (not (org-element-type-p
|
||||||
(org-element-property :parent object))
|
(org-element-property :parent object)
|
||||||
'latex-math-block))
|
'latex-math-block))
|
||||||
(funcall valid-object-p object))
|
(funcall valid-object-p object))
|
||||||
(let ((math-block (list 'latex-math-block nil))
|
(let ((math-block (list 'latex-math-block nil))
|
||||||
@@ -1613,8 +1613,8 @@ back-end used. INFO is a plist used as a communication channel.
|
|||||||
Assume BACKEND is `rst'."
|
Assume BACKEND is `rst'."
|
||||||
(org-element-map tree org-element-all-elements
|
(org-element-map tree org-element-all-elements
|
||||||
(lambda (elem)
|
(lambda (elem)
|
||||||
(unless (or (eq (org-element-type elem) 'org-data)
|
(unless (or (org-element-type-p elem 'org-data)
|
||||||
(eq (org-element-type elem) 'table-row))
|
(org-element-type-p elem 'table-row))
|
||||||
(org-element-put-property
|
(org-element-put-property
|
||||||
elem :post-blank
|
elem :post-blank
|
||||||
(let ((post-blank (org-element-property :post-blank elem)))
|
(let ((post-blank (org-element-property :post-blank elem)))
|
||||||
@@ -1646,7 +1646,7 @@ See `org-rst-paragraph-spacing' for information."
|
|||||||
(when (wholenump org-rst-paragraph-spacing)
|
(when (wholenump org-rst-paragraph-spacing)
|
||||||
(org-element-map tree 'paragraph
|
(org-element-map tree 'paragraph
|
||||||
(lambda (p)
|
(lambda (p)
|
||||||
(when (eq (org-element-type (org-export-get-next-element p info))
|
(when (org-element-type-p (org-export-get-next-element p info)
|
||||||
'paragraph)
|
'paragraph)
|
||||||
(org-element-put-property
|
(org-element-put-property
|
||||||
p :post-blank org-rst-paragraph-spacing)))))
|
p :post-blank org-rst-paragraph-spacing)))))
|
||||||
|
|||||||
Reference in New Issue
Block a user