diff options
| author | Eli Zaretskii | 2010-05-07 20:08:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-05-07 20:08:31 +0300 |
| commit | 5cba3209efc2b024f717ba8eaeb198d2701b8088 (patch) | |
| tree | 1d50775642dc861fa852bdb27589c4a8570bf685 /src | |
| parent | 59d93e877072c242f5947ed6f2a536a14629393b (diff) | |
| download | emacs-5cba3209efc2b024f717ba8eaeb198d2701b8088.tar.gz emacs-5cba3209efc2b024f717ba8eaeb198d2701b8088.zip | |
Fix bug #6126.
w32fns.c: Include w32.h.
(Fw32_shell_execute): Decode the error message before passing it
to `error'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9570c0ce3c7..c65e65de431 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-05-07 Eli Zaretskii <eliz@gnu.org> | 1 | 2010-05-07 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * w32fns.c: Include w32.h. | ||
| 4 | (Fw32_shell_execute): Decode the error message before passing it | ||
| 5 | to `error'. (Bug#6126) | ||
| 6 | |||
| 3 | * msdos.c (dos_set_window_size): | 7 | * msdos.c (dos_set_window_size): |
| 4 | * w16select.c (Fx_selection_exists_p): Use `Fsymbol_value (foo)' | 8 | * w16select.c (Fx_selection_exists_p): Use `Fsymbol_value (foo)' |
| 5 | instead of `XSYMBOL (foo)->value'. | 9 | instead of `XSYMBOL (foo)->value'. |
diff --git a/src/w32fns.c b/src/w32fns.c index 795e7208569..bc310da0d2f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -47,6 +47,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 47 | #include "systime.h" | 47 | #include "systime.h" |
| 48 | #include "termhooks.h" | 48 | #include "termhooks.h" |
| 49 | #include "w32heap.h" | 49 | #include "w32heap.h" |
| 50 | #include "w32.h" | ||
| 50 | 51 | ||
| 51 | #include "bitmaps/gray.xbm" | 52 | #include "bitmaps/gray.xbm" |
| 52 | 53 | ||
| @@ -6333,6 +6334,7 @@ an integer representing a ShowWindow flag: | |||
| 6333 | Lisp_Object operation, document, parameters, show_flag; | 6334 | Lisp_Object operation, document, parameters, show_flag; |
| 6334 | { | 6335 | { |
| 6335 | Lisp_Object current_dir; | 6336 | Lisp_Object current_dir; |
| 6337 | char *errstr; | ||
| 6336 | 6338 | ||
| 6337 | CHECK_STRING (document); | 6339 | CHECK_STRING (document); |
| 6338 | 6340 | ||
| @@ -6353,7 +6355,17 @@ an integer representing a ShowWindow flag: | |||
| 6353 | XINT (show_flag) : SW_SHOWDEFAULT)) | 6355 | XINT (show_flag) : SW_SHOWDEFAULT)) |
| 6354 | > 32) | 6356 | > 32) |
| 6355 | return Qt; | 6357 | return Qt; |
| 6356 | error ("ShellExecute failed: %s", w32_strerror (0)); | 6358 | errstr = w32_strerror (0); |
| 6359 | /* The error string might be encoded in the locale's encoding. */ | ||
| 6360 | if (!NILP (Vlocale_coding_system)) | ||
| 6361 | { | ||
| 6362 | Lisp_Object decoded = | ||
| 6363 | code_convert_string_norecord (make_unibyte_string (errstr, | ||
| 6364 | strlen (errstr)), | ||
| 6365 | Vlocale_coding_system, 0); | ||
| 6366 | errstr = (char *)SDATA (decoded); | ||
| 6367 | } | ||
| 6368 | error ("ShellExecute failed: %s", errstr); | ||
| 6357 | } | 6369 | } |
| 6358 | 6370 | ||
| 6359 | /* Lookup virtual keycode from string representing the name of a | 6371 | /* Lookup virtual keycode from string representing the name of a |