diff --git a/latex.el b/latex.el index fc5ebdb..c232c24 100644 --- a/latex.el +++ b/latex.el @@ -2948,7 +2948,7 @@ indentation level in columns." :group 'LaTeX-indentation :type 'regexp) -(defcustom LaTeX-end-regexp "end\\b" +(defcustom LaTeX-end-regexp "end\\b\\|\\]" "*Regexp matching macros considered ends." :group 'LaTeX-indentation :type 'regexp) @@ -3141,6 +3141,10 @@ outer indentation in case of a commented line. The symbols ;; End brace in the start of the line. (- (LaTeX-indent-calculate-last force-type) TeX-brace-indent-level)) + ((and (texmathp) + ;; Display math \[...\], treat as a generic environment. + (equal "\\[" (car texmathp-why))) + LaTeX-indent-level) (t (LaTeX-indent-calculate-last force-type)))))) (defun LaTeX-indent-level-count ()