Open wyuenho opened 3 years ago
This is new. For me poly-rst-mode is unusuable in emacs 28. Both indentaion and fontlock were ok when I first wrote it.
Why is polymode overriding the host mode's indent-line-function and indent-region-function anyway?
Not really overwriting, but rather protecting and calling the original in a narrowed buffer. Host modes don't understand indentation of inner modes.
I'm on emacs 27
Reproduction:
.. code-block:: python
Expectation:
poly-rst-mode
should allow me to open a new line after the head without moving my point. It should treat the newline as part of the head because reStructuredText requires 3 newlines and an indentation to the column of the beginning of the directive (i.e. before the c of code-block) to go into code block parsing state.In essence, in a restructured text file:
I expect the string
.. code-block: python\n\n\n
to be the head, andpoly-rst-mode
should under no circumstances be interfering with how the host mode indents when I'm still typing the head.Why is polymode overriding the host mode's
indent-line-function
andindent-region-function
anyway?