Enable multiline fontification when appropriate

This commit is contained in:
TEC 2022-08-06 23:21:01 +08:00
parent 278d8146fb
commit 50e7446191
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 2 additions and 1 deletions

View File

@ -1668,7 +1668,8 @@ This should only be run as an export hook."
(defun org-glossary--fontify-find-next (&optional limit)
"Find any next occurance of a term reference, for fontification."
(let (match-p exit element-at-point element-context)
(let ((search-spaces-regexp (and font-lock-multiline "[ \t\n][ \t]*"))
match-p exit element-at-point element-context)
(while (and (not exit) (if limit (< (point) limit) t))
(setq exit (null (org-glossary--mrx-search-forward
org-glossary--term-mrx limit)))