I have written a guitar piece, where the last note of a lead-in bar is
followed
by a hammer-on to the first note of the next bar. A slur works fine for
this,
except when the passage is repeated and the last note of the first-time
repeat
bar is to be hammered-on to the first note of the repeated section.
All the information is there for Lilypond to "know" that the note at the
end of
the first-time repeat is to be followed by the first note of the repeated
section, but it obviously doesn't check this.
The following code fragment demonstrates the problem: