[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115731: Minor fixes in w32-shell-execute.
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r115731: Minor fixes in w32-shell-execute. |
Date: |
Tue, 24 Dec 2013 17:21:38 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115731
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Tue 2013-12-24 19:21:06 +0200
message:
Minor fixes in w32-shell-execute.
src/w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
file name when it is submitted to ShellExecute. Simplify code.
Don't test DOCUMENT for being a string, as that is enforced by
CHECK_STRING. Doc fix.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32fns.c w32fns.c-20091113204419-o5vbwnq5f7feedwu-945
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-12-23 19:24:25 +0000
+++ b/src/ChangeLog 2013-12-24 17:21:06 +0000
@@ -1,3 +1,10 @@
+2013-12-24 Eli Zaretskii <address@hidden>
+
+ * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
+ file name when it is submitted to ShellExecute. Simplify code.
+ Don't test DOCUMENT for being a string, as that is enforced by
+ CHECK_STRING. Doc fix.
+
2013-12-23 Eli Zaretskii <address@hidden>
* xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
=== modified file 'src/w32fns.c'
--- a/src/w32fns.c 2013-12-20 10:48:36 +0000
+++ b/src/w32fns.c 2013-12-24 17:21:06 +0000
@@ -6844,6 +6844,8 @@
specified DOCUMENT
\"find\" - initiate search starting from DOCUMENT which must specify
a directory
+ \"runas\" - run DOCUMENT, which must be an excutable file, with
+ elevated privileges (a.k.a. \"as Administrator\").
nil - invoke the default OPERATION, or \"open\" if default is
not defined or unavailable
@@ -6879,16 +6881,12 @@
#ifdef CYGWIN
current_dir = Fcygwin_convert_file_name_to_windows (current_dir, Qt);
- if (STRINGP (document))
- document = Fcygwin_convert_file_name_to_windows (document, Qt);
+ document = Fcygwin_convert_file_name_to_windows (document, Qt);
/* Encode filename, current directory and parameters. */
current_dir = GUI_ENCODE_FILE (current_dir);
- if (STRINGP (document))
- {
- document = GUI_ENCODE_FILE (document);
- doc_w = GUI_SDATA (document);
- }
+ document = GUI_ENCODE_FILE (document);
+ doc_w = GUI_SDATA (document);
if (STRINGP (parameters))
{
parameters = GUI_ENCODE_SYSTEM (parameters);
@@ -6904,20 +6902,17 @@
(INTEGERP (show_flag)
? XINT (show_flag) : SW_SHOWDEFAULT));
#else /* !CYGWIN */
+ current_dir = ENCODE_FILE (current_dir);
+ document = ENCODE_FILE (Fexpand_file_name (document, Qnil));
if (use_unicode)
{
wchar_t document_w[MAX_PATH], current_dir_w[MAX_PATH];
/* Encode filename, current directory and parameters, and
convert operation to UTF-16. */
- current_dir = ENCODE_FILE (current_dir);
filename_to_utf16 (SSDATA (current_dir), current_dir_w);
- if (STRINGP (document))
- {
- document = ENCODE_FILE (document);
- filename_to_utf16 (SSDATA (document), document_w);
- doc_w = document_w;
- }
+ filename_to_utf16 (SSDATA (document), document_w);
+ doc_w = document_w;
if (STRINGP (parameters))
{
int len;
@@ -6954,14 +6949,9 @@
{
char document_a[MAX_PATH], current_dir_a[MAX_PATH];
- current_dir = ENCODE_FILE (current_dir);
filename_to_ansi (SSDATA (current_dir), current_dir_a);
- if (STRINGP (document))
- {
- ENCODE_FILE (document);
- filename_to_ansi (SSDATA (document), document_a);
- doc_a = document_a;
- }
+ filename_to_ansi (SSDATA (document), document_a);
+ doc_a = document_a;
if (STRINGP (parameters))
{
parameters = ENCODE_SYSTEM (parameters);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115731: Minor fixes in w32-shell-execute.,
Eli Zaretskii <=