Subject: bug#36358: Indentation of not matched braces in latex-mode

From: Sebastian Urban <[email-masked]>
Date: Mon, 24 Jun 2019 18:08:45 +0200

If I use 'fill-paragraph' (M-q) on paragraph, inside things like
\footnote{} or \emph{}, if they're long, text is indented with 2
spaces - look below.  I was able to overcome this by setting
'tex-indent-basic' from 2 to 0, but I think it will affect other
indentations I may want.  Perhaps adding another variable to control
this kind of indentation would be good idea?  AUCTEX has:

      User Option: TeX-brace-indent-level
      - Number of spaces to add to the indentation for each '{' not
        matched by a '}'.

So maybe we could "borrow" it from them?

Lacus tincidunt ultrices.  Lorem ipsum dolor sit amet, consectetuer
adipiscing elit.\footnote{Quisque ullamcorper placerat ipsum.  Cras
   nibh.  Morbi vel justo vitae lacus tincidunt ultrices.  Lorem ipsum
   dolor sit amet, consectetuer adipiscing elit.}  In hac habitasse
platea dictumst.  Integer tempus convallis augue.  Etiam facilisis.
Nunc elementum fermentum wisi.  Integer tempus convallis augue.

S. U.

In GNU Emacs 26.2 (build 1, i686-w64-mingw32)
  of 2019-04-13 built on CIRROCUMULUS
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor 'Microsoft Corp.', version 6.1.7601