[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directory-sep-char

From: Eli Zaretskii
Subject: Re: directory-sep-char
Date: Sun, 25 Nov 2001 11:02:32 +0200 (IST)

On Sat, 24 Nov 2001, Stefan Monnier wrote:

> > After bitter experiences fixing elisp files only to discover that
> > `directory-sep-char' was deprecated, I'd like to know if it's ok to
> > apply this patch and then go over the following files
> Is it really obsolete ?

We decided to deprecate it (about a year ago, I think).  Its doc
string says so.

> I don't know how important it is (I actually don't use non-Unix systems),
> but I think it's worth considering whether Emacs should try to
> display paths in unix style or in native style.

I agree with the goal, but unfortunately making it happen is very

The problem is that the assumption that `/' is a directory separator
is built into the Emacs code in too many places.  We solved this on
the C level (see the IS_DIRECTORY_SEP macro), but many Lisp files have
`/' hard-wired into them as well.  What's more, quite a few of those
places have regexps set up on the assumption that `/' is the
separator, and other places use the backslashes in file names for
conflicting purposes (such as quoting).

Making all this support directory-sep-char is a lifetime's work that
no one will probably ever invest.

The MS-DOS port never supported directory-sep-char (it always behaves
as if its value were `/').  The Windows port heroically tried to
support it for a few years, but Andrew and Jason came to the
conclusion that it couldn't be supported in a consistent manner (even
if you set it to `\', the forward slash keeps creeping in in all kinds
of places, and some functions break).  So we decided to be honest and
drop it.

Note that removal of this variable doesn't mean we don't support
native DOS/Windows file name.  We do support them, but Emacs simply
converts the file names to the forward-slashes form at the earliest
possible opportunity.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]