Subject: folding mode for Texinfo doesn't work reliably

From: Werner LEMBERG <[email-masked]>
Date: Thu, 11 May 2023 11:59:17 +0000 (UTC)

[commit 0cb158fd96ff8c1c7f0bf8c0dd152a301e82f562]

Consider this quite complicated Texinfo macro file from LilyPond's
documentation:

  https://gitlab.com/lilypond/lilypond/-/blob/master/Documentation/ca/macros.itexi

If I call `TeX-fold-buffer`, some macros like `rnotation` are
properly folded, but many others like `snippets` or `englishref` are
not.

It seems that the presence of a `@xxx` command within a macro causes
hiccups, but as `englishref` shows, other factors seem to play a role,
too.

Finally, I have a wish: It would be extremely helpful to have two more
commands for folding

* conditional blocks like `@iffoo ... @end iffoo`, and

* format-specific blocks like `@html ... @end html` or `@tex ... @end
  tex`.

     Werner