changeset 506:feef2aa1f50f dev

Bibtex-command accepts %k like "pbibtex -kanji=%k".
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 02 Jan 2018 23:35:07 +0900
parents 55a20e3120a0
children 8ca2e7ce2392
files yatex.el yatexprc.el
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/yatex.el	Tue Jan 02 23:28:35 2018 +0900
+++ b/yatex.el	Tue Jan 02 23:35:07 2018 +0900
@@ -1,6 +1,6 @@
 ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*-
 ;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Tue Jan  2 19:26:15 2018 on firestorm
+;;; Last modified Tue Jan  2 23:11:09 2018 on firestorm
 ;;; $Id$
 ;;; The latest version of this software is always available at;
 ;;; https://www.yatex.org/
@@ -60,7 +60,7 @@
 %k -> One of Kanji code mnemonic: euc, jis, sjis, utf8
 ")
 
-(defvar bibtex-command (if YaTeX-japan "jbibtex" "bibtex")
+(defvar bibtex-command (if YaTeX-japan "pbibtex -kanji=%k" "bibtex")
   "*Default command of BibTeX.
 Overridden with `%#BIBTEX CommandLine...' in the buffer.")
 
--- a/yatexprc.el	Tue Jan 02 23:28:35 2018 +0900
+++ b/yatexprc.el	Tue Jan 02 23:35:07 2018 +0900
@@ -1,7 +1,7 @@
 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*-
 ;;; 
 ;;; (c)1993-2017 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Tue Jan  2 17:50:40 2018 on firestorm
+;;; Last modified Tue Jan  2 23:31:34 2018 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -753,8 +753,10 @@
     (setq pparg (substring cmd 0 (string-match "[;&]" cmd)) ;rm multistmt
 	  pparg (substring pparg (rindex pparg ? ))	 ;get last arg
 	  pparg (substring pparg 0 (rindex pparg ?.))	 ;rm ext
-	  bibcmd (or (YaTeX-get-builtin "BIBTEX") bibtex-command))
-    (or (string-match "\\s " bibcmd)		;if bibcmd has no spaces,
+	  bibcmd (YaTeX-replace-format
+		  (or (YaTeX-get-builtin "BIBTEX") bibtex-command)
+		  "k" (YaTeX-kanji-ptex-mnemonic)))
+    (or (string-match "\\s [^-]" bibcmd)	;if bibcmd has no argument,
 	(setq bibcmd (concat bibcmd pparg)))	;append argument(== %#!)
     (and pp
 	 (stringp pp)
@@ -834,8 +836,10 @@
 		  (save-excursion (YaTeX-visit-main t) buffer-file-name)))
 	(mainroot (file-name-nondirectory (substring main 0 (rindex main ?.))))
 	(alist YaTeX-call-builtin-on-file)
-	(b-in (or (YaTeX-get-builtin builtin-type)
-		  (cdr (assoc builtin-type alist))))
+	(b-in (YaTeX-replace-format
+	       (or (YaTeX-get-builtin builtin-type)
+		   (cdr (assoc builtin-type alist)))
+	       "k" (YaTeX-kanji-ptex-mnemonic)))
 	(command b-in))
     (if (or update (null b-in))
 	(progn

yatex.org