Mercurial > emacs
changeset 98307:37a6a06b7e9a
(latex-find-indent): Try to handle
escaped close parens correctly. (Bug#954)
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Tue, 23 Sep 2008 06:15:24 +0000 |
parents | f4813edccb1f |
children | 9062732fe4b3 |
files | lisp/textmodes/tex-mode.el |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el Mon Sep 22 23:43:32 2008 +0000 +++ b/lisp/textmodes/tex-mode.el Tue Sep 23 06:15:24 2008 +0000 @@ -2585,8 +2585,11 @@ (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)