emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 1d7c229 38/95: Make papersize predicate in tex-j


From: Tassilo Horn
Subject: [elpa] externals/auctex 1d7c229 38/95: Make papersize predicate in tex-jp.el to work again.
Date: Sun, 16 Apr 2017 01:26:51 -0400 (EDT)

branch: externals/auctex
commit 1d7c2293c88028bdfbafde932f421522a65f2f6a
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Make papersize predicate in tex-jp.el to work again.
    Problem parallel to bug#25563.
    
    * tex-jp.el (): Use `LaTeX-match-class-option' to examine paper size
    option of document class.
---
 tex-jp.el | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/tex-jp.el b/tex-jp.el
index 0a51126..36acf27 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -183,24 +183,31 @@ For detail, see `TeX-command-list', to which this list is 
appended."
 (unless (get 'TeX-view-predicate-list 'saved-value)
   (setq TeX-view-predicate-list
        '((paper-a4
-          (TeX-match-style
-           "\\`\\(a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'"))
+         (let ((regex 
"\\`\\(?:a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'"))
+           (or (TeX-match-style regex)
+               (and (fboundp 'LaTeX-match-class-option)
+                    (LaTeX-match-class-option regex)))))
          (paper-a5
-          (TeX-match-style
-           "\\`\\(a5j\\|a5paper\\|a5comb\\)\\'"))
+         (let ((regex "\\`\\(?:a5j\\|a5paper\\|a5comb\\)\\'"))
+           (or (TeX-match-style regex)
+               (and (fboundp 'LaTeX-match-class-option)
+                    (LaTeX-match-class-option regex)))))
          ;; jarticle address@hidden(B b4paper, b5paper $B$O(B JIS B 
$B7ONs!#(B
          ;; j-article $B$J$I$NJ}$K$O(B a4j, b5j 
$B$H$$$C$?%*%W%7%g%s$O$J$$!#(B
          (paper-b5    ; ISO B5
-          (and (TeX-match-style "\\`b5paper\\'")
-               (not (memq TeX-engine '(ptex uptex)))))
+          (and (fboundp 'LaTeX-match-class-option)
+              (LaTeX-match-class-option "\\`b5paper\\'")
+               (not (TeX-match-style 
"\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'"))))
          (paper-b5jis ; JIS B5
-          (or (TeX-match-style "\\`b5j\\'")
-              (and (TeX-match-style "\\`b5paper\\'")
-                   (memq TeX-engine '(ptex uptex)))))
+         (and (fboundp 'LaTeX-match-class-option)
+              (or (LaTeX-match-class-option "\\`b5j\\'")
+                  (and (LaTeX-match-class-option "\\`b5paper\\'")
+                       (TeX-match-style 
"\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'")))))
          ;; article $B$J$I$K$O(B b4paper $B$H$$$&%*%W%7%g%s$O$J$$!#(B
          ;; b4paper $B$H$$$&%*%W%7%g%s$,$"$C$?$i(B JIS B4 $B$H8+$J$9!#(B
          (paper-b4jis
-          (TeX-match-style "\\`\\(b4j\\|b4paper\\)\\'")))))
+         (and (fboundp 'LaTeX-match-class-option)
+              (LaTeX-match-class-option "\\`\\(?:b4j\\|b4paper\\)\\'"))))))
 ;; jsarticle address@hidden>$K$b$b$C$HH=7?$N%*%W%7%g%s$,$"$k$,!"(B
 ;; $BA4ItLLE]8+$F$k$H%-%j$,$J$$$N$G!"$3$l$/address@hidden&!#(B
 ;; jsarticle.el $B$d(B jsbook.el 
$B$GDI2CJ,$N=hM}$r;E9~$a$P$$$$$N$+$bCN$l$J$$!#(B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]