emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/tex-mode.el,v


From: Martin Rudalics
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/tex-mode.el,v
Date: Tue, 23 Sep 2008 06:35:31 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Martin Rudalics <m061211>       08/09/23 06:35:31

Index: tex-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/tex-mode.el,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -b -r1.216 -r1.217
--- tex-mode.el 23 Sep 2008 06:15:24 -0000      1.216
+++ tex-mode.el 23 Sep 2008 06:35:31 -0000      1.217
@@ -2586,15 +2586,18 @@
          (member (match-string 2) tex-verbatim-environments)
          0)
      ;; 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))))
+     (and (let (escaped)
+           (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))))
+               (latex-find-indent 'virtual)))))
      ;; Default (maybe an argument)
      (let ((pos (point))
           ;; Outdent \item if necessary.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]