From: "Robert Dodier" <robert.dodier at gmail.com>
Well, to generate a new variable, you can call the Lisp GENSYM function.
foo : ?gensym ();
=> g36372
bar : ?gensym (1234);
=> g1234
baz : ?gensym ("quux");
=> QUUX36373
The case inversion (quux --> QUUX) is an artifact of Lisp's bizarre
case sensitivity rules.
If this really happens, I suspect it is due to Maxima's bizarre case
sensitivity rules, which probably originally derived from Maclisp's
bizarre case sensitivity rules, but which weren't so bizarre back when
Lyndon Johnson was president and card punches still walked the land.
(It arguably goes back further to the second Eisenhower
administration, but I digress.)
Anyway, in a conformant ANSI CL upcasing only happens when the reader
(in default case mode, etc. etc.) interprets an unescaped sequence of
characters as a symbol name. Functions like gensym and intern and
find-symbol are always required to preserve the actual characters in a
string argument:
CL-USER(1): (gensym "quux")
#:|quux3|
CL-USER(2): (gensym "QuUx")
#:|QuUx4|
But I agree that case preservation of strings passed to gensym doesn't
matter very much in nearly all purposes for which gensym is used..