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. 61c61a0815c48df81e175


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 61c61a0815c48df81e1750bf76c14f129486779f
Date: Thu, 25 Sep 2014 19:50:50 +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  61c61a0815c48df81e1750bf76c14f129486779f (commit)
      from  25887f8f74710cf927fc91592ff9d347c0432a07 (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 61c61a0815c48df81e1750bf76c14f129486779f
Author: Tassilo Horn <address@hidden>
Date:   Thu Sep 25 21:49:53 2014 +0200

    Fix \end buffer position passed to hooks.
    
    * latex.el (LaTeX-insert-environment): Pass correct \end buffer
    position to hooks in LaTeX-after-insert-env-hooks.

diff --git a/ChangeLog b/ChangeLog
index ca4d1e6..4a88c13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-25  Tassilo Horn  <address@hidden>
+
+       * latex.el (LaTeX-insert-environment): Pass correct \end buffer
+       position to hooks in LaTeX-after-insert-env-hooks.
+
 2014-09-13  Vincent Belaïche  <address@hidden>
 
        * latex.el (LaTeX-dialect): Correct doctstring for consistency
diff --git a/latex.el b/latex.el
index 32a431f..aa755c9 100644
--- a/latex.el
+++ b/latex.el
@@ -695,7 +695,6 @@ environment just inserted, the buffer position just before
       (newline))
     (when active-mark (goto-char (mark)))
     (when prefix (insert prefix))
-    (setq env-end (point))
     (insert TeX-esc "end" TeX-grop environment TeX-grcl)
     (end-of-line 0)
     (if active-mark
@@ -706,6 +705,11 @@ environment just inserted, the buffer position just before
       (indent-according-to-mode))
     (save-excursion (beginning-of-line 2) (indent-according-to-mode))
     (TeX-math-input-method-off)
+    (setq env-end (save-excursion
+                   (search-forward
+                    (concat TeX-esc "end" TeX-grop
+                            environment TeX-grcl))
+                   (match-beginning 0)))
     (run-hook-with-args 'LaTeX-after-insert-env-hooks
                        environment env-start env-end)))
 

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

Summary of changes:
 ChangeLog |    5 +++++
 latex.el  |    6 +++++-
 2 files changed, 10 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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