yatex

diff yatexlib.el @ 138:b7b54906ac3b

add newpage.rb
author yuuji@gentei.org
date Wed, 07 Jul 2010 22:27:25 +0900
parents 8703f090c628
children b65b3dc543d1
line diff
     1.1 --- a/yatexlib.el	Thu May 27 16:37:44 2010 +0900
     1.2 +++ b/yatexlib.el	Wed Jul 07 22:27:25 2010 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX and yahtml common libraries, general functions and definitions
     1.5  ;;; yatexlib.el
     1.6  ;;; (c)1994-2009 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Thu May 27 15:09:44 2010 on firestorm
     1.8 +;;; Last modified Wed Jul  7 06:48:48 2010 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;; General variables
    1.12 @@ -822,6 +822,21 @@
    1.13    (win-switch-to-window 1 (- last-command-char win:base-key)))
    1.14  
    1.15  ;;;###autoload
    1.16 +(defun YaTeX-command-to-string (cmd)
    1.17 +  (if (fboundp 'shell-command-to-string)
    1.18 +      (funcall 'shell-command-to-string cmd)
    1.19 +    (let ((tbuf " *tmpout*"))
    1.20 +      (if (get-buffer-create tbuf) (kill-buffer tbuf))
    1.21 +      (let ((standard-output (get-buffer-create tbuf)))
    1.22 +	(unwind-protect
    1.23 +	    (save-excursion
    1.24 +	      (call-process
    1.25 +	       shell-file-name nil tbuf nil YaTeX-shell-command-option cmd)
    1.26 +	      (set-buffer tbuf)
    1.27 +	      (buffer-string))
    1.28 +	  (kill-buffer tbuf))))))
    1.29 +      
    1.30 +;;;###autoload
    1.31  (defun YaTeX-reindent (col)
    1.32    "Remove current indentation and reindento to COL column."
    1.33    (save-excursion