From: Stefan Monnier Date: Sat, 11 Dec 2004 22:00:38 +0000 (+0000) Subject: (latex-backward-sexp-1): Handle the special case of \end{verbatim}. X-Git-Tag: ttn-vms-21-2-B4~3324 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e67064e2c65060f657ed9f88b18854838e95cdfe;p=emacs.git (latex-backward-sexp-1): Handle the special case of \end{verbatim}. --- diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index f6f4c63fdc3..bac2ed6f800 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1351,7 +1351,9 @@ Mark is left at original location." (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))))))))