--- a/sh.err.c
+++ b/sh.err.c
@@ -188,7 +188,12 @@ extern int enterhist;
 #define ERR_BADCOLORVAR	134
 #define ERR_EOF		135
 #define ERR_UNAVAILABLE	136
-#define NO_ERRORS	137
+#define ERR_FUNC	137
+#define ERR_RETURN	138
+#define ERR_FUNCBEGIN	139
+#define ERR_FUNCALNUM	140
+#define ERR_RECURSION	141
+#define NO_ERRORS	142
 
 static const char *elst[NO_ERRORS] INIT_ZERO_STRUCT;
 
@@ -367,7 +372,11 @@ errinit(void)
     elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown %s color variable '%c%c'");
     elst[ERR_EOF] = CSAVS(1, 138, "Unexpected end of file");
     elst[ERR_UNAVAILABLE] = CSAVS(1, 139, "%s: Feature is not available for this platform");
-
+    elst[ERR_FUNC] = CSAVS(1, 140, "%S: Undeclared function");
+    elst[ERR_RETURN] = CSAVS(1, 141, "Not in a declaration");
+    elst[ERR_FUNCBEGIN] = CSAVS(1, 142, "Function name must begin with a letter");
+    elst[ERR_FUNCALNUM] = CSAVS(1, 143, "Function name must contain alphanumeric characters");
+    elst[ERR_RECURSION] = CSAVS(1, 144, "Recursion too deep");
 }
 
 /* Cleanup data. */
