2

Problem

When trying to browse documentation in M-x infoC-h i, the table of contents is not correctly aligned. One would expect

* Introduction     This is the etc etc etc etc etc .
* Details          Bla bla bla bla bla bla bla
                     bla bla bla bla bla.
* More             Yada yada yada yada.

but gets

* Introduction This is the etc etc etc etc etc .
* Details Bla bla bla bla bla bla bla
bla bla bla bla bla.
* More Yada yada yada yada.

Solution

Check the value of C-h v font-lock-extra-managed-props, see detailed answer below.

2

In my case the origin of the issue was the variable font-lock-extra-managed-props, which I had set in a fontification hack in latex-mode-hook

(push 'display font-lock-extra-managed-props)
(push 'composition font-lock-extra-managed-props)

The variable allows font-lock-mode to remove text properties before it refontifies a region; When a mode uses font-lock with non-standard text-properties – such as the 'display property used by prettify-symbols-mode – this is required for cleanup.

However, additions to this list must be set buffer-local, as otherwise they may interfere with other modes. In my case, it broke the formatting of info-mode, which probably formats each buffer only once rather than on-the-fly with font-lock. In my case, this lead to the fix

(make-local-variable 'font-lock-extra-managed-props)
(push 'display font-lock-extra-managed-props)
(push 'composition font-lock-extra-managed-props)

Because the issue occurred only when opening latex files, the origin became hard to track down, as I used info mode and latex files rarely shortly after another.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.