Fix latex item indent ignore LaTeX item indent
(#4516)
* Fix latex item indent ignore `LaTeX item indent` * Correct indentation & hanging braces Co-authored-by: Henrik Lissner <accounts@v0.io>
This commit is contained in:
parent
953f9246df
commit
bf5f3c5643
1 changed files with 7 additions and 2 deletions
|
@ -17,7 +17,7 @@ function uses."
|
||||||
(when (looking-at (concat re-beg re-env "}"))
|
(when (looking-at (concat re-beg re-env "}"))
|
||||||
(end-of-line))
|
(end-of-line))
|
||||||
(LaTeX-find-matching-begin)
|
(LaTeX-find-matching-begin)
|
||||||
(current-column)))
|
(+ LaTeX-item-indent (current-column))))
|
||||||
(contin (pcase +latex-indent-item-continuation-offset
|
(contin (pcase +latex-indent-item-continuation-offset
|
||||||
(`auto LaTeX-indent-level)
|
(`auto LaTeX-indent-level)
|
||||||
(`align 6)
|
(`align 6)
|
||||||
|
@ -29,13 +29,18 @@ function uses."
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(LaTeX-find-matching-begin)
|
(LaTeX-find-matching-begin)
|
||||||
(+ (current-column)
|
(+ (current-column)
|
||||||
|
LaTeX-item-indent
|
||||||
LaTeX-indent-level
|
LaTeX-indent-level
|
||||||
(if (looking-at (concat re-beg re-env "}"))
|
(if (looking-at (concat re-beg re-env "}"))
|
||||||
contin
|
contin
|
||||||
0))))
|
0))))
|
||||||
indent))
|
indent))
|
||||||
((looking-at (concat re-end re-env "}"))
|
((looking-at (concat re-end re-env "}"))
|
||||||
indent)
|
(save-excursion
|
||||||
|
(beginning-of-line)
|
||||||
|
(ignore-errors
|
||||||
|
(LaTeX-find-matching-begin)
|
||||||
|
(current-column))))
|
||||||
((looking-at "\\\\item")
|
((looking-at "\\\\item")
|
||||||
(+ LaTeX-indent-level indent))
|
(+ LaTeX-indent-level indent))
|
||||||
((+ contin LaTeX-indent-level indent))))))
|
((+ contin LaTeX-indent-level indent))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue