[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex de5e40b 37/95: Fix setting of coding system for
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex de5e40b 37/95: Fix setting of coding system for Japanese TeX |
Date: |
Sun, 16 Apr 2017 01:26:50 -0400 (EDT) |
branch: externals/auctex
commit de5e40bebde353537f66e62385f235a815d506e2
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Fix setting of coding system for Japanese TeX
* tex-jp.el (japanese-TeX-set-process-coding-system): Cater for the
case that kanji option is requested by user but cannot be determined.
XEmacs doesn't have `locale-coding-system'. Use
`get-coding-system-from-locale' and `current-locale' instead.
Cleanup indentation.
(japanese-TeX-coding-ejsu): Add entry for xemacs coding system of cp932.
---
tex-jp.el | 38 +++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/tex-jp.el b/tex-jp.el
index e08d702..0a51126 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -358,7 +358,7 @@ See also a user custom option
`TeX-japanese-process-input-coding-system'."
((eq TeX-engine 'ptex)
(cond ((eq system-type 'darwin)
'utf-8)
- (japanese-TeX-use-kanji-opt-flag
+ ((and japanese-TeX-use-kanji-opt-flag kanji)
kanji)
(t 'shift_jis)))
;; jtex $B$J$i(B sjis $B$K8GDj$9$k!#(B
@@ -377,8 +377,23 @@ See also a user custom option
`TeX-japanese-process-input-coding-system'."
;; address@hidden"(Blocale
$B$,F|K\8l$r%5%]!<%H$7$J$$>l9g$O(B
;; euc $B$K8GDj$9$k!#(B
(t
- (if (japanese-TeX-coding-ejsu locale-coding-system)
- locale-coding-system 'euc-jp))))))
+ (let ((lcs
+ (cond
+ ((boundp 'locale-coding-system)
+ locale-coding-system)
+ ;; XEmacs doesn't have `locale-coding-system'.
+ ;; Instead xemacs 21.5 has
+ ;; `get-coding-system-from-locale' and
+ ;; `current-locale'. They aren't available on
+ ;; xemacs 21.4.
+ ((and
+ (featurep 'xemacs)
+ (fboundp 'get-coding-system-from-locale)
+ (fboundp 'current-locale))
+ (get-coding-system-from-locale
+ (current-locale))))))
+ (if (and lcs (japanese-TeX-coding-ejsu lcs))
+ lcs 'euc-jp)))))))
;; process $B$KM?$($kF~NO$NJ8;z%3!<%I!#(B
(enc (cond
@@ -397,9 +412,10 @@ See also a user custom option
`TeX-japanese-process-input-coding-system'."
(t
'utf-8))))
;; Customize $BCM$,$"address@hidden(B
- (set-process-coding-system process
- (or
TeX-japanese-process-output-coding-system dec)
- (or TeX-japanese-process-input-coding-system
enc))))))
+ (set-process-coding-system
+ process
+ (or TeX-japanese-process-output-coding-system dec)
+ (or TeX-japanese-process-input-coding-system enc))))))
(when (featurep 'mule)
(setq TeX-after-start-process-function
#'japanese-TeX-set-process-coding-system))
@@ -424,16 +440,16 @@ Return nil otherwise."
(mule-utf-8 . "utf8") ; for emacs 21, 22
;; utf-8-auto $B$d(B utf-8-emacs
$B$rF~$l$kI,MW$O$"$k$N$+!)(B
- ;; xemacs $B$G(B jisx0213 $B$O;H$($k$N$+!);H$($k$H$7$F!"(B
- ;; $B$=$N(B coding system $BL>$O!)(B
+ ;; xemacs 21.5 with mule $B$K$O!"(Bjisx0213 $B$N(B charset
$B$O(B
+ ;; $B$"$k$,$=$lMQ$N(B coding system $B$O$J$$!#(B
(euc-jis-2004 . "euc")
(iso-2022-jp-2004 . "jis")
(japanese-shift-jis-2004 . "sjis")
- ;; xemacs $B$K(B cp932 $B7O$N(B coding system
$B$,$"$k$N$+(B
- ;; $B$I$&$+$b$h$/$o$+$i$J$$!#(B
(japanese-cp932 . "sjis")
- (eucjp-ms . "euc"))))))
+ (eucjp-ms . "euc")
+ (windows-932 . "sjis") ; for xemacs 21.5 with mule
+ )))))
(defun japanese-TeX-get-encoding-string ()
"Return coding option string for Japanese pTeX family.
- [elpa] externals/auctex b0bf9ea 43/95: Partially revert previous commit, will look better later, (continued)
- [elpa] externals/auctex b0bf9ea 43/95: Partially revert previous commit, will look better later, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 1d7c229 38/95: Make papersize predicate in tex-jp.el to work again., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a49aaa4 44/95: Fix font-latex-make-match-defun to generate intended code., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 664186d 52/95: ; Add fix related with coding system missing in my commit on Feb 14., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 7c48c19 49/95: * tex-ispell.el (TeX-ispell-skip-cmds-list): Add hyperref macros., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4054384 25/95: Fix parsing bug in style/xcolor.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex b4f304b 36/95: Improve regexp for looking for documentclass macro, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 9876030 23/95: Fix minor problems, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 586cbd8 28/95: * .gitignore: Ignore only preview.el in top directory., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex cf43d7d 53/95: ; Add some full stops at the end of sentences of the manual, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex de5e40b 37/95: Fix setting of coding system for Japanese TeX,
Tassilo Horn <=
- [elpa] externals/auctex 7e7e55e 40/95: Add new style/sourcecodepro.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 991b582 50/95: Detect \& in tabular cells when filling, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4fcee32 68/95: Use the variable `LaTeX-listing-label', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 77974e6 71/95: * style/minted.el ("minted"): Add key=val query for \mint and \mintinline., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 43b07d9 70/95: Use `TeX-line-number-at-pos' further for older emacsen, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 9e7f21e 69/95: Use compatibility function `TeX-line-number-at-pos' for older emacsen, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex c360b9a 76/95: Adapt fontification for \lstinline, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 2182b6f 30/95: Append "lstlisting" to `LaTeX-label-alist', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 337ce76 33/95: Add new keys for package version 4.00, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6bb49cc 39/95: * style/subfiles.el (LaTeX-subfiles-class-options): New function., Tassilo Horn, 2017/04/16