forked from mirrors/org-mode
org-element-ast: New function `org-element-put-property-2'
* lisp/org-element-ast.el (org-element-put-property-2): New function allowing to pass NODE as the last argument.
This commit is contained in:
parent
80122a1204
commit
ae49451364
|
@ -466,6 +466,11 @@ Return modified NODE."
|
||||||
(setcar (cdr ,node) (plist-put (nth 1 ,node) ,property ,value)))))
|
(setcar (cdr ,node) (plist-put (nth 1 ,node) ,property ,value)))))
|
||||||
,node))))))
|
,node))))))
|
||||||
|
|
||||||
|
(define-inline org-element-put-property-2 (property value node)
|
||||||
|
"Like `org-element-put-property', but NODE is the last argument.
|
||||||
|
See `org-element-put-property' for the meaning of PROPERTY and VALUE."
|
||||||
|
(inline-quote (org-element-put-property ,node ,property ,value)))
|
||||||
|
|
||||||
(defun org-element--property (property node &optional dflt force-undefer)
|
(defun org-element--property (property node &optional dflt force-undefer)
|
||||||
"Extract the value from the PROPERTY of a NODE.
|
"Extract the value from the PROPERTY of a NODE.
|
||||||
Return DFLT when PROPERTY is not present.
|
Return DFLT when PROPERTY is not present.
|
||||||
|
|
Loading…
Reference in a new issue