"David A. Cobb" <Superbiskit(a)cox.net> writes:
[Sorry for hopping in late!!] I must be missing something. The
only place special handling of ~ or / seems appropriate in
minibuffer-read-file-name (or whatever) is when it is the FIRST
character typed by the user.
Traditionally electric behavior was not the norm, and it was expected
that, given a prompt "/foo" the user would type "~/bar", resulting in
"/foo/~/bar" being read. Treating "/foo/~/bar" as "~/bar"
in the guts
of read-file-name was a convenience thing so that the user doesn't
have to type `C-a C-k ~/bar" every single time. XEmacs's "electric"
behavior removes the need for the kludge in substitute-file-name, but
I'm not sure if it's really safe to actually do so. Some people might
be turning off the electric behavior, and the kludge has been there
for a long, long time.