]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-guile.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / lily-guile.cc
index 3c033d70f53445f2212d411d55d3456e71aaaa88..f37380f024fc4b65fc9b368564c26dd3dd4a3190 100644 (file)
@@ -25,6 +25,7 @@
 #include <cstring> /* strdup, strchr */
 #include <cctype>
 
+using namespace std;
 
 #include "dimensions.hh"
 #include "direction.hh"
@@ -41,9 +42,6 @@
 #include "warn.hh"
 #include "lily-imports.hh"
 
-using std::string;
-using std::vector;
-
 /*
   symbols/strings.
  */
@@ -531,6 +529,18 @@ display_list (SCM s)
   return SCM_UNSPECIFIED;
 }
 
+// Needed as complement to int_list_to_slice since scm_c_memq refuses
+// to work with dotted lists.
+
+SCM
+ly_memv (SCM v, SCM l)
+{
+  for (; scm_is_pair (l); l = scm_cdr (l))
+    if (scm_is_true (scm_eqv_p (v, scm_car (l))))
+      return l;
+  return SCM_BOOL_F;
+}
+
 Slice
 int_list_to_slice (SCM l)
 {