]> git.eshelyaron.com Git - emacs.git/commitdiff
(latex-find-indent): Try to handle
authorMartin Rudalics <rudalics@gmx.at>
Tue, 23 Sep 2008 06:15:52 +0000 (06:15 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 23 Sep 2008 06:15:52 +0000 (06:15 +0000)
escaped close parens correctly.  (Bug#954)

lisp/ChangeLog
lisp/textmodes/tex-mode.el

index 6de4bd738d3846250e60a143cf19e406cbcad981..6798406eb42e0d8d5ccd4ed5cfe0c2f8188d9a73 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-23  Martin Rudalics  <rudalics@gmx.at>
+
+       * textmodes/tex-mode.el (latex-find-indent): Try to handle
+       escaped close parens correctly.  (Bug#954)
+
 2008-09-22  Tassilo Horn  <tassilo@member.fsf.org>
 
        * play/fortune.el (fortune-in-buffer): Fix a bug which forced
index cdb6e49a327a9b2afe22460bc76d6b5e136a7144..eeb562166cb3f1a2f4ba4abb6b94137bd99a8697 100644 (file)
@@ -2585,8 +2585,11 @@ There might be text before point."
      (and (looking-at "\\\\\\(begin\\|end\\) *{\\([^\n}]+\\)")
          (member (match-string 2) tex-verbatim-environments)
          0)
-     ;; Put leading close-paren where the matching open brace would be.
-     (and (eq (latex-syntax-after) ?\))
+     ;; Put leading close-paren where the matching open paren would be.
+     (and (or (eq (latex-syntax-after) ?\))
+             ;; Try to handle escaped close parens.
+             (and (looking-at "\\\\\\([])}]\\)")
+                  (goto-char (match-beginning 1))))
          (ignore-errors
            (save-excursion
              (latex-skip-close-parens)