Mercurial > hgrepos > hgweb.cgi > yatex
diff yatexlib.el @ 138:b7b54906ac3b dev
add newpage.rb
author | yuuji@gentei.org |
---|---|
date | Wed, 07 Jul 2010 22:27:25 +0900 |
parents | 8703f090c628 |
children | b65b3dc543d1 |
line wrap: on
line diff
--- a/yatexlib.el Thu Jun 24 16:01:45 2010 +0900 +++ b/yatexlib.el Wed Jul 07 22:27:25 2010 +0900 @@ -2,7 +2,7 @@ ;;; YaTeX and yahtml common libraries, general functions and definitions ;;; yatexlib.el ;;; (c)1994-2009 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu May 27 15:09:44 2010 on firestorm +;;; Last modified Wed Jul 7 06:48:48 2010 on firestorm ;;; $Id$ ;; General variables @@ -822,6 +822,21 @@ (win-switch-to-window 1 (- last-command-char win:base-key))) ;;;###autoload +(defun YaTeX-command-to-string (cmd) + (if (fboundp 'shell-command-to-string) + (funcall 'shell-command-to-string cmd) + (let ((tbuf " *tmpout*")) + (if (get-buffer-create tbuf) (kill-buffer tbuf)) + (let ((standard-output (get-buffer-create tbuf))) + (unwind-protect + (save-excursion + (call-process + shell-file-name nil tbuf nil YaTeX-shell-command-option cmd) + (set-buffer tbuf) + (buffer-string)) + (kill-buffer tbuf)))))) + +;;;###autoload (defun YaTeX-reindent (col) "Remove current indentation and reindento to COL column." (save-excursion