Skip to content

Commit 3b99346

Browse files
committed
Don't create single-letter symbols for "export" error messages
There's no reason to call getGlobalSymbol since we're not going to end up exporting a symbol.
1 parent 8b3e91d commit 3b99346

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

M2/Macaulay2/m2/packages.m2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export List := v -> (
428428
if class sym#1 =!= String then error("expected a string: ", nam);
429429
sym = getGlobalSymbol(pd, sym#1))
430430
else if instance(sym, String) then (
431-
if match("^[[:alpha:]]$", sym) then error ("cannot export single-letter symbol ", getGlobalSymbol(pd, sym));
431+
if match("^[[:alpha:]]$", sym) then error ("cannot export single-letter symbol '", sym, "'");
432432
nam = sym;
433433
sym = if pd#?nam then pd#nam else getGlobalSymbol(pd, nam))
434434
else error ("'export' expected a string or an option but was given ", sym, ", of class ", class sym);

0 commit comments

Comments
 (0)