ob-lilypond: add to make file and fix compiler warnings

* Makefile (LISPF): Adding ob-lilypond.el.
* lisp/ob-lilypond.el (show-all): Declaring function from outline.el.
  (org-babel-default-header-args:lilypond): Declared.
  (ly-process-basic): Use the appropriate prefix for the temporary
  file, and don't call a function from ob-dot.el.
  (ly-version): Let-bind a free variable.
This commit is contained in:
Eric Schulte 2011-07-07 19:33:56 -06:00
parent f305a6f81a
commit 197d23cc6f
2 changed files with 12 additions and 5 deletions

View File

@ -156,7 +156,8 @@ LISPF = org.el \
ob-plantuml.el \
ob-org.el \
ob-js.el \
ob-scheme.el
ob-scheme.el \
ob-lilypond.el
LISPFILES0 = $(LISPF:%=lisp/%)
LISPFILES = $(LISPFILES0) lisp/org-install.el

View File

@ -31,8 +31,14 @@
(require 'ob)
(require 'ob-eval)
(defalias 'lilypond-mode 'LilyPond-mode)
(declare-function show-all "outline" ())
(add-to-list 'org-babel-tangle-lang-exts '("LilyPond" . "ly"))
(defvar org-babel-default-header-args:lilypond '()
"Default header arguments for js code blocks.")
(defconst ly-version "0.3"
"The version number of the file ob-lilypond.el.")
@ -137,10 +143,10 @@ specific arguments to =org-babel-tangle="
(out-file (cdr (assoc :file params)))
(cmdline (or (cdr (assoc :cmdline params))
""))
(in-file (org-babel-temp-file "dot-")))
(in-file (org-babel-temp-file "lilypond-")))
(with-temp-file in-file
(insert (org-babel-expand-body:dot body params)))
(insert (org-babel-expand-body:generic body params)))
(org-babel-eval
(concat
@ -404,9 +410,9 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
(defun ly-version (&optional insert-at-point)
(interactive)
(setq version (format "ob-lilypond version %s" ly-version))
(let ((version (format "ob-lilypond version %s" ly-version)))
(when insert-at-point (insert version))
(message version))
(message version)))
(defun ly-switch-extension (file-name ext)
"Utility command to swap current FILE-NAME extension with EXT"