branch: externals/auctex
commit 9876030e88a67c36b567df20d5c3235d36ab3b45
Author: Ikumi Keita <ik...@ikumi.que.jp>
Commit: Ikumi Keita <ik...@ikumi.que.jp>

    Fix minor problems
    * tex.el (TeX-view-predicate-list-builtin): Enclose whole alternatives
    in regexp with shy group in order that the effect of "\`" and "\'"
    covers all the alternatives.
    * latex.el (LaTeX-auto-cleanup): Regard "Class", in addition to
    "class", as an indicator of LaTeX2e document.
---
 latex.el | 5 +++--
 tex.el   | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/latex.el b/latex.el
index bd64f7f..27a7874 100644
--- a/latex.el
+++ b/latex.el
@@ -1799,9 +1799,10 @@ The value is actually the tail of the list of options 
given to PACKAGE."
                              (list (cons style options)))))
 
        ;; The third argument if "class" indicates LaTeX2e features.
-       (cond ((equal class "class")
+       (cond ((or (string-equal class "class")
+                  (string-equal class "Class"))
               (add-to-list 'TeX-auto-file "latex2e"))
-             ((equal class "style")
+             ((string-equal class "style")
               (add-to-list 'TeX-auto-file "latex2"))))))
 
   ;; Cleanup optional arguments
diff --git a/tex.el b/tex.el
index 590568c..11a40e0 100644
--- a/tex.el
+++ b/tex.el
@@ -1167,18 +1167,18 @@ all the regular expressions must match for the element 
to apply."
     (mode-io-correlate
      TeX-source-correlate-mode)
     (paper-landscape
-     (and (fboundp 'LaTeX-provided-class-options)
+     (and (fboundp 'LaTeX-match-class-option)
          (LaTeX-match-class-option "\\`landscape\\'")))
     (paper-portrait
-     (not (and (fboundp 'LaTeX-provided-class-options)
+     (not (and (fboundp 'LaTeX-match-class-option)
               (LaTeX-match-class-option "\\`landscape\\'"))))
     (paper-a4
-     (let ((regex "\\`a4paper\\|a4dutch\\|a4wide\\|sem-a4\\'"))
+     (let ((regex "\\`\\(?:a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'"))
        (or (TeX-match-style regex)
           (and (fboundp 'LaTeX-match-class-option)
                (LaTeX-match-class-option regex)))))
     (paper-a5
-     (let ((regex "\\`a5paper\\|a5comb\\'"))
+     (let ((regex "\\`\\(?:a5paper\\|a5comb\\)\\'"))
        (or (TeX-match-style regex)
           (and (fboundp 'LaTeX-match-class-option)
                (LaTeX-match-class-option regex)))))

Reply via email to