emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 31c42ca 23/35: Indent \[...\] display math as a


From: Tassilo Horn
Subject: [elpa] externals/auctex 31c42ca 23/35: Indent \[...\] display math as a normal environment.
Date: Sun, 22 Mar 2015 09:27:05 +0000

branch: externals/auctex
commit 31c42ca3e46faa0121299ff1a0e054b3701bde77
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Indent \[...\] display math as a normal environment.
    
    * latex.el (LaTeX-end-regexp): Add "\]".
    (LaTeX-indent-calculate): Indent "\[...\]" display math as a
    regular environment.
---
 ChangeLog |    6 ++++++
 latex.el  |    6 +++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1cebd1e..fb17b04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-09  Mos� Giordano  <address@hidden>
+
+       * latex.el (LaTeX-end-regexp): Add "\]".
+       (LaTeX-indent-calculate): Indent "\[...\]" display math as a
+       regular environment.
+
 2015-03-08  Arash Esbati  <address@hidden>
 
        * Makefile.in (STYLESRC): Add new style.
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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]