+2010-05-11 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(SRC)/w32.h.
+
+ * w32fns.c: Include w32.h.
+ (Fw32_shell_execute): Decode the error message before passing it
+ to `error'. (Bug#6126)
+
2010-05-11 Karel Klic <kklic@redhat.com>
* ftfont.c: Fix incorrect parentheses of #if condition for
#include "systime.h"
#include "termhooks.h"
#include "w32heap.h"
+#include "w32.h"
#include "bitmaps/gray.xbm"
Lisp_Object operation, document, parameters, show_flag;
{
Lisp_Object current_dir;
+ char *errstr;
CHECK_STRING (document);
XINT (show_flag) : SW_SHOWDEFAULT))
> 32)
return Qt;
- error ("ShellExecute failed: %s", w32_strerror (0));
+ errstr = w32_strerror (0);
+ /* The error string might be encoded in the locale's encoding. */
+ if (!NILP (Vlocale_coding_system))
+ {
+ Lisp_Object decoded =
+ code_convert_string_norecord (make_unibyte_string (errstr,
+ strlen (errstr)),
+ Vlocale_coding_system, 0);
+ errstr = (char *)SDATA (decoded);
+ }
+ error ("ShellExecute failed: %s", errstr);
}
/* Lookup virtual keycode from string representing the name of a