X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/3aaa9f3043c962c5b2a2473e86fec23cf0d01c20..089d51a0c3289ac17864724f966e75f7a7fec6ab:/packages/adaptive-wrap/adaptive-wrap.el diff --git a/packages/adaptive-wrap/adaptive-wrap.el b/packages/adaptive-wrap/adaptive-wrap.el index 3787a992d..9455789d6 100644 --- a/packages/adaptive-wrap/adaptive-wrap.el +++ b/packages/adaptive-wrap/adaptive-wrap.el @@ -96,7 +96,13 @@ extra indent = 2 :lighter "" :group 'visual-line (if adaptive-wrap-prefix-mode - (jit-lock-register #'adaptive-wrap-prefix-function) + (progn + ;; HACK ATTACK! We need to run after font-lock, but jit-lock-register + ;; doesn't accept an `append' argument, so we add ourselves beforehand, + ;; to make sure we're at the end of the hook (bug#15155). + (add-hook 'jit-lock-functions + #'adaptive-wrap-prefix-function 'append t) + (jit-lock-register #'adaptive-wrap-prefix-function)) (jit-lock-unregister #'adaptive-wrap-prefix-function) (with-silent-modifications (save-restriction