yatex
changeset 171:670549efa5c2 dev
YaTeX-call-command-on-file: Use last input command line as default.
author | yuuji@gentei.org |
---|---|
date | Thu, 17 Feb 2011 15:53:33 +0900 |
parents | 269fb1992c2d |
children | 429d10a0d5b2 |
files | yatexprc.el |
diffstat | 1 files changed, 16 insertions(+), 12 deletions(-) [+] |
line diff
1.1 --- a/yatexprc.el Wed Feb 16 21:39:22 2011 +0900 1.2 +++ b/yatexprc.el Thu Feb 17 15:53:33 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 Wed Oct 20 12:32:44 2010 on firestorm 1.8 +;;; Last modified Thu Feb 17 15:50:32 2011 on firestorm 1.9 ;;; $Id$ 1.10 1.11 ;(require 'yatex) 1.12 @@ -357,20 +357,24 @@ 1.13 "Holds history list of YaTeX-call-command-on-file.") 1.14 (put 'YaTeX-call-command-history 'no-default t) 1.15 (defun YaTeX-call-command-on-file (base-cmd buffer &optional file) 1.16 - "Call external command BASE-CMD int the BUFFER. 1.17 + "Call external command BASE-CMD in the BUFFER. 1.18 By default, pass the basename of current file. Optional 3rd argument 1.19 FILE changes the default file name." 1.20 (YaTeX-save-buffers) 1.21 - (YaTeX-typeset 1.22 - (read-string-with-history 1.23 - "Call command: " 1.24 - (concat base-cmd " " 1.25 - (let ((me (file-name-nondirectory (or file buffer-file-name)))) 1.26 - (if (string-match "\\.tex" me) 1.27 - (substring me 0 (match-beginning 0)) 1.28 - me))) 1.29 - 'YaTeX-call-command-history) 1.30 - buffer)) 1.31 + (let ((default (concat base-cmd " " 1.32 + (let ((me (file-name-nondirectory 1.33 + (or file buffer-file-name)))) 1.34 + (if (string-match "\\.tex" me) 1.35 + (substring me 0 (match-beginning 0)) 1.36 + me))))) 1.37 + (or YaTeX-call-command-history 1.38 + (setq YaTeX-call-command-history (list default))) 1.39 + (YaTeX-typeset 1.40 + (read-string-with-history 1.41 + "Call command: " 1.42 + (car YaTeX-call-command-history) 1.43 + 'YaTeX-call-command-history) 1.44 + buffer))) 1.45 1.46 (defun YaTeX-bibtex-buffer (cmd) 1.47 "Pass the bibliography data of editing file to bibtex."