lisp/org-element-ast.el: Fix compile-time inline expansion

* lisp/org-element-ast.el (org-element--property-idx): Define inline
expansion within `eval-and-compile' to make sure that the expanded is
available at compile time.

See Emacs bug#68851.
This commit is contained in:
Stefan Monnier 2024-02-09 16:29:25 +01:00 committed by Ihor Radchenko
parent 8e2ed45bb1
commit ecb5b605d7
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 8 additions and 8 deletions

View File

@ -348,15 +348,15 @@ node types.")
(setq plist (plist-put plist property idx)))
org-element--standard-properties)
plist)
"Property list holding standard indexes for `org-element--standard-properties'."))
"Property list holding standard indexes for `org-element--standard-properties'.")
(define-inline org-element--property-idx (property)
"Return standard property index or nil."
(declare (pure t))
(inline-letevals (property)
(plist-get
org-element--standard-properties-idxs
(inline-const-val property))))
(define-inline org-element--property-idx (property)
"Return standard property index or nil."
(declare (pure t))
(inline-letevals (property)
(plist-get
org-element--standard-properties-idxs
(inline-const-val property)))))
(define-inline org-element--parray (node)
"Return standard property array for NODE."