static char *xstrdup P_ ((char *));
static unsigned char *xstrlwr P_ ((unsigned char *));
static void signal_error P_ ((char *, Lisp_Object));
-static void display_message P_ ((struct frame *, char *, Lisp_Object, Lisp_Object));
+static void add_to_log P_ ((struct frame *, char *, Lisp_Object, Lisp_Object));
static struct frame *frame_or_selected_frame P_ ((Lisp_Object, int));
static void load_face_font_or_fontset P_ ((struct frame *, struct face *, char *, int));
static void load_face_colors P_ ((struct frame *, struct face *, Lisp_Object *));
otherwise also end in an infinite recursion. */
static void
-display_message (f, format, arg1, arg2)
+add_to_log (f, format, arg1, arg2)
struct frame *f;
char *format;
Lisp_Object arg1, arg2;
{
Lisp_Object args[3];
Lisp_Object nargs;
+ Lisp_Object msg;
+ char *buffer;
extern int waiting_for_input;
/* Function note_mouse_highlight calls face_at_buffer_position which
args[0] = build_string (format);
args[1] = arg1;
args[2] = arg2;
-
- if (f->face_cache->used >= BASIC_FACE_ID_SENTINEL)
- Fmessage (nargs, args);
- else
- {
- Lisp_Object msg = Fformat (nargs, args);
- char *buffer = LSTRDUPA (msg);
- message_dolog (buffer, strlen (buffer), 1, 0);
- }
+ msg = Fformat (nargs, args);
+
+ /* Log the error, but don't display it in the echo area. This
+ proves to be annoying in many cases. */
+ buffer = LSTRDUPA (msg);
+ message_dolog (buffer, strlen (buffer), 1, 0);
}
if (bitmap_id < 0)
{
- display_message (f, "Invalid or undefined bitmap %s", name, Qnil);
+ add_to_log (f, "Invalid or undefined bitmap %s", name, Qnil);
bitmap_id = 0;
if (w_ptr)
}
}
else if (fontset >= 0)
- display_message (f, "Unable to load ASCII font of fontset %d",
- make_number (fontset), Qnil);
+ add_to_log (f, "Unable to load ASCII font of fontset %d",
+ make_number (fontset), Qnil);
else if (font_name)
- display_message (f, "Unable to load font %s",
- build_string (font_name), Qnil);
+ add_to_log (f, "Unable to load font %s",
+ build_string (font_name), Qnil);
}
#endif /* HAVE_X_WINDOWS */
to the values in an existing cell. */
if (!defined_color (f, XSTRING (name)->data, &color, 1))
{
- display_message (f, "Unable to load color %s", name, Qnil);
+ add_to_log (f, "Unable to load color %s", name, Qnil);
switch (target_index)
{
if (INTEGERP (color))
return (unsigned long)XINT (color);
- display_message (f, "Unable to load color %s", name, Qnil);
+ add_to_log (f, "Unable to load color %s", name, Qnil);
switch (target_index)
{
to[LFACE_BACKGROUND_INDEX] = color_name;
}
else
- display_message (f, "Invalid face color", color_name, Qnil);
+ add_to_log (f, "Invalid face color", color_name, Qnil);
}
else if (SYMBOLP (first)
&& *XSYMBOL (first)->name->data == ':')
if (STRINGP (value))
to[LFACE_FAMILY_INDEX] = value;
else
- display_message (f, "Illegal face font family",
- value, Qnil);
+ add_to_log (f, "Illegal face font family", value, Qnil);
}
else if (EQ (keyword, QCheight))
{
if (INTEGERP (value))
to[LFACE_HEIGHT_INDEX] = value;
else
- display_message (f, "Illegal face font height",
- value, Qnil);
+ add_to_log (f, "Illegal face font height", value, Qnil);
}
else if (EQ (keyword, QCweight))
{
&& face_numeric_weight (value) >= 0)
to[LFACE_WEIGHT_INDEX] = value;
else
- display_message (f, "Illegal face weight", value, Qnil);
+ add_to_log (f, "Illegal face weight", value, Qnil);
}
else if (EQ (keyword, QCslant))
{
&& face_numeric_slant (value) >= 0)
to[LFACE_SLANT_INDEX] = value;
else
- display_message (f, "Illegal face slant", value, Qnil);
+ add_to_log (f, "Illegal face slant", value, Qnil);
}
else if (EQ (keyword, QCunderline))
{
|| STRINGP (value))
to[LFACE_UNDERLINE_INDEX] = value;
else
- display_message (f, "Illegal face underline", value, Qnil);
+ add_to_log (f, "Illegal face underline", value, Qnil);
}
else if (EQ (keyword, QCoverline))
{
|| STRINGP (value))
to[LFACE_OVERLINE_INDEX] = value;
else
- display_message (f, "Illegal face overline", value, Qnil);
+ add_to_log (f, "Illegal face overline", value, Qnil);
}
else if (EQ (keyword, QCstrike_through))
{
|| STRINGP (value))
to[LFACE_STRIKE_THROUGH_INDEX] = value;
else
- display_message (f, "Illegal face strike-through",
- value, Qnil);
+ add_to_log (f, "Illegal face strike-through", value, Qnil);
}
else if (EQ (keyword, QCbox))
{
|| NILP (value))
to[LFACE_BOX_INDEX] = value;
else
- display_message (f, "Illegal face box", value, Qnil);
+ add_to_log (f, "Illegal face box", value, Qnil);
}
else if (EQ (keyword, QCinverse_video)
|| EQ (keyword, QCreverse_video))
if (EQ (value, Qt) || NILP (value))
to[LFACE_INVERSE_INDEX] = value;
else
- display_message (f, "Illegal face inverse-video",
- value, Qnil);
+ add_to_log (f, "Illegal face inverse-video", value, Qnil);
}
else if (EQ (keyword, QCforeground))
{
if (STRINGP (value))
to[LFACE_FOREGROUND_INDEX] = value;
else
- display_message (f, "Illegal face foreground",
- value, Qnil);
+ add_to_log (f, "Illegal face foreground", value, Qnil);
}
else if (EQ (keyword, QCbackground))
{
if (STRINGP (value))
to[LFACE_BACKGROUND_INDEX] = value;
else
- display_message (f, "Illegal face background",
- value, Qnil);
+ add_to_log (f, "Illegal face background", value, Qnil);
}
else if (EQ (keyword, QCstipple))
{
if (!NILP (pixmap_p))
to[LFACE_STIPPLE_INDEX] = value;
else
- display_message (f, "Illegal face stipple", value, Qnil);
+ add_to_log (f, "Illegal face stipple", value, Qnil);
#endif
}
else if (EQ (keyword, QCwidth))
&& face_numeric_swidth (value) >= 0)
to[LFACE_SWIDTH_INDEX] = value;
else
- display_message (f, "Illegal face width", value, Qnil);
+ add_to_log (f, "Illegal face width", value, Qnil);
}
else
- display_message (f, "Invalid attribute %s in face property",
- keyword, Qnil);
+ add_to_log (f, "Invalid attribute %s in face property",
+ keyword, Qnil);
prop = XCDR (XCDR (prop));
}
/* PROP ought to be a face name. */
Lisp_Object lface = lface_from_face_name (f, prop, 0);
if (NILP (lface))
- display_message (f, "Invalid face text property value: %s",
- prop, Qnil);
+ add_to_log (f, "Invalid face text property value: %s", prop, Qnil);
else
merge_face_vectors (XVECTOR (lface)->contents, to);
}