yatex
diff yatexlib.el @ 79:0734be649cb8
Do not care file-coding-system when YaTeX-kanji-code is nil.
New completion yatexpkg.el is introduced.
author | yuuji |
---|---|
date | Thu, 25 Dec 2003 04:10:32 +0000 |
parents | 1b172d26b55e |
children | 9b4354af748c |
line diff
1.1 --- a/yatexlib.el Thu May 01 13:38:27 2003 +0000 1.2 +++ b/yatexlib.el Thu Dec 25 04:10:32 2003 +0000 1.3 @@ -1,12 +1,13 @@ 1.4 ;;; -*- Emacs-Lisp -*- 1.5 ;;; YaTeX and yahtml common libraries, general functions and definitions 1.6 ;;; yatexlib.el 1.7 -;;; (c )1994-2002 by HIROSE Yuuji.[yuuji@yatex.org] 1.8 -;;; Last modified Wed Oct 2 23:35:33 2002 on firestorm 1.9 +;;; (c)1994-2002 by HIROSE Yuuji.[yuuji@yatex.org] 1.10 +;;; Last modified Tue Aug 19 22:20:40 2003 on firestorm 1.11 ;;; $Id$ 1.12 1.13 ;; General variables 1.14 (defvar YaTeX-dos (memq system-type '(ms-dos windows-nt OS/2))) 1.15 +(defvar YaTeX-macos (memq system-type '(darwin))) 1.16 (defvar YaTeX-emacs-19 (>= (string-to-int emacs-version) 19)) 1.17 (defvar YaTeX-emacs-20 (>= (string-to-int emacs-version) 20)) 1.18 (defvar YaTeX-emacs-21 (>= (string-to-int emacs-version) 21)) 1.19 @@ -21,7 +22,11 @@ 1.20 window-system) ; falls down lazy check.. 1.21 "Current display's capability of expressing colors.") 1.22 1.23 -(defvar YaTeX-japan (or (boundp 'NEMACS) (boundp 'MULE) YaTeX-emacs-20) 1.24 +(defvar YaTeX-japan 1.25 + (or (boundp 'NEMACS) 1.26 + (boundp 'MULE) 1.27 + (and (boundp 'current-language-environment) 1.28 + (string-match "[Jj]apanese" current-language-environment))) 1.29 "Whether yatex mode is running on Japanese environment or not.") 1.30 1.31 ;; autoload from yahtml.el 1.32 @@ -33,14 +38,17 @@ 1.33 (list '(0 . *noconv*) 1.34 (cons 1.35 1 1.36 - (if YaTeX-dos (if (boundp '*sjis-dos*) *sjis-dos* *sjis*dos) 1.37 - *sjis*)) 1.38 + (cond 1.39 + (YaTeX-dos (if (boundp '*sjis-dos*) *sjis-dos* *sjis*dos)) 1.40 + (YaTeX-macos (if (boundp '*sjis-mac*) *sjis-mac* *sjis*mac)) 1.41 + (t *sjis*))) 1.42 '(2 . *junet*) '(3 . *euc-japan*))) 1.43 (YaTeX-emacs-20 1.44 ;;(cdr-safe(assq 'coding-system (assoc "Japanese" language-info-alist))) 1.45 (list '(0 . no-conversion) 1.46 (cons 1.47 1 (cond (YaTeX-dos 'shift_jis-dos) 1.48 + (YaTeX-macos 'shift_jis-mac) 1.49 ((member 'shift_jis (coding-system-list)) 'shift_jis-unix) 1.50 (t 'sjis))) 1.51 '(2 . iso-2022-jp-unix)