branch: externals/valign
commit ef090ad1ef4a99eb126c27d2911dbc5872ead732
Author: Yuan Fu <[email protected]>
Commit: Yuan Fu <[email protected]>
* valign.el (valign--org-mode-hook): Put our hook at the end.
---
valign.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/valign.el b/valign.el
index 17f1f9b..5184a4b 100644
--- a/valign.el
+++ b/valign.el
@@ -630,7 +630,9 @@ for the former, and 'multi-column for the latter."
(defun valign--org-mode-hook ()
"Valign hook function used by `org-mode'."
- (jit-lock-register #'valign-initial-alignment))
+ ;; Our alignment function should run after font-lock, so it’s
+ ;; text properties are not mangled by that of font-lock.
+ (add-hook 'jit-lock-functions #'valign-initial-alignment 98 t))
(defun valign-table-quite ()
"Align table but don’t emit any errors."