X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-invoke-editor.scm;h=e5383706655560b23225b93710ed01c7e72d9e80;hb=f03e58bb0d24330204ce7c8b70904707ef07ecca;hp=e03a2afe0c0edb196bee2c00457ab0650f2b2b51;hpb=5842c0a15dc9683fc74996c6703ea33d4dd43ad0;p=lilypond.git diff --git a/scripts/lilypond-invoke-editor.scm b/scripts/lilypond-invoke-editor.scm index e03a2afe0c..e538370665 100644 --- a/scripts/lilypond-invoke-editor.scm +++ b/scripts/lilypond-invoke-editor.scm @@ -1,10 +1,23 @@ #!@GUILE@ -s !# ;;;; lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode + +;;;; Copyright (C) 2005--2009 Jan Nieuwenhuizen + +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. ;;;; -;;;; (c) 2005--2007 Jan Nieuwenhuizen +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . ;; gui debug helper ;; (define (exit x) (system "sleep 10")) @@ -42,7 +55,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 +140,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)))