Hi, Once the mode is activated, introducing newlines at key places should make the formula readable. You can also use sexp-navigation commands to quickly navigate the parentheses and find those key points. I'm not aware of any language mode which offers to automatically introduce line breaks in a long one-liner. Best wishes, Thibaut On 26/04/2022 11:40, Hongyi Zhao wrote: > On Tue, Apr 26, 2022 at 4:53 PM Robert Pluim wrote: >>>>>>> On Tue, 26 Apr 2022 16:42:26 +0800, Hongyi Zhao said: >> Hongyi> I've the following code snippets of the wolfram language: >> Hongyi> ``` >> Hongyi> Hold[ReplaceRepeated[List[A, B, IA, A, B, IA, A, B, IA, A, B, IA, A, >> Hongyi> B, IA], RuleDelayed[Condition[List[Pattern[x, BlankNullSequence[]], >> Hongyi> Pattern[y, Blank[]], Pattern[z, Blank[]], Pattern[t, >> Hongyi> BlankNullSequence[]]], Simplify[Equal[Dot[y, z], IdentityMatrix[3]]]], >> Hongyi> List[x, t]]]] >> Hongyi> ``` >> >> Hongyi> I want to format it in Emacs to improve readability. Any hints for >> Hongyi> achieving this purpose? >> >> Install wolfram-mode? > BTW, here [1] is a more recent and alternative version of > wolfram-mode, but it does not have the functions required for the > issues discussed here. > > [1] https://github.com/xahlee/xah-wolfram-mode > > HZ >