Mercurial > hgrepos > hgweb.cgi > 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 wrap: on
line diff
--- a/yatexlib.el Mon Dec 29 22:14:08 2014 +0900 +++ b/yatexlib.el Mon Dec 29 22:15:11 2014 +0900 @@ -1,7 +1,7 @@ ;;; yatexlib.el --- YaTeX and yahtml common libraries ;;; ;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 21 23:55:30 2014 on firestorm +;;; Last modified Mon Dec 29 13:54:17 2014 on sdr ;;; $Id$ ;;; Code: @@ -891,6 +891,19 @@ (buffer-string)) (kill-buffer tbuf)))))) +;;; (defun YaTeX-executable-find(cmd)...) +(fset 'YaTeX-executable-find + (if (fboundp 'executable-find) + 'executable-find + (function (lambda (cmd) + (let ((list exec-path) path) + (catch 'exec + (while list + (if (file-executable-p + (setq path (expand-file-name cmd (car list)))) + (throw 'exec path)) + (setq list (cdr list))))))))) + ;;;###autoload (defun YaTeX-reindent (col) "Remove current indentation and reindento to COL column."