/* Encode Lisp string STRING as a text in a format appropriate for
XICCC (X Inter Client Communication Conventions).
- This can call Lisp code, so callers must GCPRO.
-
If STRING contains only ASCII characters, do no conversion and
return the string data of STRING. Otherwise, encode the text by
CODING_SYSTEM, and return a newly allocated memory area which
Lisp_Object coding_system;
Lisp_Object encoded_name;
Lisp_Object encoded_icon_name;
- struct gcpro gcpro1;
/* As ENCODE_UTF_8 may cause GC and relocation of string data,
we use it before x_encode_text that may return string data. */
- GCPRO1 (name);
encoded_name = ENCODE_UTF_8 (name);
- UNGCPRO;
coding_system = Qcompound_text;
/* Note: Encoding strategy
bool minibuffer_only = false;
long window_prompting = 0;
ptrdiff_t count = SPECPDL_INDEX ();
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object display;
struct x_display_info *dpyinfo = NULL;
Lisp_Object parent;
if (! NILP (parent))
CHECK_NUMBER (parent);
- /* make_frame_without_minibuffer can run Lisp code and garbage collect. */
- /* No need to protect DISPLAY because that's not used after passing
- it to make_frame_without_minibuffer. */
frame = Qnil;
- GCPRO4 (parms, parent, name, frame);
tem = x_get_arg (dpyinfo, parms, Qminibuffer, "minibuffer", "Minibuffer",
RES_TYPE_SYMBOL);
if (EQ (tem, Qnone) || NILP (tem))
to get the color reference counts right, so initialize them! */
{
Lisp_Object black;
- struct gcpro gcpro1;
/* Function x_decode_color can signal an error. Make
sure to initialize color slots so that we won't try
f->output_data.x->mouse_pixel = -1;
black = build_string ("black");
- GCPRO1 (black);
FRAME_FOREGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
f->output_data.x->mouse_pixel
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
- UNGCPRO;
}
/* Specify the parent under which to make this X window. */
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
fset_param_alist (f, Fcons (XCAR (tem), f->param_alist));
- UNGCPRO;
-
/* Make sure windows on this frame appear in calls to next-window
and similar functions. */
Vwindow_list = Qnil;
int actual_format;
unsigned long actual_size, bytes_remaining;
int rc;
- struct gcpro gcpro1;
-
- GCPRO1 (prop_value);
rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
prop_atom, 0, 0, False, target_type,
if (tmp_data) XFree (tmp_data);
}
- UNGCPRO;
return prop_value;
}
Lisp_Object prop_value = Qnil;
Atom target_type = XA_STRING;
Window target_window = FRAME_X_WINDOW (f);
- struct gcpro gcpro1;
bool found;
- GCPRO1 (prop_value);
CHECK_STRING (prop);
if (! NILP (source))
unblock_input ();
- UNGCPRO;
return prop_value;
}
Lisp_Object name;
int width, height;
ptrdiff_t count = SPECPDL_INDEX ();
- struct gcpro gcpro1, gcpro2, gcpro3;
bool face_change_before = face_change;
Lisp_Object buffer;
struct buffer *old_buffer;
error ("Invalid frame name--not a string or nil");
frame = Qnil;
- GCPRO3 (parms, name, frame);
f = make_frame (true);
XSETFRAME (frame, f);
to get the color reference counts right, so initialize them! */
{
Lisp_Object black;
- struct gcpro gcpro1;
/* Function x_decode_color can signal an error. Make
sure to initialize color slots so that we won't try
f->output_data.x->mouse_pixel = -1;
black = build_string ("black");
- GCPRO1 (black);
FRAME_FOREGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
f->output_data.x->mouse_pixel
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
- UNGCPRO;
}
/* Set the name; the functions to which we pass f expect the name to
f->no_split = true;
- UNGCPRO;
-
/* Now that the frame will be official, it counts as a reference to
its display and terminal. */
FRAME_DISPLAY_INFO (f)->reference_count++;
struct text_pos pos;
int i, width, height;
bool seen_reversed_p;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qinhibit_redisplay, Qt);
- GCPRO4 (string, parms, frame, timeout);
-
CHECK_STRING (string);
if (SCHARS (string) == 0)
string = make_unibyte_string (" ", 1);
tip_timer = call3 (intern ("run-at-time"), timeout, Qnil,
intern ("x-hide-tip"));
- UNGCPRO;
return unbind_to (count, Qnil);
}
{
ptrdiff_t count;
Lisp_Object deleted, frame, timer;
- struct gcpro gcpro1, gcpro2;
/* Return quickly if nothing to do. */
if (NILP (tip_timer) && NILP (tip_frame))
frame = tip_frame;
timer = tip_timer;
- GCPRO2 (frame, timer);
tip_frame = tip_timer = deleted = Qnil;
count = SPECPDL_INDEX ();
#endif /* USE_LUCID */
}
- UNGCPRO;
return unbind_to (count, deleted);
}
int ac = 0;
XmString dir_xmstring, pattern_xmstring;
ptrdiff_t count = SPECPDL_INDEX ();
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
check_window_system (f);
- GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
-
if (popup_activated ())
error ("Trying to use a menu from within a menu-entry");
file = Qnil;
unblock_input ();
- UNGCPRO;
/* Make "Cancel" equivalent to C-g. */
if (NILP (file))
Lisp_Object file = Qnil;
Lisp_Object decoded_file;
ptrdiff_t count = SPECPDL_INDEX ();
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
char *cdef_file;
check_window_system (f);
- GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
-
if (popup_activated ())
error ("Trying to use a menu from within a menu-entry");
}
unblock_input ();
- UNGCPRO;
/* Make "Cancel" equivalent to C-g. */
if (NILP (file))
Lisp_Object font;
Lisp_Object font_param;
char *default_name = NULL;
- struct gcpro gcpro1, gcpro2;
ptrdiff_t count = SPECPDL_INDEX ();
if (popup_activated ())
block_input ();
- GCPRO2 (font_param, font);
-
XSETFONT (font, FRAME_FONT (f));
font_param = Ffont_get (font, QCname);
if (STRINGP (font_param))