Path: utzoo!utgpu!water!watmath!clyde!burl!codas!killer!mit-eddie!YALE.ARPA!ram-ashwin From: ram-ashwin@YALE.ARPA (Ashwin Ram) Newsgroups: comp.emacs Subject: Closing LaTeX blocks Message-ID: <8802230342.AA12720@ATHENA.CS.YALE.EDU> Date: 23 Feb 88 03:42:41 GMT Sender: daemon@eddie.MIT.EDU Lines: 20 Does anyone have code that recognizes "\begin{foo} ... \end{foo}" pairs in a LaTeX file as a "balanced pair"? In particular, I'm looking for something that would validate a buffer, indicate a mismatch (just as for different kinds of parens), and insert the correct \end{...} expression upon hitting a key, depending on the current \begin{...} expression that you're in? I have code that just searches back to the previous \begin{...} expression, which is nicer than the default TeX-close-LaTeX-block function but still a long way from knowing about \begin{...}'s that have already been \end'ed. Ideally, "\begin{foo}" and "\end{foo}" should behave like a parenthesis pair. If you have code that does this, could you please e-mail it to me or post it to comp.emacs? Thanks. -- Ashwin. ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin BITNET: Ram@yalecs