aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-12-26 23:55:14 -0800
committerGlenn Morris2012-12-26 23:55:14 -0800
commit1ab0c851fc0f1d2e1c54196bfaeb67a3bd916741 (patch)
tree75904e8eb89d99dd93de5b39ff15991b145967da
parentdb590ef6e30d0b962e226ce5c5a003cc52a17953 (diff)
downloademacs-1ab0c851fc0f1d2e1c54196bfaeb67a3bd916741.tar.gz
emacs-1ab0c851fc0f1d2e1c54196bfaeb67a3bd916741.zip
Document cygwin-convert-file-name-{to|from}-windows
* doc/lispref/files.texi (File Names): Mention Cygwin conversion functions. * src/cygw32.c (Fcygwin_convert_file_name_to_windows) (Fcygwin_convert_file_name_from_windows): Doc fixes. * etc/NEWS: Related markup.
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/files.texi10
-rw-r--r--etc/NEWS4
-rw-r--r--src/ChangeLog5
-rw-r--r--src/cygw32.c18
5 files changed, 31 insertions, 10 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 09c70226d5d..f77e68aadc4 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12012-12-27 Glenn Morris <rgm@gnu.org>
2
3 * files.texi (File Names): Mention Cygwin conversion functions.
4
12012-12-22 Martin Rudalics <rudalics@gmx.at> 52012-12-22 Martin Rudalics <rudalics@gmx.at>
2 6
3 * windows.texi (Selecting Windows): Reword description of 7 * windows.texi (Selecting Windows): Reword description of
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 863acbe3949..fc01b1cd187 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1699,12 +1699,20 @@ how to manipulate file names.
1699can operate on file names that do not refer to an existing file or 1699can operate on file names that do not refer to an existing file or
1700directory. 1700directory.
1701 1701
1702@findex cygwin-convert-file-name-from-windows
1703@findex cygwin-convert-file-name-to-windows
1704@cindex MS-Windows file-name syntax
1705@cindex converting file names from/to MS-Windows syntax
1702 On MS-DOS and MS-Windows, these functions (like the function that 1706 On MS-DOS and MS-Windows, these functions (like the function that
1703actually operate on files) accept MS-DOS or MS-Windows file-name syntax, 1707actually operate on files) accept MS-DOS or MS-Windows file-name syntax,
1704where backslashes separate the components, as well as Unix syntax; but 1708where backslashes separate the components, as well as Unix syntax; but
1705they always return Unix syntax. This enables Lisp programs to specify 1709they always return Unix syntax. This enables Lisp programs to specify
1706file names in Unix syntax and work properly on all systems without 1710file names in Unix syntax and work properly on all systems without
1707change. 1711change.@footnote{In MS-Windows versions of Emacs compiled for the Cygwin
1712environment, you can use the functions
1713@code{cygwin-convert-file-name-to-windows} and
1714@code{cygwin-convert-file-name-from-windows} to convert between the
1715two file-name syntaxes.}
1708 1716
1709@menu 1717@menu
1710* File Name Components:: The directory part of a file name, and the rest. 1718* File Name Components:: The directory part of a file name, and the rest.
diff --git a/etc/NEWS b/etc/NEWS
index 4cf2e9d6da9..292d2d04a13 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -997,14 +997,16 @@ takes precedence over most other maps for a short while (normally one key).
997** Cygwin builds can use the native MS Windows user interface. 997** Cygwin builds can use the native MS Windows user interface.
998Pass --with-w32 to configure. The default remains the X11 interface. 998Pass --with-w32 to configure. The default remains the X11 interface.
999 999
1000+++
1000** Two new functions are available in Cygwin builds: 1001** Two new functions are available in Cygwin builds:
1001`cygwin-convert-file-name-from-windows' and 1002`cygwin-convert-file-name-from-windows' and
1002`cygwin-convert-file-name-to-windows'. These functions allow Lisp 1003`cygwin-convert-file-name-to-windows'. These functions allow Lisp
1003code to access the Cygwin file-name mapping machinery to convert 1004code to access the Cygwin file-name mapping machinery to convert
1004between Cygwin and Windows-native file and directory names. 1005between Cygwin and Windows-native file and directory names.
1005 1006
1007---
1006** When invoked with the -nw switch to run on the Windows text-mode terminal, 1008** When invoked with the -nw switch to run on the Windows text-mode terminal,
1007Emacs now supports mouse highlight, help-echo (in the echo area), and 1009Emacs now supports `mouse-highlight', help-echo (in the echo area), and
1008`mouse-autoselect-window'. 1010`mouse-autoselect-window'.
1009 1011
1010+++ 1012+++
diff --git a/src/ChangeLog b/src/ChangeLog
index c8cc486a9de..fccdc1dfcae 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-12-27 Glenn Morris <rgm@gnu.org>
2
3 * cygw32.c (Fcygwin_convert_file_name_to_windows)
4 (Fcygwin_convert_file_name_from_windows): Doc fixes.
5
12012-12-24 Eli Zaretskii <eliz@gnu.org> 62012-12-24 Eli Zaretskii <eliz@gnu.org>
2 7
3 * fileio.c (file_name_as_directory, directory_file_name): Accept 8 * fileio.c (file_name_as_directory, directory_file_name): Accept
diff --git a/src/cygw32.c b/src/cygw32.c
index d9777d5e22e..5873a05dcf0 100644
--- a/src/cygw32.c
+++ b/src/cygw32.c
@@ -110,23 +110,25 @@ DEFUN ("cygwin-convert-file-name-to-windows",
110 Fcygwin_convert_file_name_to_windows, 110 Fcygwin_convert_file_name_to_windows,
111 Scygwin_convert_file_name_to_windows, 111 Scygwin_convert_file_name_to_windows,
112 1, 2, 0, 112 1, 2, 0,
113 doc: /* Convert PATH to a Windows path. If ABSOLUTE-P is 113 doc: /* Convert a Cygwin file name FILE to a Windows-style file name.
114non-nil, return an absolute path.*/) 114If ABSOLUTE-P is non-nil, return an absolute file name.
115 (Lisp_Object path, Lisp_Object absolute_p) 115For the reverse operation, see `cygwin-convert-file-name-from-windows'. */)
116 (Lisp_Object file, Lisp_Object absolute_p)
116{ 117{
117 return from_unicode ( 118 return from_unicode (
118 conv_filename_to_w32_unicode (path, EQ (absolute_p, Qnil) ? 0 : 1)); 119 conv_filename_to_w32_unicode (file, EQ (absolute_p, Qnil) ? 0 : 1));
119} 120}
120 121
121DEFUN ("cygwin-convert-file-name-from-windows", 122DEFUN ("cygwin-convert-file-name-from-windows",
122 Fcygwin_convert_file_name_from_windows, 123 Fcygwin_convert_file_name_from_windows,
123 Scygwin_convert_file_name_from_windows, 124 Scygwin_convert_file_name_from_windows,
124 1, 2, 0, 125 1, 2, 0,
125 doc: /* Convert a Windows path to a Cygwin path. If ABSOLUTE-P 126 doc: /* Convert a Windows-style file name FILE to a Cygwin file name.
126is non-nil, return an absolute path.*/) 127If ABSOLUTE-P is non-nil, return an absolute file name.
127 (Lisp_Object path, Lisp_Object absolute_p) 128For the reverse operation, see `cygwin-convert-file-name-to-windows'. */)
129 (Lisp_Object file, Lisp_Object absolute_p)
128{ 130{
129 return conv_filename_from_w32_unicode (to_unicode (path, &path), 131 return conv_filename_from_w32_unicode (to_unicode (file, &file),
130 EQ (absolute_p, Qnil) ? 0 : 1); 132 EQ (absolute_p, Qnil) ? 0 : 1);
131} 133}
132 134