changeset 58898:27a76c55b4ca

(latex-backward-sexp-1): Handle the special case of \end{verbatim}.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 11 Dec 2004 22:00:38 +0000
parents 98e94b29b59b
children 9715276c90ce
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Sat Dec 11 21:59:15 2004 +0000
+++ b/lisp/textmodes/tex-mode.el	Sat Dec 11 22:00:38 2004 +0000
@@ -1351,7 +1351,9 @@
       (when (eq (char-after) ?{)
 	(let ((newpos (point)))
 	  (when (ignore-errors (backward-sexp 1) t)
-	    (if (looking-at "\\\\end\\>")
+	    (if (or (looking-at "\\\\end\\>")
+		    ;; In case the \\ ends a verbatim section.
+		    (and (looking-at "end\\>") (eq (char-before) ?\\)))
 		(tex-last-unended-begin)
 	      (goto-char newpos))))))))