From f30a8189adbbeefa2103e2c2e194040f66bc2291 Mon Sep 17 00:00:00 2001
From: Urs Liska
Date: Tue, 19 Jan 2016 10:52:33 +0100
Subject: [PATCH] #4747: Remove (all) uses of is-absolute?
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 | 6 +-----
scm/output-svg.scm | 12 ++++--------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/scm/output-ps.scm b/scm/output-ps.scm
index 70b13848e4..69f2772039 100644
--- a/scm/output-ps.scm
+++ b/scm/output-ps.scm
@@ -157,10 +157,6 @@
(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)))
@@ -175,7 +171,7 @@
;; 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)
diff --git a/scm/output-svg.scm b/scm/output-svg.scm
index 78bda3c35b..ca086318d7 100644
--- a/scm/output-svg.scm
+++ b/scm/output-svg.scm
@@ -485,18 +485,14 @@
(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 "\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))))))))
--
2.39.5