From: Martin Rudalics Date: Tue, 23 Sep 2008 08:25:44 +0000 (+0000) Subject: (latex-find-indent): ... and handle conjunction correctly this time. X-Git-Tag: emacs-pretest-23.0.90~2796 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ca37e61fc16825314bc5eebcd86282102eb2961;p=emacs.git (latex-find-indent): ... and handle conjunction correctly this time. --- diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 2c55a68b57b..37b2f3657a0 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2586,18 +2586,18 @@ There might be text before point." (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.