# HG changeset patch # User Martin Rudalics # Date 1222158344 0 # Node ID d8a3b46ba29298d639a9c29688828185624d6d23 # Parent 9ca3cb5f9df9a6bdcbcd1328b0347344d6433fef (latex-find-indent): ... and handle conjunction correctly this time. diff -r 9ca3cb5f9df9 -r d8a3b46ba292 lisp/textmodes/tex-mode.el --- a/lisp/textmodes/tex-mode.el Tue Sep 23 07:06:12 2008 +0000 +++ b/lisp/textmodes/tex-mode.el Tue Sep 23 08:25:44 2008 +0000 @@ -2586,18 +2586,18 @@ (member (match-string 2) tex-verbatim-environments) 0) ;; Put leading close-paren where the matching open paren would be. - (and (let (escaped) - (or (eq (latex-syntax-after) ?\)) + (let (escaped) + (and (or (eq (latex-syntax-after) ?\)) ;; Try to handle escaped close parens but keep original ;; position if it doesn't work out. (setq escaped (looking-at "\\\\\\([])}]\\)"))) (ignore-errors - (save-excursion - (when escaped - (goto-char (match-beginning 1))) - (latex-skip-close-parens) - (latex-backward-sexp-1) - (latex-find-indent 'virtual))))) + (save-excursion + (when escaped + (goto-char (match-beginning 1))) + (latex-skip-close-parens) + (latex-backward-sexp-1) + (latex-find-indent 'virtual))))) ;; Default (maybe an argument) (let ((pos (point)) ;; Outdent \item if necessary.