yatex
changeset 172:429d10a0d5b2 dev
YaTeX-typeset-buffer: Change the method of constructing ppcmd.
author | yuuji@gentei.org |
---|---|
date | Fri, 18 Feb 2011 14:50:34 +0900 |
parents | 670549efa5c2 |
children | 7dc3c2332da5 |
files | yatexprc.el |
diffstat | 1 files changed, 11 insertions(+), 12 deletions(-) [+] |
line diff
1.1 --- a/yatexprc.el Thu Feb 17 15:53:33 2011 +0900 1.2 +++ b/yatexprc.el Fri Feb 18 14:50:34 2011 +0900 1.3 @@ -2,7 +2,7 @@ 1.4 ;;; YaTeX process handler. 1.5 ;;; yatexprc.el 1.6 ;;; (c)1993-2010 by HIROSE Yuuji.[yuuji@yatex.org] 1.7 -;;; Last modified Thu Feb 17 15:50:32 2011 on firestorm 1.8 +;;; Last modified Fri Feb 18 10:35:39 2011 on firestorm 1.9 ;;; $Id$ 1.10 1.11 ;(require 'yatex) 1.12 @@ -304,12 +304,13 @@ 1.13 (YaTeX-save-buffers) 1.14 (let*((me (substring (buffer-name) 0 (rindex (buffer-name) ?.))) 1.15 (mydir (file-name-directory (buffer-file-name))) 1.16 - (cmd (YaTeX-get-latex-command t)) ppcmd 1.17 + (cmd (YaTeX-get-latex-command t)) pparg ppcmd 1.18 (cb (current-buffer))) 1.19 (and pp 1.20 (stringp pp) 1.21 - (setq ppcmd (concat pp (substring cmd (string-match "[ \t]" cmd))) 1.22 - ppcmd (substring ppcmd 0 (rindex ppcmd ?.)))) 1.23 + (setq pparg (substring cmd 0 (string-match "[;&]" cmd)) ;rm multistmt 1.24 + pparg (substring pparg (rindex pparg ? )) ;get last arg 1.25 + ppcmd (concat pp (substring pparg 0 (rindex pparg ?.)))));rm ext 1.26 (if (YaTeX-main-file-p) nil 1.27 (save-excursion 1.28 (YaTeX-visit-main t) ;search into main buffer 1.29 @@ -722,17 +723,15 @@ 1.30 (if (null preview-command) (setq preview-command dvi2-command)) 1.31 (let* ((latex-cmd (YaTeX-get-latex-command t)) 1.32 (rin (rindex latex-cmd ? )) 1.33 - (fname (if (> rin -1) (substring latex-cmd (1+ rin)) "")) 1.34 + (fname (if rin (substring latex-cmd (1+ rin)) "")) 1.35 (r (YaTeX-assoc-regexp preview-command YaTeX-dvi2-command-ext-alist)) 1.36 - (ext (if r (cdr r) "")) 1.37 - (period)) 1.38 + (ext (if r (cdr r) ""))) 1.39 (concat 1.40 (if (string= fname "") 1.41 - (setq fname (substring (file-name-nondirectory 1.42 - (buffer-file-name)) 1.43 - 0 -4)) 1.44 - (setq period (rindex fname ?.)) 1.45 - (setq fname (substring fname 0 (if (eq -1 period) nil period)))) 1.46 + (setq fname (substring (file-name-nondirectory 1.47 + (buffer-file-name)) 1.48 + 0 -4)) 1.49 + (setq fname (substring fname 0 (rindex fname ?.)))) 1.50 ext))) 1.51 1.52 (defun YaTeX-get-latex-command (&optional switch)