Fix match-data saving in within-definition check

This commit is contained in:
TEC 2024-06-09 11:04:21 +08:00
parent 9db9c9fbff
commit 7759159297
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 3 additions and 2 deletions

View File

@ -893,8 +893,9 @@ expression too big\"' is seen with around 1000+ terms.")
(if (and (eq 'headline (org-element-type datum))
(org-glossary--definition-heading-p datum))
t
(org-glossary--within-definition-p
(save-match-data (org-element-lineage datum '(headline)))))))
(save-match-data
(org-glossary--within-definition-p
(org-element-lineage datum '(headline)))))))
(defun org-glossary--definition-heading-p (heading)
"Whether HEADING is recognised as a definition heading."