diff options
| author | Juanma Barranquero | 2010-06-04 16:13:35 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-06-04 16:13:35 +0200 |
| commit | 087fc47ace7797d2ef36ff167f7befd5f4ba01da (patch) | |
| tree | 0ed8bed24cd9249672b0afaa79caeea8e4ca6dcc /src/w32proc.c | |
| parent | 4f201088d33976f3ce04d7e01d1fbd4b6044cbe0 (diff) | |
| download | emacs-087fc47ace7797d2ef36ff167f7befd5f4ba01da.tar.gz emacs-087fc47ace7797d2ef36ff167f7befd5f4ba01da.zip | |
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.c | 10 |
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. */) | |||
| 1762 | /* Some miscellaneous functions that are Windows specific, but not GUI | 1762 | /* Some miscellaneous functions that are Windows specific, but not GUI |
| 1763 | specific (ie. are applicable in terminal or batch mode as well). */ | 1763 | specific (ie. are applicable in terminal or batch mode as well). */ |
| 1764 | 1764 | ||
| 1765 | /* lifted from fileio.c */ | ||
| 1766 | #define CORRECT_DIR_SEPS(s) \ | ||
| 1767 | do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ | ||
| 1768 | else unixtodos_filename (s); \ | ||
| 1769 | } while (0) | ||
| 1770 | |||
| 1771 | DEFUN ("w32-short-file-name", Fw32_short_file_name, Sw32_short_file_name, 1, 1, 0, | 1765 | DEFUN ("w32-short-file-name", Fw32_short_file_name, Sw32_short_file_name, 1, 1, 0, |
| 1772 | doc: /* Return the short file name version (8.3) of the full path of FILENAME. | 1766 | doc: /* Return the short file name version (8.3) of the full path of FILENAME. |
| 1773 | If FILENAME does not exist, return nil. | 1767 | If FILENAME does not exist, return nil. |
| @@ -1786,7 +1780,7 @@ All path elements in FILENAME are converted to their short names. */) | |||
| 1786 | if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) == 0) | 1780 | if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) == 0) |
| 1787 | return Qnil; | 1781 | return Qnil; |
| 1788 | 1782 | ||
| 1789 | CORRECT_DIR_SEPS (shortname); | 1783 | dostounix_filename (shortname); |
| 1790 | 1784 | ||
| 1791 | return build_string (shortname); | 1785 | return build_string (shortname); |
| 1792 | } | 1786 | } |
| @@ -1815,7 +1809,7 @@ All path elements in FILENAME are converted to their long names. */) | |||
| 1815 | if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, MAX_PATH)) | 1809 | if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, MAX_PATH)) |
| 1816 | return Qnil; | 1810 | return Qnil; |
| 1817 | 1811 | ||
| 1818 | CORRECT_DIR_SEPS (longname); | 1812 | dostounix_filename (longname); |
| 1819 | 1813 | ||
| 1820 | /* If we were passed only a drive, make sure that a slash is not appended | 1814 | /* If we were passed only a drive, make sure that a slash is not appended |
| 1821 | for consistency with directories. Allow for drive mapping via SUBST | 1815 | for consistency with directories. Allow for drive mapping via SUBST |