branch: master
commit 5f129b5dcab1d1c3b3b987348cfa841e265548c4
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Support starred variant name
* latex.el (LaTeX-find-matching-end):
(LaTeX-find-matching-begin):
Find correct begin or end when the point is just after the asterisk of
"\end{foo*}".
Remove spurious `regexp-quote' for `TeX-grop'.
---
latex.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/latex.el b/latex.el
index 81db2e76..40c0136a 100644
--- a/latex.el
+++ b/latex.el
@@ -5270,8 +5270,10 @@ environment in commented regions with the same comment
prefix."
(in-comment (TeX-in-commented-line))
(comment-prefix (and in-comment (TeX-comment-prefix)))
(case-fold-search nil))
+ ;; The following code until `while' handles exceptional cases that
+ ;; the point is on "\begin{foo}" or "\end{foo}".
(let ((pt (point)))
- (skip-chars-backward (concat "a-zA-Z \t" (regexp-quote TeX-grop)))
+ (skip-chars-backward (concat "a-zA-Z* \t" TeX-grop))
(unless (bolp)
(backward-char 1)
(if (and (looking-at regexp)
@@ -5307,7 +5309,9 @@ environment in commented regions with the same comment
prefix."
(in-comment (TeX-in-commented-line))
(comment-prefix (and in-comment (TeX-comment-prefix)))
(case-fold-search nil))
- (skip-chars-backward (concat "a-zA-Z \t" (regexp-quote TeX-grop)))
+ ;; The following code until `while' handles exceptional cases that
+ ;; the point is on "\begin{foo}" or "\end{foo}".
+ (skip-chars-backward (concat "a-zA-Z* \t" TeX-grop))
(unless (bolp)
(backward-char 1)
(and (looking-at regexp)