summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2010-06-04 16:13:35 +0200
committerJuanma Barranquero <lekktu@gmail.com>2010-06-04 16:13:35 +0200
commitd544025b85fe654e30488164eef2af13b36b7b8e (patch)
treecc52adfe1e8d2795200188ee856431545eb4a7ed /src/w32proc.c
parent43334b5c6d6c675862361b2113fd8debc31944c5 (diff)
downloademacs-d544025b85fe654e30488164eef2af13b36b7b8e.tar.gz
Turn `directory-sep-char' into a noop.
* lisp/subr.el (directory-sep-char): Move from fileio.c and make a defconst. * src/emacs.c (decode_env_path): Don't check DIRECTORY_SEP, call dostounix_filename directly. * src/fileio.c (CORRECT_DIR_SEPS): Remove. (Ffile_name_directory, directory_file_name, Fexpand_file_name) (Fsubstitute_in_file_name): Use dostounix_filename instead. (file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP. (syms_of_fileio) <directory-sep-char>: Move to subr.el. * src/lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare. (DIRECTORY_SEP): Define unconditionally. * src/w32proc.c (CORRECT_DIR_SEPS): Remove. (Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename. * src/s/ms-w32.h (DIRECTORY_SEP): Remove.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 9d4d58f1230..b8443e5a75b 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1762,12 +1762,6 @@ socket connections still exist. */)
/* Some miscellaneous functions that are Windows specific, but not GUI
specific (ie. are applicable in terminal or batch mode as well). */
-/* lifted from fileio.c */
-#define CORRECT_DIR_SEPS(s) \
- do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
- else unixtodos_filename (s); \
- } while (0)
-
DEFUN ("w32-short-file-name", Fw32_short_file_name, Sw32_short_file_name, 1, 1, 0,
doc: /* Return the short file name version (8.3) of the full path of FILENAME.
If FILENAME does not exist, return nil.
@@ -1786,7 +1780,7 @@ All path elements in FILENAME are converted to their short names. */)
if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) == 0)
return Qnil;
- CORRECT_DIR_SEPS (shortname);
+ dostounix_filename (shortname);
return build_string (shortname);
}
@@ -1815,7 +1809,7 @@ All path elements in FILENAME are converted to their long names. */)
if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, MAX_PATH))
return Qnil;
- CORRECT_DIR_SEPS (longname);
+ dostounix_filename (longname);
/* If we were passed only a drive, make sure that a slash is not appended
for consistency with directories. Allow for drive mapping via SUBST