]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-invoke-editor.scm
Run `make grand-replace'.
[lilypond.git] / scripts / lilypond-invoke-editor.scm
index e03a2afe0c0edb196bee2c00457ab0650f2b2b51..7ff21871fe4ac444e7a07c6f984fca5992344f66 100644 (file)
@@ -4,7 +4,7 @@
 ;;;;
 ;;;; source file of the GNU LilyPond music typesetter
 ;;;;
-;;;; (c) 2005--2007 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2005--2008 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;; gui debug helper
 ;; (define (exit x) (system "sleep 10"))
@@ -42,7 +42,7 @@
     (define-public (_ x) x))
 
 (define (show-version port)
-  (format port "~a (GNU LilyPond) ~a \n" PROGRAM-NAME TOPLEVEL-VERSION))
+  (format port "~a (GNU LilyPond) ~a\n" PROGRAM-NAME TOPLEVEL-VERSION))
 
 (define (show-help port)
   (format port (_ "Usage: lilypond-invoke-editor [textedit://]FILE:LINE:CHAR:COLUMN
@@ -127,15 +127,16 @@ Options:
 
 (define (strip-framework-path var)
   (define pat "lilypond/usr")
-  (let*
-      ((val (getenv var))
-       (paths (string-split val #\:))
-       (without (remove (lambda (s) (string-contains s pat))
-                       paths)))
-
-    (if (not (= (length without)
-               (length paths)))
-       (setenv var (string-join without ":")))))
+  (if (getenv var)
+      (let*
+         ((val (getenv var))
+          (paths (string-split val #\:))
+          (without (remove (lambda (s) (string-contains s pat))
+                           paths)))
+       
+       (if (not (= (length without)
+                   (length paths)))
+           (setenv var (string-join without ":"))))))
 
 (define (main args)
   (let ((files (parse-options args)))