mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-30 02:30:03 +00:00
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:
parent
f305a6f81a
commit
197d23cc6f
3
Makefile
3
Makefile
|
@ -156,7 +156,8 @@ LISPF = org.el \
|
||||||
ob-plantuml.el \
|
ob-plantuml.el \
|
||||||
ob-org.el \
|
ob-org.el \
|
||||||
ob-js.el \
|
ob-js.el \
|
||||||
ob-scheme.el
|
ob-scheme.el \
|
||||||
|
ob-lilypond.el
|
||||||
|
|
||||||
LISPFILES0 = $(LISPF:%=lisp/%)
|
LISPFILES0 = $(LISPF:%=lisp/%)
|
||||||
LISPFILES = $(LISPFILES0) lisp/org-install.el
|
LISPFILES = $(LISPFILES0) lisp/org-install.el
|
||||||
|
|
|
@ -31,8 +31,14 @@
|
||||||
(require 'ob)
|
(require 'ob)
|
||||||
(require 'ob-eval)
|
(require 'ob-eval)
|
||||||
(defalias 'lilypond-mode 'LilyPond-mode)
|
(defalias 'lilypond-mode 'LilyPond-mode)
|
||||||
|
|
||||||
|
(declare-function show-all "outline" ())
|
||||||
|
|
||||||
(add-to-list 'org-babel-tangle-lang-exts '("LilyPond" . "ly"))
|
(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"
|
(defconst ly-version "0.3"
|
||||||
"The version number of the file ob-lilypond.el.")
|
"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)))
|
(out-file (cdr (assoc :file params)))
|
||||||
(cmdline (or (cdr (assoc :cmdline 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
|
(with-temp-file in-file
|
||||||
(insert (org-babel-expand-body:dot body params)))
|
(insert (org-babel-expand-body:generic body params)))
|
||||||
|
|
||||||
(org-babel-eval
|
(org-babel-eval
|
||||||
(concat
|
(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)
|
(defun ly-version (&optional insert-at-point)
|
||||||
(interactive)
|
(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))
|
(when insert-at-point (insert version))
|
||||||
(message version))
|
(message version)))
|
||||||
|
|
||||||
(defun ly-switch-extension (file-name ext)
|
(defun ly-switch-extension (file-name ext)
|
||||||
"Utility command to swap current FILE-NAME extension with EXT"
|
"Utility command to swap current FILE-NAME extension with EXT"
|
||||||
|
|
Loading…
Reference in a new issue