# HG changeset patch # User Richard M. Stallman # Date 861390744 0 # Node ID 0c38918fbf13ab342b9376c9b8a07fa3c9ae42f3 # Parent 1c2392208ad9aed85d3d28a5d082375f6a2617a0 (print): Symbols like e2 and 2e are not confusing. diff -r 1c2392208ad9 -r 0c38918fbf13 src/print.c --- a/src/print.c Fri Apr 18 12:25:09 1997 +0000 +++ b/src/print.c Fri Apr 18 19:12:24 1997 +0000 @@ -1016,7 +1016,15 @@ if (p != end && (*p == '-' || *p == '+')) p++; if (p == end) confusing = 0; - else + /* If symbol name begins with a digit, and ends with a digit, + and contains nothing but digits and `e', it could be treated + as a number. So set CONFUSING. + + Symbols that contain periods could also be taken as numbers, + but periods are always escaped, so we don't have to worry + about them here. */ + else if (*p >= '0' && *p <= '9' + && end[-1] >= '0' && end[-1] <= '9') { while (p != end && ((*p >= '0' && *p <= '9') /* Needed for \2e10. */ @@ -1024,6 +1032,8 @@ p++; confusing = (end == p); } + else + confusing = 0; /* If we print an uninterned symbol as part of a complex object and the flag print-gensym is non-nil, prefix it with #n= to read the