-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not sure if this is correct, since warning message points to __main__.ily rather than line in example doc.
- Loading branch information
1 parent
3538fb2
commit ba21207
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,10 +120,17 @@ | |
#(if (assq-ref props 'apply) | ||
;; If set, add editorial command | ||
(let* ((edition (string->symbol (assoc-ref props 'apply))) | ||
(edit (getChildOption `(scholarly editorial ,edition) (car item)))) | ||
(if (ly:music-function? edit) | ||
(edit mus) | ||
#{ \once #edit #mus #})) | ||
(edit (getChildOptionWithFallback | ||
`(scholarly editorial ,edition) | ||
(car item) | ||
#f))) | ||
(if (not (eq? edit #f)) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
(if (ly:music-function? edit) | ||
(edit mus) | ||
#{ \once #edit #mus #}) | ||
(begin | ||
(oll:warn "Edition option not set: ~a (~a)" edition (car item)) | ||
This comment has been minimized.
Sorry, something went wrong.
uliska
Contributor
|
||
mus))) | ||
mus) | ||
#}) | ||
(begin | ||
|
1 comment
on commit ba21207
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I wanted to suggest.
Maybe "Edition option" is not what helps the user understand what has been done wrong. Maybe rather something like "Editorial command ~a not set for ~a"
?
This line can be expressed much simpler as
(if edit
.edit
will be either#f
or any Scheme value at that point. And theif
will switch to the#t
branch of execution when the condition evaluates to "a true value", not necessarily#t
.