/* Graphical user interface functions for the Microsoft W32 API.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include "systime.h"
#include "termhooks.h"
#include "w32heap.h"
+#include "w32.h"
#include "bitmaps/gray.xbm"
kb = dpyinfo->terminal->kboard;
+ /* The calls to x_get_arg remove elements from PARMS, so copy it to
+ avoid destructive changes behind our caller's back. */
+ parms = Fcopy_alist (parms);
+
/* Get the name of the frame to use for resource lookup. */
name = x_get_arg (dpyinfo, parms, Qname, "name", "Name", RES_TYPE_STRING);
if (!STRINGP (name)
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
Fput (Qundefined_color, Qerror_conditions,
- Fcons (Qundefined_color, Fcons (Qerror, Qnil)));
+ pure_cons (Qundefined_color, pure_cons (Qerror, Qnil)));
Fput (Qundefined_color, Qerror_message,
- build_string ("Undefined color"));
+ make_pure_c_string ("Undefined color"));
staticpro (&w32_grabbed_keys);
w32_grabbed_keys = Qnil;