auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 700587fe36b0104eba7dd


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 700587fe36b0104eba7dd30bef869ba3349a66d1
Date: Wed, 29 Oct 2014 16:48:01 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  700587fe36b0104eba7dd30bef869ba3349a66d1 (commit)
      from  9917ced65cb5679387f2fa858e8618f2d8a23f18 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 700587fe36b0104eba7dd30bef869ba3349a66d1
Author: Matthew Leach <address@hidden>
Date:   Wed Oct 29 17:46:24 2014 +0100

    Fix indentation of tabularx environment closing.
    
    * latex.el (LaTeX-indent-environment-list): Remove setter
    lambda.
    (LaTeX--tabular-like-end): Remove variable.
    (LaTeX-indent-tabular): Move setter function from
    LaTeX-indent-environment-list to generate tabular-end regex when
    called.
    
    Signed-off-by: Mosè Giordano <address@hidden>

diff --git a/ChangeLog b/ChangeLog
index 897a9b8..22813c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-10-29  Matthew Leach  <address@hidden>
+
+       * latex.el (LaTeX-indent-environment-list): Remove setter
+       lambda.
+       (LaTeX--tabular-like-end): Remove variable.
+       (LaTeX-indent-tabular): Move setter function from
+       LaTeX-indent-environment-list to generate tabular-end regex when
+       called.
+
 2014-10-29  Mosè Giordano  <address@hidden>
 
        * latex.el (LaTeX-largest-level-set): Set `outline-heading-alist'
diff --git a/latex.el b/latex.el
index 33e4720..b56abf3 100644
--- a/latex.el
+++ b/latex.el
@@ -2852,25 +2852,7 @@ The second element in each entry is the function to 
calculate the
 indentation level in columns."
     :group 'LaTeX-indentation
     :type '(repeat (list (string :tag "Environment")
-                        (option function)))
-    :set (lambda (symbol value)
-           (setq LaTeX--tabular-like-end
-                 (format "\\\\end{%s}"
-                         (regexp-opt
-                          (let (out)
-                            (mapc (lambda (x)
-                                    (when (eq (cadr x) 'LaTeX-indent-tabular)
-                                      (push (car x) out)))
-                                  value)
-                            out))))
-           (set-default symbol value)))
-
-(defvar LaTeX--tabular-like-end nil
-  "A regexp matching tabular-like environment ends.
-Those will be aligned with `LaTeX-indent-tabular'.
-
-Do not set this variable. This variable is auto-set
-by customizing `LaTeX-indent-environment-list'.")
+                        (option function))))
 
 (defcustom LaTeX-indent-environment-check t
   "*If non-nil, check for any special environments."
@@ -6311,23 +6293,33 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   "Return indent column for the current tabular-like line."
   (destructuring-bind (beg-pos . beg-col)
       (LaTeX-env-beginning-pos-col)
-    (cond ((looking-at LaTeX--tabular-like-end)
-           beg-col)
-
-          ((looking-at "\\\\\\\\")
-           (+ 2 beg-col))
-
-          ((looking-at "&")
-           (LaTeX-hanging-ampersand-position))
-
-          (t
-           (+ 2
-              (let ((any-col (save-excursion
-                               (when (re-search-backward "\\\\\\\\\\|&" 
beg-pos t)
-                                 (current-column)))))
-                (if (and any-col (string= "&" (match-string 0)))
-                    any-col
-                  beg-col)))))))
+    (let ((tabular-like-end-regex
+           (format "\\\\end{%s}"
+                   (regexp-opt
+                    (let (out)
+                      (mapcar (lambda (x)
+                              (when (eq (cadr x) 'LaTeX-indent-tabular)
+                                (push (car x) out)))
+                              LaTeX-indent-environment-list)
+                      (pp out)
+                      out)))))
+      (cond ((looking-at tabular-like-end-regex)
+             beg-col)
+
+            ((looking-at "\\\\\\\\")
+             (+ 2 beg-col))
+
+            ((looking-at "&")
+             (LaTeX-hanging-ampersand-position))
+
+            (t
+             (+ 2
+                (let ((any-col (save-excursion
+                                 (when (re-search-backward "\\\\\\\\\\|&" 
beg-pos t)
+                                   (current-column)))))
+                  (if (and any-col (string= "&" (match-string 0)))
+                      any-col
+                    beg-col))))))))
 
 (provide 'latex)
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    9 ++++++++
 latex.el  |   64 ++++++++++++++++++++++++++----------------------------------
 2 files changed, 37 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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