From 197d23cc6fa8a7a70844556d4697bb2ae7d5c6eb Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Thu, 7 Jul 2011 19:33:56 -0600 Subject: [PATCH] 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. --- Makefile | 3 ++- lisp/ob-lilypond.el | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b65bcb13a..fe833d732 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index fc6b3503f..6971a6993 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -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"