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

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

[elpa] 284/299: Fix \end buffer position passed to hooks.


From: Stefan Monnier
Subject: [elpa] 284/299: Fix \end buffer position passed to hooks.
Date: Sun, 02 Nov 2014 03:12:00 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

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.
---
 ChangeLog |    5 +++++
 latex.el  |    6 +++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

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)))
 



reply via email to

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