]> git.donarmstrong.com Git - lilypond.git/commitdiff
#4747: Remove (all) uses of is-absolute?
authorUrs Liska <ul@openlilylib.org>
Tue, 19 Jan 2016 09:52:33 +0000 (10:52 +0100)
committerUrs Liska <ul@openlilylib.org>
Sun, 24 Jan 2016 20:24:52 +0000 (21:24 +0100)
The check for absolute paths in  in output-ps.scm
and -svg.scm is unnecessary because
(car ly:input-file-line-char-column a-location)
always returns an absolute, slashified path

Now is-absolute? is not used anymore by LilyPond itself.

scm/output-ps.scm
scm/output-svg.scm

index 70b13848e4aa6ad898bac04f79d33c80dfdaf838..69f277203934985a01979476b56df1803c5a1bae 100644 (file)
                                 (ly:in-event-class? cause t))
                               point-and-click))))
             (let* ((location (ly:input-file-line-char-column music-origin))
-                   (raw-file (car location))
-                   (file (if (is-absolute? raw-file)
-                             raw-file
-                             (string-append (ly-getcwd) "/" raw-file)))
                    (x-ext (ly:grob-extent grob grob X))
                    (y-ext (ly:grob-extent grob grob Y)))
 
                              ;; Backslashes are not valid
                              ;; file URI path separators.
                              (ly:string-percent-encode
-                              (ly:string-substitute "\\" "/" file))
+                              (ly:string-substitute "\\" "/" (car location)))
 
                              (cadr location)
                              (caddr location)
index 78bda3c35b8c88f376fadc6f9d471597ca1ba482..ca086318d7810d1f4769d59e6d2e88d4fc28668d 100644 (file)
                     (else (any (lambda (t)
                                  (ly:in-event-class? cause t))
                                point-and-click)))
-              (let* ((location (ly:input-file-line-char-column music-origin))
-                     (raw-file (car location))
-                     (file (if (is-absolute? raw-file)
-                               raw-file
-                               (string-append (ly-getcwd) "/" raw-file))))
-                
+              (let* ((location (ly:input-file-line-char-column music-origin)))
+
                 (ly:format "<a style=\"color:inherit;\" xlink:href=\"textedit://~a:~a:~a:~a\">\n"
                            ;; Backslashes are not valid
                            ;; file URI path separators.
                            (ly:string-percent-encode
-                            (ly:string-substitute "\\" "/" file))
-                           
+                            (ly:string-substitute "\\" "/" (car location)))
+
                            (cadr location)
                            (caddr location)
                            (1+ (cadddr location))))))))