Aidan> Evaluating something like this in *scratch* should work:
Aidan> (flet ((substitute-in-file-name (filename)
Aidan> filename))
Aidan> (find-file "/home/aidan/$substitute-in-file"))
A bit cumbersome, but I suspect you're correct.
With a little experimentation, I determined there appears to be a behavior
change between 21.4 and 21.5 in this regard. If I type these keystrokes in
21.5.28
C-x C-f $ $ x RET
I get the "Substituting non-existent environment variable x" error. If I
type the same keystrokes in 21.4.21 it will open the file named "$x". If,
before hitting RET, I hit TAB, the first time, it removes one of the dollar
signs. The second time it emits the error message. (This is in both 21.4
and 21.5.)
I'm not well versed enough in XEmacs C source to know what might have
changed. It seems from a casual glance that the only changes were
mechanical (IByte to BufByte, qxstrlen to strlen, etc). It seems to me that
there should be some way to override some or all of the function's behavior
without having to completely redefine it. (It does both ~ and variable
expansion, right?)
It's unfortunate that substitute-in-file-name is written in C instead of
Lisp. It would be easier to control its behavior with variables if it was
written in Lisp (or at least mere mortals could more easily control it).
Skip
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta