如何让 face / text-property 在 batch 模式下生效?

最近写测试的时候遇到一个问题,font-lock-ensure 在 Emacs 25.1 上莫名的锁死:

⋊> emacs-25.1 --batch --eval "(with-temp-buffer
                                (python-mode)
                                (insert \"    '''dosctring'''\")
                                (font-lock-mode 1)
                                (font-lock-ensure))"

把 docstring 前面的空格取掉就能过了,我也不清楚为啥那个几空格是有什么魔法,能吃掉 100% 的CPU。

类似的问题在 27.0 仍然发生:https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-12/msg00602.html