From 1334c5f9e0824db4adbb4cd949406f7bfdee9524 Mon Sep 17 00:00:00 2001
From: David Kastrup <dak@gnu.org>
Date: Tue, 14 Mar 2017 11:29:42 +0100
Subject: [PATCH] Issue 5094: Change error message for unrecognized strings

Instead of mentioning the modes in which arbitrary strings would be
permissible, state that the string is not a note name.  This is more
likely to be helpful to users, particularly in the case of wrong
notename language.
---
 lily/parser.yy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lily/parser.yy b/lily/parser.yy
index 35d858c46f..d4ab27c2bb 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -3600,7 +3600,7 @@ lyric_element:
 	}
 	| STRING {
 		if (!parser->lexer_->is_lyric_state ())
-			parser->parser_error (@1, _ ("unrecognized string, not in text script or \\lyricmode"));
+			parser->parser_error (@1, _f ("not a note name: %s", ly_scm2string ($1)));
 		$$ = $1;
 	}
 	| LYRIC_ELEMENT
-- 
2.39.5