From 7d3fa8cb4799303da8e5fd2ead35f1ac32180157 Mon Sep 17 00:00:00 2001
From: Valentin Villenave <valentin@villenave.net>
Date: Thu, 21 Apr 2016 17:35:35 +0200
Subject: [PATCH] 'embed-source-code should disregard Scheme-generated input

(... for now at least).

This fixes the include-string.ly regtest, and a few others,
that previously could not be compiled when enabling
the -dembed-source-code switch.
---
 scm/framework-ps.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm
index d3234b3329..ca3372ca92 100644
--- a/scm/framework-ps.scm
+++ b/scm/framework-ps.scm
@@ -483,8 +483,11 @@
   (if (ly:get-option 'embed-source-code)
       (let ((source-list (delete-duplicates
                           (remove (lambda (str)
-                                    (string-contains str
-                                      (ly:get-option 'datadir)))
+                                    (or
+                                     (string-contains str
+                                       (ly:get-option 'datadir))
+                                     (string=? str
+                                       "<included string>")))
                             (ly:source-files)))))
          (display "\n/pdfmark where
 {pop} {userdict /pdfmark /cleartomark load put} ifelse" port)
-- 
2.39.5