summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2008-09-23 06:15:52 +0000
committerMartin Rudalics <rudalics@gmx.at>2008-09-23 06:15:52 +0000
commitee1751a5e8825dda9a11bff6656aaa5099c394c1 (patch)
tree64b4fb4d0d2b88339538d12d7ff8ad1a6718e68f /lisp
parent01163003d148e27fbd691203dac72ad6c8135747 (diff)
downloademacs-ee1751a5e8825dda9a11bff6656aaa5099c394c1.tar.gz
emacs-ee1751a5e8825dda9a11bff6656aaa5099c394c1.tar.bz2
emacs-ee1751a5e8825dda9a11bff6656aaa5099c394c1.zip
(latex-find-indent): Try to handle
escaped close parens correctly. (Bug#954)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/tex-mode.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6de4bd738d3..6798406eb42 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index cdb6e49a327..eeb562166cb 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -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)