mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
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.
This commit is contained in:
parent
db590ef6e3
commit
1ab0c851fc
@ -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
|
||||
|
@ -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.
|
||||
|
4
etc/NEWS
4
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'.
|
||||
|
||||
+++
|
||||
|
@ -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
|
||||
|
18
src/cygw32.c
18
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user