monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 0d1e2143b318466cb0a720c3f661d582e7643bea
Author: Mosè Giordano <[email protected]>
Date: Sat Jan 11 00:02:09 2014 +0100
Make search for \begin and \end case sensitive.
* latex.el (LaTeX-current-environment): Make search for `\begin'
and `\end' case sensitive.
(docTeX-in-macrocode-p): Ditto.
(LaTeX-indent-calculate): Ditto.
(LaTeX-find-matching-end): Ditto.
(LaTeX-find-matching-begin): Ditto.
---
ChangeLog | 9 +++++++++
latex.el | 23 ++++++++++++++---------
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4da30d5..1bac4ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-01-11 Mos� Giordano <[email protected]>
+
+ * latex.el (LaTeX-current-environment): Make search for `\begin'
+ and `\end' case sensitive.
+ (docTeX-in-macrocode-p): Ditto.
+ (LaTeX-indent-calculate): Ditto.
+ (LaTeX-find-matching-end): Ditto.
+ (LaTeX-find-matching-begin): Ditto.
+
2014-01-06 Vincent Bela�che <[email protected]>
* tex-info.el (Texinfo-reftex-hook): Replace use of
diff --git a/latex.el b/latex.el
index 684f36d..974ea42 100644
--- a/latex.el
+++ b/latex.el
@@ -736,7 +736,8 @@ The functions `LaTeX-find-matching-begin' and
`LaTeX-find-matching-end'
work analogously."
(setq arg (if arg (if (< arg 1) 1 arg) 1))
(let* ((in-comment (TeX-in-commented-line))
- (comment-prefix (and in-comment (TeX-comment-prefix))))
+ (comment-prefix (and in-comment (TeX-comment-prefix)))
+ (case-fold-search nil))
(save-excursion
(while (and (/= arg 0)
(re-search-backward
@@ -756,12 +757,13 @@ work analogously."
(defun docTeX-in-macrocode-p ()
"Determine if point is inside a macrocode environment."
- (save-excursion
- (re-search-backward
- (concat "^% " (regexp-quote TeX-esc)
- "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") nil 'move)
- (not (or (bobp)
- (= (char-after (match-beginning 1)) ?e)))))
+ (let ((case-fold-search nil))
+ (save-excursion
+ (re-search-backward
+ (concat "^% " (regexp-quote TeX-esc)
+ "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") nil 'move)
+ (not (or (bobp)
+ (= (char-after (match-beginning 1)) ?e))))))
;;; Environment Hooks
@@ -2851,6 +2853,7 @@ outer indentation in case of a commented line. The
symbols
(LaTeX-back-to-indentation force-type)
(let ((i 0)
(list-length (safe-length docTeX-indent-inner-fixed))
+ (case-fold-search nil)
entry
found)
(cond ((save-excursion (beginning-of-line) (bobp)) 0)
@@ -3930,7 +3933,8 @@ environment in commented regions with the same comment
prefix."
(let* ((regexp (concat (regexp-quote TeX-esc) "\\(begin\\|end\\)\\b"))
(level 1)
(in-comment (TeX-in-commented-line))
- (comment-prefix (and in-comment (TeX-comment-prefix))))
+ (comment-prefix (and in-comment (TeX-comment-prefix)))
+ (case-fold-search nil))
(save-excursion
(skip-chars-backward "a-zA-Z \t{")
(unless (bolp)
@@ -3964,7 +3968,8 @@ environment in commented regions with the same comment
prefix."
(let* ((regexp (concat (regexp-quote TeX-esc) "\\(begin\\|end\\)\\b"))
(level 1)
(in-comment (TeX-in-commented-line))
- (comment-prefix (and in-comment (TeX-comment-prefix))))
+ (comment-prefix (and in-comment (TeX-comment-prefix)))
+ (case-fold-search nil))
(skip-chars-backward "a-zA-Z \t{")
(unless (bolp)
(backward-char 1)