[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. fcb6424dfcc05174ba270
From: |
Masayuki Ataka |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. fcb6424dfcc05174ba270b4c491a76553301ed8d |
Date: |
Thu, 25 Aug 2016 16:03:31 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via fcb6424dfcc05174ba270b4c491a76553301ed8d (commit)
via e259e40bae5954df0488e680b3f505a5871b46ff (commit)
via 5beae6281041f9c6c1c9a88370615ad9ccf2d410 (commit)
from e4b2e6a76965156257a19bd65f9bc76dfb743b6e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fcb6424dfcc05174ba270b4c491a76553301ed8d
Author: Ikumi Keita <address@hidden>
Date: Thu Aug 25 01:35:53 2016 +0900
Revise document for Japanese TeX
Revise document for Japanese TeX
* doc/auctex.texi (Language Support): Fix old statements. Mention
about (semi-)obsolete variables japanese-(La)TeX-command-default,
japanese-TeX-command-list and recommend to use
japanese-TeX-engine-default instead.
Signed-off-by: Masayuki Ataka <address@hidden>
diff --git a/doc/auctex.texi b/doc/auctex.texi
index d286ccf..673b6ad 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4203,8 +4203,8 @@ address@hidden for Japanese, address@hidden and
address@hidden for Korean. The
Note that Unicode is not fully supported in Emacs 21 and XEmacs 21.
@acronym{CJK} characters are not usable. Please use the
address@hidden@acronym{UCS} EmacsLisp package or Emacs 22 (not released
-yet) if you need @acronym{CJK}.
address@hidden@acronym{UCS} EmacsLisp package or Emacs 22 and later if
+you need @acronym{CJK}.
@c FIXME: We need more information for CTeX, ChinaTeX, KTeX, and HLaTeX.
@@ -4436,8 +4436,7 @@ If nil do it the other way round.
@cindex address@hidden
@cindex @file{tex-jp.el}
@vindex TeX-default-mode
address@hidden japanese-TeX-command-default
address@hidden japanese-LaTeX-command-default
address@hidden japanese-TeX-engine-default
@vindex japanese-LaTeX-default-style
To write Japanese text with @AUCTeX{}, you need to have versions of
@@ -4467,16 +4466,10 @@ set the variable like this:
@end lisp
@end defopt
address@hidden japanese-TeX-command-default
-The default command for @code{TeX-command} in Japanese @TeX{} mode.
address@hidden japanese-TeX-engine-default
+The default TeX engine in Japanese @TeX{} mode.
-The default value is @samp{"pTeX"}.
address@hidden defopt
-
address@hidden japanese-LaTeX-command-default
-The default command for @code{TeX-command} in Japanese @LaTeX{} mode.
-
-The default value is @samp{"LaTeX"}.
+The default value is @samp{ptex}.
@end defopt
@defopt japanese-LaTeX-default-style
@@ -4485,6 +4478,16 @@ The default style/class when creating a new Japanese
@LaTeX{} document.
The default value is @samp{"jarticle"}.
@end defopt
+The former customize options @code{japanese-TeX-command-default} and
address@hidden are obsolete. Use
address@hidden instead. If you need to customize
+the executable file name such as @samp{"latex"}, the options for them,
+or both, customize @code{TeX-engine-alist}.
+
+Also, the option @code{japanese-TeX-command-list} is considered as
+semi-obsolete. It still functions as before, but in theory, it is not
+required anymore in normal use.
+
See @file{tex-jp.el} for more information.
@node Automatic
commit e259e40bae5954df0488e680b3f505a5871b46ff
Author: Ikumi Keita <address@hidden>
Date: Thu Aug 25 02:23:53 2016 +0900
Add a Japanese error message translation
* tex-jp.el (TeX-error-description-list): Add a Japanese error
message translation.
Signed-off-by: Masayuki Ataka <address@hidden>
diff --git a/tex-jp.el b/tex-jp.el
index cee4b2f..cfc37bf 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -567,7 +567,12 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
(if japanese-TeX-error-messages
(setq TeX-error-description-list
- '(("Bad \\\\line or \\\\vector argument.*" .
+ '(("\\(?:Package Preview Error\\|Preview\\):.*" .
+"`preview'$B$X(B`auctex'$B%*%W%7%g%s$rD>@\M?$($k$N$OHr$1$F$/address@hidden(B
+$B%W%l%S%e!<$N<B9T;~0J30$G$3$N%(%i!<$,=P$?>l9g!$M>$j$K$3$_$$$C$?$3$H$r(B
+$B$7$9$.$+!$$G$J$1$l$P(BAUCTeX$B$,$R$I$$<:GT$r$7$F$$$^$9!%(B")
+
+ ("Bad \\\\line or \\\\vector argument.*" .
"address@hidden;XDj$9$k!$(B\\line$B$^$?$O(B\\vector$B$N:G=i$N0z?t$,address@hidden(B")
("Bad math environment delimiter.*" .
commit 5beae6281041f9c6c1c9a88370615ad9ccf2d410
Author: Ikumi Keita <address@hidden>
Date: Thu Aug 25 01:25:35 2016 +0900
Set the right coding systems for Japanese TeX process
Set the right coding systems for Japanese TeX process
* tex-jp.el:
(LaTeX-command-style): Remove kanji option from uplatex and jlatex,
which was there by mistake.
(TeX-japanese-process-input-coding-system,
TeX-japanese-process-output-coding-system,
japanese-TeX-set-process-coding-system): The coding systems for
interacting with Japanese TeX vary with the OS and other
circumstances. So choose the suitable coding system at run time
rather than using the fixed values.
(japanese-TeX-use-kanji-opt-flag): Declare before the first use.
In addition, change default value and tailor doc string as per the
above change.
(japanese-TeX-coding-ejsu): Add coding system compatible for emacs
21 and xemacs.
Signed-off-by: Masayuki Ataka <address@hidden>
diff --git a/tex-jp.el b/tex-jp.el
index a905348..cee4b2f 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -48,6 +48,14 @@
(const :tag "jTeX" jtex)
(const :tag "upTeX" uptex)))
+(defcustom japanese-TeX-use-kanji-opt-flag (not (eq system-type 'windows-nt))
+ "Add kanji option to Japanese pTeX family if non-nil.
+If `TeX-japanese-process-input-coding-system' or
+`TeX-japanese-process-output-coding-system' are non-nil, the process coding
+systems are determined by their values regardless of the kanji option."
+ :group 'AUCTeX-jp
+ :type 'boolean)
+
(setq TeX-engine-alist-builtin
(append TeX-engine-alist-builtin
'((ptex "pTeX" "ptex %(kanjiopt)" "platex %(kanjiopt)" "eptex")
@@ -246,11 +254,11 @@ For detail, see `TeX-command-list', to which this list is
appended."
;; $B=gD4$K9T$1$PITMW$K$J$k!#(B
(setq LaTeX-command-style
(append '(("\\`u[jt]\\(article\\|report\\|book\\)\\'\\|\\`uplatex\\'"
- "%(PDF)uplatex %(kanjiopt)%S%(PDFout)")
+ "%(PDF)uplatex %S%(PDFout)")
("\\`[jt]s?\\(article\\|report\\|book\\)\\'"
"%(PDF)platex %(kanjiopt)%S%(PDFout)")
("\\`j-\\(article\\|report\\|book\\)\\'"
- "%(PDF)jlatex %(kanjiopt)%S%(PDFout)"))
+ "%(PDF)jlatex %S%(PDFout)"))
LaTeX-command-style))
(defcustom japanese-TeX-error-messages t
@@ -258,28 +266,19 @@ For detail, see `TeX-command-list', to which this list is
appended."
:group 'AUCTeX-jp
:type 'boolean)
-;; FIX-ME (2007-02-09) The default coding system in recent Unix (like Fedora
and
-;; Ubuntu) is utf-8. But Japanese TeX system does not support utf-8 yet
-;; (platex-utf is under development, may be alpha phase). So,
-;; process-coding-system for Japanese TeX is not defined from
-;; default-coding-system. When platex-utf is out, we should look this setting,
-;; again.
-
-(defcustom TeX-japanese-process-input-coding-system
- (cond ((memq system-type '(windows-nt ms-dos cygwin)) 'shift_jis-dos)
- ((memq system-type '(mac darwin)) 'shift_jis-mac)
- (t 'euc-jp-unix))
- "TeX-process' coding system with standard input."
+(defcustom TeX-japanese-process-input-coding-system nil
+ "If non-nil, used for encoding input to Japanese TeX process.
+When nil, AUCTeX tries to choose suitable coding system.
+See also a user custom option `TeX-japanese-process-output-coding-system'."
:group 'AUCTeX-jp
- :type 'coding-system)
+ :type '(choice (const :tag "Default" nil) coding-system))
-(defcustom TeX-japanese-process-output-coding-system
- (cond ((memq system-type '(windows-nt ms-dos cygwin)) 'shift_jis-dos)
- ((memq system-type '(mac darwin)) 'shift_jis-mac)
- (t 'euc-jp-unix))
- "TeX-process' coding system with standard output."
+(defcustom TeX-japanese-process-output-coding-system nil
+ "If non-nil, used for decoding output from Japanese TeX process.
+When nil, AUCTeX tries to choose suitable coding system.
+See also a user custom option `TeX-japanese-process-input-coding-system'."
:group 'AUCTeX-jp
- :type 'coding-system)
+ :type '(choice (const :tag "Default" nil) coding-system))
;; $B=gD4$K9T$1$PITMW$K$J$k!#(B
(defcustom japanese-TeX-command-default "pTeX"
@@ -327,19 +326,81 @@ For detail, see `TeX-command-list', to which this list is
appended."
(defun japanese-TeX-set-process-coding-system (process)
"Set proper coding system for japanese TeX PROCESS."
- (if (with-current-buffer TeX-command-buffer japanese-TeX-mode)
- (set-process-coding-system process
- TeX-japanese-process-output-coding-system
- TeX-japanese-process-input-coding-system)))
+ (with-current-buffer TeX-command-buffer
+ (when japanese-TeX-mode
+ ;; TeX-engine $B$,(B ptex, jtex, uptex
$B$N$$$:$l$+$G$"$k>l9g$N$_9M$((B
+ ;; $B$k!#(Bluatex-ja $B$J$I$N>address@hidden(B latex-mode
$B$G$h$/!"(B
+ ;; $B$o$6$o$6(B japanese-latex-mode $B$K$9$kI,MW$,$J$$!#(B
+
+ ;; FIXME: $B0J2<$N=hM}$O(B tex engine
$B$rBP>]$H$9$k>l9g$7$+9M$($F$$$J$$!#(B
+ ;; bibtex $B$d(B mendex
$BEy$NJd=u%D!<%k$N>address@hidden/$J$$=hM}$+$b$7$l$J$$!#(B
+ (let*
+ ;; -kanji $B%*%W%7%g%s$"$j$N;~$NJ8;z%3!<%I!#(B
+ ((kanji (and japanese-TeX-use-kanji-opt-flag
+ (let ((str (japanese-TeX-get-encoding-string)))
+ (cond
+ ((equal str "euc") 'euc-jp)
+ ((equal str "jis") 'iso-2022-jp)
+ ((equal str "sjis") 'shift_jis)
+ ((equal str "utf8") 'utf-8)))))
+
+ ;; process $B$+$i$N=PNO$NJ8;z%3!<%I!#(B
+ (dec (cond
+ ;; windows $B$H(B mac $B$N>l9g!#(B
+ ((memq system-type '(windows-nt darwin))
+ (cond
+ ;; ptex $B$J$i(B mac $B$O(B utf-8$B!#(B
+ ;; windows $B$G(B -kanji
$B%*%W%7%g%s$"$j$N;~$O$=$NJ8;z%3!<%I!"(B
+ ;; $B$J$7$N;~$O(B sjis$B!#(B
+ ((eq TeX-engine 'ptex)
+ (cond ((eq system-type 'darwin)
+ 'utf-8)
+ (japanese-TeX-use-kanji-opt-flag
+ kanji)
+ (t 'shift_jis)))
+ ;; jtex $B$J$i(B sjis $B$K8GDj$9$k!#(B
+ ((eq TeX-engine 'jtex)
+ 'shift_jis)
+ ;; uptex $B$J$i(B utf-8 $B$K8GDj$9$k!#(B
+ (t
+ 'utf-8)))
+ ;; unix $B$N>l9g!#(B
+ (t
+ ;; jtex $B$J$i(B euc $B$K8GDj$9$k!#(B
+ (cond
+ ((eq TeX-engine 'jtex)
+ 'euc-jp)
+ ;; $B$=$l0J30$O!"(Buptex $B$G$b(B locale $B$K=>$&!#(B
+ ;; 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))))))
+
+ ;; process $B$KM?$($kF~NO$NJ8;z%3!<%I!#(B
+ (enc (cond
+ ;; ptex $B$G(B -kanji
$B%*%W%7%g%s$"$j$J$i!"$=$NJ8;z%3!<%I!#(B
+ ;; $B$J$7$J$i(B utf-8 $B$+(B sjis$B!#(B
+ ((eq TeX-engine 'ptex)
+ (if japanese-TeX-use-kanji-opt-flag
+ kanji
+ (if (eq system-type 'windows-nt)
+ 'shift_jis 'utf-8)))
+ ;; jtex $B$J$i(B euc $B$+(B sjis $B$K8GDj$9$k!#(B
+ ((eq TeX-engine 'jtex)
+ (if (memq system-type '(windows-nt darwin))
+ 'shift_jis 'euc-jp))
+ ;; uptex $B$J$i(B utf-8 $B$K8GDj$9$k!#(B
+ (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))))))
(when (featurep 'mule)
(setq TeX-after-start-process-function
#'japanese-TeX-set-process-coding-system))
-(defcustom japanese-TeX-use-kanji-opt-flag t
- "Add kanji option to Japanese pTeX family if non-nil."
- :group 'AUCTeX-jp
- :type 'boolean)
-
(defun japanese-TeX-coding-ejsu (coding-system)
"Convert japanese CODING-SYSTEM to mnemonic string.
euc-jp: \"euc\"
@@ -348,17 +409,26 @@ shift_jis: \"sjis\"
utf-8: \"utf8\"
Return nil otherwise."
(let ((base (coding-system-base coding-system)))
+ (if (featurep 'xemacs)
+ (setq base (coding-system-name base)))
(cdr (assq base
'((japanese-iso-8bit . "euc")
+ (euc-jp . "euc") ; for xemacs
(iso-2022-jp . "jis")
(japanese-shift-jis . "sjis")
+ (shift_jis . "sjis") ; for xemacs
(utf-8 . "utf8")
+ (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 address@hidden<$NL>A0$O0c$&$+$b!D!#(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
(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"))))))
-----------------------------------------------------------------------
Summary of changes:
doc/auctex.texi | 29 ++++++------
tex-jp.el | 139 ++++++++++++++++++++++++++++++++++++++++++-------------
2 files changed, 123 insertions(+), 45 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. fcb6424dfcc05174ba270b4c491a76553301ed8d,
Masayuki Ataka <=