yatex
diff yatexprc.el @ 49:eb0512bfcb7f
Abolish user-article table.
Use normal read-string instead.
Supply smart add-in function for documentstyle.
Update user dictionary whenever new words entered.
Enhance [prefix] c.
Allow user defined sectioning commands in yatexsec.
author | yuuji |
---|---|
date | Fri, 25 Nov 1994 08:26:13 +0000 |
parents | d7e7b4654058 |
children | b0371b6ed799 |
line diff
1.1 --- a/yatexprc.el Mon Oct 24 17:26:47 1994 +0000 1.2 +++ b/yatexprc.el Fri Nov 25 08:26:13 1994 +0000 1.3 @@ -2,7 +2,7 @@ 1.4 ;;; YaTeX process handler. 1.5 ;;; yatexprc.el 1.6 ;;; (c )1993-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 1.7 -;;; Last modified Thu Oct 20 16:48:41 1994 on figaro 1.8 +;;; Last modified Fri Nov 25 03:31:46 1994 on VFR 1.9 ;;; $Id$ 1.10 1.11 (require 'yatex) 1.12 @@ -19,6 +19,11 @@ 1.13 (defvar YaTeX-current-TeX-buffer nil 1.14 "Keeps the buffer on which recently typeset run.") 1.15 1.16 +(defvar YaTeX-shell-command-option 1.17 + (or (and (boundp 'shell-command-option) shell-command-option) 1.18 + (if YaTeX-dos "/c" "-c")) 1.19 + "Shell option for command execution.") 1.20 + 1.21 (if YaTeX-typeset-buffer-syntax nil 1.22 (setq YaTeX-typeset-buffer-syntax 1.23 (make-syntax-table (standard-syntax-table))) 1.24 @@ -50,12 +55,14 @@ 1.25 (cond 1.26 (YaTeX-dos ;if MS-DOS 1.27 (YaTeX-put-nonstopmode) 1.28 - (call-process shell-file-name nil buffer nil "/c" command) 1.29 + (call-process 1.30 + shell-file-name nil buffer nil YaTeX-shell-command-option command) 1.31 (YaTeX-remove-nonstopmode)) 1.32 (t ;if UNIX 1.33 (set-process-buffer 1.34 (setq YaTeX-typeset-process 1.35 - (start-process "LaTeX" buffer shell-file-name "-c" command)) 1.36 + (start-process "LaTeX" buffer shell-file-name 1.37 + YaTeX-shell-command-option command)) 1.38 (get-buffer buffer)) 1.39 (set-process-sentinel YaTeX-typeset-process 'YaTeX-typeset-sentinel))) 1.40 (message (format "Calling `%s'..." command)) 1.41 @@ -302,9 +309,11 @@ 1.42 (set-buffer (get-buffer-create buffer)) 1.43 (erase-buffer) 1.44 (if YaTeX-dos 1.45 - (call-process shell-file-name nil buffer nil "/c " command) 1.46 + (call-process 1.47 + shell-file-name nil buffer nil YaTeX-shell-command-option command) 1.48 (set-process-buffer 1.49 - (start-process "system" buffer shell-file-name "-c" command) 1.50 + (start-process 1.51 + "system" buffer shell-file-name YaTeX-shell-command-option command) 1.52 (get-buffer buffer)))) 1.53 ) 1.54 1.55 @@ -330,21 +339,24 @@ 1.56 (setq dvi2-command preview-command) ;`dvi2command' is buffer local 1.57 (save-excursion 1.58 (YaTeX-visit-main t) 1.59 - (let ((pbuffer "*dvi-preview*")) 1.60 + (let ((pbuffer "*dvi-preview*") (dir default-directory)) 1.61 (YaTeX-showup-buffer 1.62 pbuffer (function (lambda (x) (nth 3 (window-edges x))))) 1.63 (set-buffer (get-buffer-create pbuffer)) 1.64 (erase-buffer) 1.65 + (setq default-directory dir) ;for 18 1.66 + (cd dir) ;for 19 1.67 (cond 1.68 (YaTeX-dos ;if MS-DOS 1.69 (send-string-to-terminal "\e[2J\e[>5h") ;CLS & hide cursor 1.70 (call-process shell-file-name "con" "*dvi-preview*" nil 1.71 - "/c " preview-command preview-file) 1.72 + YaTeX-shell-command-option preview-command preview-file) 1.73 (send-string-to-terminal "\e[>5l") ;show cursor 1.74 (redraw-display)) 1.75 (t ;if UNIX 1.76 (set-process-buffer 1.77 - (start-process "preview" "*dvi-preview*" shell-file-name "-c" 1.78 + (start-process "preview" "*dvi-preview*" shell-file-name 1.79 + YaTeX-shell-command-option 1.80 (concat preview-command " " preview-file)) 1.81 (get-buffer pbuffer)) 1.82 (message 1.83 @@ -594,14 +606,15 @@ 1.84 (erase-buffer) 1.85 (cond 1.86 (YaTeX-dos 1.87 - (call-process shell-file-name "con" "*dvi-printing*" nil "/c " cmd)) 1.88 + (call-process shell-file-name "con" "*dvi-printing*" nil 1.89 + YaTeX-shell-command-option cmd)) 1.90 (t 1.91 (set-process-buffer 1.92 - (start-process "print" "*dvi-printing*" shell-file-name "-c" cmd) 1.93 + (start-process "print" "*dvi-printing*" shell-file-name 1.94 + YaTeX-shell-command-option cmd) 1.95 (get-buffer lbuffer)) 1.96 - (message (concat "Starting " cmd " to printing " 1.97 - (YaTeX-get-preview-file-name))))) 1.98 - )) 1.99 + (message "Starting printing command: %s..." cmd))) 1.100 + )) 1.101 ) 1.102 1.103 (defun YaTeX-main-file-p ()