yatex

changeset 372:e8f95c375526 dev

YaTeX-executable-find added
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 29 Dec 2014 22:15:11 +0900
parents f5b8e7415a25
children 1b2e55ef1026
files yatexlib.el
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/yatexlib.el	Mon Dec 29 22:14:08 2014 +0900
     1.2 +++ b/yatexlib.el	Mon Dec 29 22:15:11 2014 +0900
     1.3 @@ -1,7 +1,7 @@
     1.4  ;;; yatexlib.el --- YaTeX and yahtml common libraries
     1.5  ;;; 
     1.6  ;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Sun Dec 21 23:55:30 2014 on firestorm
     1.8 +;;; Last modified Mon Dec 29 13:54:17 2014 on sdr
     1.9  ;;; $Id$
    1.10  
    1.11  ;;; Code:
    1.12 @@ -891,6 +891,19 @@
    1.13  	      (buffer-string))
    1.14  	  (kill-buffer tbuf))))))
    1.15        
    1.16 +;;; (defun YaTeX-executable-find(cmd)...)
    1.17 +(fset 'YaTeX-executable-find
    1.18 +      (if (fboundp 'executable-find)
    1.19 +	  'executable-find
    1.20 +	(function (lambda (cmd)
    1.21 +		    (let ((list exec-path) path)
    1.22 +		      (catch 'exec
    1.23 +			(while list
    1.24 +			  (if (file-executable-p
    1.25 +			       (setq path (expand-file-name cmd (car list))))
    1.26 +			      (throw 'exec path))
    1.27 +			  (setq list (cdr list)))))))))
    1.28 +
    1.29  ;;;###autoload
    1.30  (defun YaTeX-reindent (col)
    1.31    "Remove current indentation and reindento to COL column."