summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-12-26 23:55:14 -0800
committerGlenn Morris <rgm@gnu.org>2012-12-26 23:55:14 -0800
commitafc605a57350aa67e8ff67bb1f70a92f2bc0104c (patch)
tree3c645867b10cb95d1e9d2754d51cd61e9c5af4a1
parentaaca1eb5196a19836325d36d05fb0363b06daa3f (diff)
downloademacs-afc605a57350aa67e8ff67bb1f70a92f2bc0104c.tar.gz
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 1167ac0e964..11f4d4805f5 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-27 Glenn Morris <rgm@gnu.org>
+
+ * files.texi (File Names): Mention Cygwin conversion functions.
+
2012-12-22 Martin Rudalics <rudalics@gmx.at>
* 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.
can operate on file names that do not refer to an existing file or
directory.
+@findex cygwin-convert-file-name-from-windows
+@findex cygwin-convert-file-name-to-windows
+@cindex MS-Windows file-name syntax
+@cindex converting file names from/to MS-Windows syntax
On MS-DOS and MS-Windows, these functions (like the function that
actually operate on files) accept MS-DOS or MS-Windows file-name syntax,
where backslashes separate the components, as well as Unix syntax; but
they always return Unix syntax. This enables Lisp programs to specify
file names in Unix syntax and work properly on all systems without
-change.
+change.@footnote{In MS-Windows versions of Emacs compiled for the Cygwin
+environment, you can use the functions
+@code{cygwin-convert-file-name-to-windows} and
+@code{cygwin-convert-file-name-from-windows} to convert between the
+two file-name syntaxes.}
@menu
* 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).
** Cygwin builds can use the native MS Windows user interface.
Pass --with-w32 to configure. The default remains the X11 interface.
++++
** Two new functions are available in Cygwin builds:
`cygwin-convert-file-name-from-windows' and
`cygwin-convert-file-name-to-windows'. These functions allow Lisp
code to access the Cygwin file-name mapping machinery to convert
between Cygwin and Windows-native file and directory names.
+---
** When invoked with the -nw switch to run on the Windows text-mode terminal,
-Emacs now supports mouse highlight, help-echo (in the echo area), and
+Emacs now supports `mouse-highlight', help-echo (in the echo area), and
`mouse-autoselect-window'.
+++
diff --git a/src/ChangeLog b/src/ChangeLog
index d9dc0a1216e..a2cab3d704c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-27 Glenn Morris <rgm@gnu.org>
+
+ * cygw32.c (Fcygwin_convert_file_name_to_windows)
+ (Fcygwin_convert_file_name_from_windows): Doc fixes.
+
2012-12-24 Eli Zaretskii <eliz@gnu.org>
* 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",
Fcygwin_convert_file_name_to_windows,
Scygwin_convert_file_name_to_windows,
1, 2, 0,
- doc: /* Convert PATH to a Windows path. If ABSOLUTE-P is
-non-nil, return an absolute path.*/)
- (Lisp_Object path, Lisp_Object absolute_p)
+ doc: /* Convert a Cygwin file name FILE to a Windows-style file name.
+If ABSOLUTE-P is non-nil, return an absolute file name.
+For the reverse operation, see `cygwin-convert-file-name-from-windows'. */)
+ (Lisp_Object file, Lisp_Object absolute_p)
{
return from_unicode (
- conv_filename_to_w32_unicode (path, EQ (absolute_p, Qnil) ? 0 : 1));
+ conv_filename_to_w32_unicode (file, EQ (absolute_p, Qnil) ? 0 : 1));
}
DEFUN ("cygwin-convert-file-name-from-windows",
Fcygwin_convert_file_name_from_windows,
Scygwin_convert_file_name_from_windows,
1, 2, 0,
- doc: /* Convert a Windows path to a Cygwin path. If ABSOLUTE-P
-is non-nil, return an absolute path.*/)
- (Lisp_Object path, Lisp_Object absolute_p)
+ doc: /* Convert a Windows-style file name FILE to a Cygwin file name.
+If ABSOLUTE-P is non-nil, return an absolute file name.
+For the reverse operation, see `cygwin-convert-file-name-to-windows'. */)
+ (Lisp_Object file, Lisp_Object absolute_p)
{
- return conv_filename_from_w32_unicode (to_unicode (path, &path),
+ return conv_filename_from_w32_unicode (to_unicode (file, &file),
EQ (absolute_p, Qnil) ? 0 : 1);
}