From 7a56da508e9968e2d897baab104cd1da82b779d6 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 12 May 2000 19:20:20 +0200
Subject: [PATCH] patch::: 1.3.50.jcn1

1.3.50.jcn1
===========

* Don't use regex in chord-names.scm under windows; hybrid chordnames
  user+calculated will be partly broken.
---
 CHANGES             | 5 +++++
 VERSION             | 2 +-
 scm/chord-names.scm | 8 +++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/CHANGES b/CHANGES
index 2be8dd6bfb..28a0e7d45b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.3.50.jcn1
+===========
+
+* Don't use regex in chord-names.scm under windows; hybrid chordnames
+  user+calculated will be partly broken.
 
 1.3.49.hwn2
 ===========
diff --git a/VERSION b/VERSION
index c03a84f994..4be4d9c8ad 100644
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=50
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/scm/chord-names.scm b/scm/chord-names.scm
index 738fdb4abe..a7ef7bf276 100644
--- a/scm/chord-names.scm
+++ b/scm/chord-names.scm
@@ -10,6 +10,11 @@
    (ice-9 regex)
    )
 
+;; The regex module may not be available, or may be broken.
+(define use-regex
+  (let ((os (string-downcase (vector-ref (uname) 0))))
+    (not (equal? "cygwin" (substring os 0 (min 6 (string-length os)))))))
+
 ;;
 ;; (octave notename accidental)
 ;;
@@ -249,7 +254,8 @@
     (apply append (pitch->text-banter tonic)
 	   (if user-name user-name '())
 	   ;; why does list->string not work, format seems only hope...
-	   (if (and (string-match "super" (format "~s" user-name))
+	   (if (and use-regex
+		    (string-match "super" (format "~s" user-name))
 		    (or (pair? additions)
 			(pair? subtractions)))
 	       '(("/" (type . "super")))
-- 
2.39.5