branch: externals/auctex commit 592297dc501821af58216558720d38d45cf29781 Author: Ikumi Keita <ik...@ikumi.que.jp> Commit: Ikumi Keita <ik...@ikumi.que.jp>
Avoid altering user option as much as possible * tex-jp.el (): Alter `TeX-view-predicate-list-builtin' and `TeX-view-program-list-builtin' instead of their customize option cousins. Append to `TeX-view-program-selection' only on w32 system. --- tex-jp.el | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/tex-jp.el b/tex-jp.el index 1c2247b..dc70e27 100644 --- a/tex-jp.el +++ b/tex-jp.el @@ -181,8 +181,8 @@ For detail, see `TeX-command-list', to which this list is appended." ;;; Viewing (new implementation) -(unless (get 'TeX-view-predicate-list 'saved-value) - (setq TeX-view-predicate-list +(setq TeX-view-predicate-list-builtin + (append '((paper-a4 (let ((regex "\\`\\(?:a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'")) (or (TeX-match-style regex) @@ -208,34 +208,28 @@ For detail, see `TeX-command-list', to which this list is appended." ;; b4paper $B$H$$$&%*%W%7%g%s$,$"$C$?$i(B JIS B4 $B$H8+$J$9!#(B (paper-b4jis (and (fboundp 'LaTeX-match-class-option) - (LaTeX-match-class-option "\\`\\(?:b4j\\|b4paper\\)\\'")))))) -;; jsarticle $B$@$HB>$K$b$b$C$HH=7?$N%*%W%7%g%s$,$"$k$,!"(B -;; $BA4ItLLE]8+$F$k$H%-%j$,$J$$$N$G!"$3$l$/$i$$$G$$$$$@$m$&!#(B -;; jsarticle.el $B$d(B jsbook.el $B$GDI2CJ,$N=hM}$r;E9~$a$P$$$$$N$+$bCN$l$J$$!#(B - -;; $B;CDj=hCV!#(Btex.el $B$K<h$j9~$s$G$b$i$($k$H$h$$!#(B -(unless (get 'TeX-view-program-list 'saved-value) - (setq TeX-view-program-list - (cond - ((memq system-type '(windows-nt darwin)) - nil) - (t - (setcar (cadr (assoc "xdvi" TeX-view-program-list-builtin)) - "%(xdvi) -unique") - '(("MuPDF" "mupdf %o" "mupdf")))))) + (LaTeX-match-class-option "\\`\\(?:b4j\\|b4paper\\)\\'")))) + ;; jsclasses $B$@$HB>$K$b$b$C$HH=7?$N%*%W%7%g%s$,$"$k$,!"A4ItLLE](B + ;; $B8+$F$k$H%-%j$,$J$$$N$G!"$3$l$/$i$$$G$$$$$@$m$&!#(B + ;; jsarticle.el $B$d(B jsbook.el $B$GDI2CJ,$N=hM}$r;E9~$a$P$$$$$N$+$bCN$l$J$$!#(B + TeX-view-predicate-list-builtin)) + +(unless (memq system-type '(windows-nt darwin)) + (setcar (cadr (assoc "xdvi" TeX-view-program-list-builtin)) + "%(xdvi) -unique") + (setq TeX-view-program-list-builtin + (append TeX-view-program-list-builtin + '(("MuPDF" "mupdf %o" "mupdf"))))) ;; $B$3$l$O(B tex.el $B$K<h$jF~$l$F$b$i$&$N$OFq$7$$$+!)(B ;; tex-jp.el $B$,FI$_9~$^$l$k$@$1$G!"(Bdvi viewer $B$N%G%U%)%k%H$,(B dviout $B$K(B ;; $B$J$C$F$7$^$&$N$ODq93$,Bg$-$$$+$b!#(B (unless (get 'TeX-view-program-selection 'saved-value) - (setq TeX-view-program-selection - (append - (cond - ((eq system-type 'windows-nt) - '((output-dvi "dviout"))) - (t - nil)) - TeX-view-program-selection))) + (if (eq system-type 'windows-nt) + (setq TeX-view-program-selection + (append + '((output-dvi "dviout")) + TeX-view-program-selection)))) (mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t)) (or (TeX-tree-expand