Skip to content

Commit ce76c88

Browse files
committed
Merge pull request #107 from openlilylib/dev/os-path
Some os-path touches
2 parents 97848ed + d635b13 commit ce76c88

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

ly/_internal/utilities/os-path.scm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
(symbol->string elt)))
6666
path)))
6767

68-
(define-public (join-unix-path path-list)
68+
(define-public (join-unix-path path)
6969
"Returns a Unix formatted path string from a (symbol?/string?) list."
70-
(string-join (split-path path-list) "/"))
70+
(string-join (split-path path) "/"))
7171

7272
(define-public (join-dot-path path)
7373
"Returns a string in dot-notation (to be displayed).
@@ -132,7 +132,7 @@
132132

133133
(define-public (normalize-location location)
134134
"Returns a normalized path to the given location object"
135-
(car (ly:input-file-line-char-column location)))
135+
(normalize-path (car (ly:input-file-line-char-column location))))
136136

137137
(define-public (location-extract-path location)
138138
"Returns the normalized path from a LilyPond location
@@ -154,14 +154,14 @@
154154
(define-scheme-function (parser location)()
155155
(normalize-location location)))
156156

157-
(define-public (this-file-compiled parser location)
157+
(define-public (this-file-compiled? parser location)
158158
"Return #t if the file where this function is called
159159
is the one that is currently compiled by LilyPond."
160160
(let ((outname (ly:parser-output-name parser))
161161
(locname (normalize-location location)))
162162
(regexp-match? (string-match (format "^(.*/)?~A\\.i?ly$" outname) locname))))
163163

164-
;; LilyPond format wrapper for this-file-compiled
164+
;; LilyPond format wrapper for this-file-compiled?
165165
(define-public thisFileCompiled
166166
(define-scheme-function (parser location)()
167-
(this-file-compiled parser location)))
167+
(this-file-compiled? parser location)))

ly/gridly/__main__.ily

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,6 @@ gridCheck =
151151
(map (lambda (x) (+ 1 x))
152152
(iota (hash-ref music-grid-meta #:segments)))))
153153

154-
%%% This is taken from Lalily
155-
#(define (test-location? parser location)
156-
(let ((outname (ly:parser-output-name parser))
157-
(locname (car (ly:input-file-line-char-column location))))
158-
(regexp-match? (string-match (format "^(.*/)?~A\\.i?ly$" outname) locname))))
159-
160154
%%% Grid initialization
161155
gridInit =
162156
#(define-void-function
@@ -358,7 +352,7 @@ gridCompileCell =
358352
(string? number?)
359353
(check-grid)
360354
(check-coords part segment)
361-
(if (test-location? parser location)
355+
(if (this-file-compiled? parser location)
362356
(let ((cache-segment #{ \getOption gridly.segment-range #}))
363357
(ly:message "Compiling test file")
364358
(if (not (get-music-cell part segment))

0 commit comments

Comments
 (0)