平衡点
2011/12/22
_ んー.
やること大杉 + 時間無い...という愚痴
_ CodeRay のバージョンを上げてみるテスト
lisp のシンタックスハイライトが聞くと良いんだけれど, どうかな?
# source: lisp
;;; ob-tangle より自分用に幾つか関数を設定
;;
;;; my:org-babel-tangle-and-compile-file
;;
;; 指定された org ファイルから emacs-lisp を export してbyte-compile する.
;; - Make から呼ぶ事も想定しているので load はしない.
;;
(defun my:org-babel-tangle-and-compile-file (file)
"export emacs-lisp and byte-compile from org files (not load).
originally ob-tangle.el"
(interactive "fFile to load: ")
(flet ((age (file)
(float-time
(time-subtract (current-time)
(nth 5 (or (file-attributes (file-truename file))
(file-attributes file)))))))
(let* ((base-name (file-name-sans-extension file))
(exported-file (concat base-name ".el"))
(compiled-file (concat base-name ".elc")))
;; tangle if the org-mode file is newer than the elisp file
(unless (and (file-exists-p compiled-file)
(> (age file) (age compiled-file)))
(org-babel-tangle-file file exported-file "emacs-lisp")
(byte-compile-file exported-file)))))
...駄目か. やっぱそんなに簡単には書けないか.
Fortran と lisp に対応できたら文句無いんだけれどなぁ...
[ツッコミを入れる]