summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrs Liska <ul@openlilylib.org>2016-01-19 10:52:33 +0100
committerUrs Liska <ul@openlilylib.org>2016-01-24 21:24:52 +0100
commitf30a8189adbbeefa2103e2c2e194040f66bc2291 (patch)
treec3309323df0166336d51226a336249de73739647
parent60e2159ae8e7c6c6da0f2ecccc0cd05d3eaf7b55 (diff)
#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.
-rw-r--r--scm/output-ps.scm6
-rw-r--r--scm/output-svg.scm12
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 "<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))))))))