comparison yatexprc.el @ 605:38a414d755c1 draft dev

PDFnative typesetter
author HIROSE Yuuji <yuuji@gentei.org>
date Fri, 02 Dec 2022 08:42:22 +0859
parents 638284a7a9d0
children
comparison
equal deleted inserted replaced
604:9ec429ace1c5 605:38a414d755c1
1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 1 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*-
2 ;;; 2 ;;;
3 ;;; (c)1993-2022 by HIROSE Yuuji.[yuuji@yatex.org] 3 ;;; (c)1993-2022 by HIROSE Yuuji.[yuuji@yatex.org]
4 ;;; Last modified Thu Sep 29 09:56:02 2022 on firestorm 4 ;;; Last modified Thu Dec 1 19:13:20 2022 on firestorm
5 ;;; $Id$ 5 ;;; $Id$
6 6
7 ;;; Code: 7 ;;; Code:
8 ;(require 'yatex) 8 ;(require 'yatex)
9 (require 'yatexlib) 9 (require 'yatexlib)
182 tobecalled shortname 182 tobecalled shortname
183 (thiscmd (get 'YaTeX-typeset-process 'thiscmd)) 183 (thiscmd (get 'YaTeX-typeset-process 'thiscmd))
184 (ppprop (get 'YaTeX-typeset-process 'ppcmd)) 184 (ppprop (get 'YaTeX-typeset-process 'ppcmd))
185 (ppcmd (cdr (assq proc ppprop))) 185 (ppcmd (cdr (assq proc ppprop)))
186 (bcprop (get 'YaTeX-typeset-process 'bibcmd)) 186 (bcprop (get 'YaTeX-typeset-process 'bibcmd))
187 (bibcmd (cdr (assq proc bcprop)))) 187 (bibcmd (cdr (assq proc bcprop)))
188 (useluatex (string-match "lua.*tex" thiscmd)))
188 (put 'YaTeX-typeset-process 'ppcmd ;erase ppcmd 189 (put 'YaTeX-typeset-process 'ppcmd ;erase ppcmd
189 (delq (assq proc ppprop) ppprop)) 190 (delq (assq proc ppprop) ppprop))
190 (put 'YaTeX-typeset-process 'bibcmd ;erase bibcmd 191 (put 'YaTeX-typeset-process 'bibcmd ;erase bibcmd
191 (delq (assq proc bcprop) bcprop)) 192 (delq (assq proc bcprop) bcprop))
192 ;; save-excursion isn't the right thing if 193 ;; save-excursion isn't the right thing if
284 (cond 285 (cond
285 ((and ppcmd (symbolp ppcmd) (fboundp ppcmd)) 286 ((and ppcmd (symbolp ppcmd) (fboundp ppcmd))
286 ;; If ppcmd is set and it is a function symbol, 287 ;; If ppcmd is set and it is a function symbol,
287 ;; call it whenever command succeeded or not 288 ;; call it whenever command succeeded or not
288 (funcall ppcmd)) 289 (funcall ppcmd))
289 ((and ppcmd (string-match "finish" mes)) 290 ((and ppcmd (string-match "finish" mes)
290 (insert (format "=======> Success! Calling %s\n" ppcmd)) 291 ;; It is bad way to detect the necessity of
292 ;; pdf-conversion by seeing typesetter name because
293 ;; new typesetter other than lua(la)tex might come.
294 ;; More reasonable way is to determine by the
295 ;; existence of PDF file.
296 (not useluatex))
297 (insert (format "=======> Success! Calling %s\n" ppcmd))
291 (setq mode-name ; set process name 298 (setq mode-name ; set process name
292 (concat 299 (concat
293 mode-name "+" 300 mode-name "+"
294 (substring ppcmd 0 (string-match " " ppcmd)))) 301 (substring ppcmd 0 (string-match " " ppcmd))))
295 ; to reach here, 'start-process exists on this emacsen 302 ; to reach here, 'start-process exists on this emacsen

yatex.org