From 16bd78584237ed5699b4fe8615a8f62329b7e811 Mon Sep 17 00:00:00 2001 From: Martyn Jago Date: Wed, 21 Mar 2012 09:33:34 +0000 Subject: [PATCH 2/4] Leave versioning to Org. * lisp/ob-lilypond.el: Leave versioning to Org * testing/lisp/test-ob-lilypond.el: Leave versioning to Org --- lisp/ob-lilypond.el | 11 +---------- testing/lisp/test-ob-lilypond.el | 10 ---------- 2 files changed, 1 insertions(+), 20 deletions(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index 0404c7e..84b4c1d 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -44,9 +44,6 @@ NOTE: The arguments are determined at lilypond compile time. See (ly-set-header-args)") -(defconst ly-version "7.6" - "The version number of the file ob-lilypond.el.") - (defvar ly-compile-post-tangle t "Following the org-babel-tangle (C-c C-v t) command, ly-compile-post-tangle determines whether ob-lilypond should @@ -436,13 +433,7 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" (message (concat "Arrange mode has been " (if ly-arrange-mode "ENABLED." "DISABLED.")))) -(defun ly-version (&optional insert-at-point) - (interactive) - (let ((version (format "ob-lilypond version %s" ly-version))) - (when insert-at-point (insert 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" (concat (file-name-sans-extension diff --git a/testing/lisp/test-ob-lilypond.el b/testing/lisp/test-ob-lilypond.el index 306c48a..1a60eab 100644 --- a/testing/lisp/test-ob-lilypond.el +++ b/testing/lisp/test-ob-lilypond.el @@ -38,16 +38,6 @@ (should-error (org-babel-prep-session:lilypond nil nil)) :type 'error) -(ert-deftest ob-lilypond/ly-version-const () - (should (boundp 'ly-version))) - -(ert-deftest ob-lilypond/ly-version-command () - (should (equal "ob-lilypond version 7.6" (ly-version))) - (with-temp-buffer - (ly-version t) - (should (equal "ob-lilypond version 7.6" - (buffer-substring (point-min) (point-max)))))) - (ert-deftest ob-lilypond/ly-compile-lilyfile () (should (equal `(,(ly-determine-ly-path) ;program -- 1.7.3.4