aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-17 00:38:21 +0000
committerGerd Moellmann1999-08-17 00:38:21 +0000
commit7dbdfcf86639ec15bd12bf74948a657629dba4ad (patch)
tree96582e7021fad6cf38d47ff07a6fa3ac36767270 /src
parent9a132b1f433c9a57fbcc575e73d73956fdb0d446 (diff)
downloademacs-7dbdfcf86639ec15bd12bf74948a657629dba4ad.tar.gz
emacs-7dbdfcf86639ec15bd12bf74948a657629dba4ad.zip
(add_to_log): Renamed from display_message.
Don't display messages in echo area.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c76
1 files changed, 34 insertions, 42 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 2bd29a00ff4..c3610cc739f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -396,7 +396,7 @@ static int load_pixmap P_ ((struct frame *, Lisp_Object, unsigned *, unsigned *)
396static char *xstrdup P_ ((char *)); 396static char *xstrdup P_ ((char *));
397static unsigned char *xstrlwr P_ ((unsigned char *)); 397static unsigned char *xstrlwr P_ ((unsigned char *));
398static void signal_error P_ ((char *, Lisp_Object)); 398static void signal_error P_ ((char *, Lisp_Object));
399static void display_message P_ ((struct frame *, char *, Lisp_Object, Lisp_Object)); 399static void add_to_log P_ ((struct frame *, char *, Lisp_Object, Lisp_Object));
400static struct frame *frame_or_selected_frame P_ ((Lisp_Object, int)); 400static struct frame *frame_or_selected_frame P_ ((Lisp_Object, int));
401static void load_face_font_or_fontset P_ ((struct frame *, struct face *, char *, int)); 401static void load_face_font_or_fontset P_ ((struct frame *, struct face *, char *, int));
402static void load_face_colors P_ ((struct frame *, struct face *, Lisp_Object *)); 402static void load_face_colors P_ ((struct frame *, struct face *, Lisp_Object *));
@@ -590,13 +590,15 @@ signal_error (s, arg)
590 otherwise also end in an infinite recursion. */ 590 otherwise also end in an infinite recursion. */
591 591
592static void 592static void
593display_message (f, format, arg1, arg2) 593add_to_log (f, format, arg1, arg2)
594 struct frame *f; 594 struct frame *f;
595 char *format; 595 char *format;
596 Lisp_Object arg1, arg2; 596 Lisp_Object arg1, arg2;
597{ 597{
598 Lisp_Object args[3]; 598 Lisp_Object args[3];
599 Lisp_Object nargs; 599 Lisp_Object nargs;
600 Lisp_Object msg;
601 char *buffer;
600 extern int waiting_for_input; 602 extern int waiting_for_input;
601 603
602 /* Function note_mouse_highlight calls face_at_buffer_position which 604 /* Function note_mouse_highlight calls face_at_buffer_position which
@@ -610,15 +612,12 @@ display_message (f, format, arg1, arg2)
610 args[0] = build_string (format); 612 args[0] = build_string (format);
611 args[1] = arg1; 613 args[1] = arg1;
612 args[2] = arg2; 614 args[2] = arg2;
613 615 msg = Fformat (nargs, args);
614 if (f->face_cache->used >= BASIC_FACE_ID_SENTINEL) 616
615 Fmessage (nargs, args); 617 /* Log the error, but don't display it in the echo area. This
616 else 618 proves to be annoying in many cases. */
617 { 619 buffer = LSTRDUPA (msg);
618 Lisp_Object msg = Fformat (nargs, args); 620 message_dolog (buffer, strlen (buffer), 1, 0);
619 char *buffer = LSTRDUPA (msg);
620 message_dolog (buffer, strlen (buffer), 1, 0);
621 }
622} 621}
623 622
624 623
@@ -941,7 +940,7 @@ load_pixmap (f, name, w_ptr, h_ptr)
941 940
942 if (bitmap_id < 0) 941 if (bitmap_id < 0)
943 { 942 {
944 display_message (f, "Invalid or undefined bitmap %s", name, Qnil); 943 add_to_log (f, "Invalid or undefined bitmap %s", name, Qnil);
945 bitmap_id = 0; 944 bitmap_id = 0;
946 945
947 if (w_ptr) 946 if (w_ptr)
@@ -1059,11 +1058,11 @@ load_face_font_or_fontset (f, face, font_name, fontset)
1059 } 1058 }
1060 } 1059 }
1061 else if (fontset >= 0) 1060 else if (fontset >= 0)
1062 display_message (f, "Unable to load ASCII font of fontset %d", 1061 add_to_log (f, "Unable to load ASCII font of fontset %d",
1063 make_number (fontset), Qnil); 1062 make_number (fontset), Qnil);
1064 else if (font_name) 1063 else if (font_name)
1065 display_message (f, "Unable to load font %s", 1064 add_to_log (f, "Unable to load font %s",
1066 build_string (font_name), Qnil); 1065 build_string (font_name), Qnil);
1067} 1066}
1068 1067
1069#endif /* HAVE_X_WINDOWS */ 1068#endif /* HAVE_X_WINDOWS */
@@ -1184,7 +1183,7 @@ load_color (f, face, name, target_index)
1184 to the values in an existing cell. */ 1183 to the values in an existing cell. */
1185 if (!defined_color (f, XSTRING (name)->data, &color, 1)) 1184 if (!defined_color (f, XSTRING (name)->data, &color, 1))
1186 { 1185 {
1187 display_message (f, "Unable to load color %s", name, Qnil); 1186 add_to_log (f, "Unable to load color %s", name, Qnil);
1188 1187
1189 switch (target_index) 1188 switch (target_index)
1190 { 1189 {
@@ -1405,7 +1404,7 @@ load_color (f, face, name, target_index)
1405 if (INTEGERP (color)) 1404 if (INTEGERP (color))
1406 return (unsigned long)XINT (color); 1405 return (unsigned long)XINT (color);
1407 1406
1408 display_message (f, "Unable to load color %s", name, Qnil); 1407 add_to_log (f, "Unable to load color %s", name, Qnil);
1409 1408
1410 switch (target_index) 1409 switch (target_index)
1411 { 1410 {
@@ -2831,7 +2830,7 @@ merge_face_vector_with_property (f, to, prop)
2831 to[LFACE_BACKGROUND_INDEX] = color_name; 2830 to[LFACE_BACKGROUND_INDEX] = color_name;
2832 } 2831 }
2833 else 2832 else
2834 display_message (f, "Invalid face color", color_name, Qnil); 2833 add_to_log (f, "Invalid face color", color_name, Qnil);
2835 } 2834 }
2836 else if (SYMBOLP (first) 2835 else if (SYMBOLP (first)
2837 && *XSYMBOL (first)->name->data == ':') 2836 && *XSYMBOL (first)->name->data == ':')
@@ -2847,16 +2846,14 @@ merge_face_vector_with_property (f, to, prop)
2847 if (STRINGP (value)) 2846 if (STRINGP (value))
2848 to[LFACE_FAMILY_INDEX] = value; 2847 to[LFACE_FAMILY_INDEX] = value;
2849 else 2848 else
2850 display_message (f, "Illegal face font family", 2849 add_to_log (f, "Illegal face font family", value, Qnil);
2851 value, Qnil);
2852 } 2850 }
2853 else if (EQ (keyword, QCheight)) 2851 else if (EQ (keyword, QCheight))
2854 { 2852 {
2855 if (INTEGERP (value)) 2853 if (INTEGERP (value))
2856 to[LFACE_HEIGHT_INDEX] = value; 2854 to[LFACE_HEIGHT_INDEX] = value;
2857 else 2855 else
2858 display_message (f, "Illegal face font height", 2856 add_to_log (f, "Illegal face font height", value, Qnil);
2859 value, Qnil);
2860 } 2857 }
2861 else if (EQ (keyword, QCweight)) 2858 else if (EQ (keyword, QCweight))
2862 { 2859 {
@@ -2864,7 +2861,7 @@ merge_face_vector_with_property (f, to, prop)
2864 && face_numeric_weight (value) >= 0) 2861 && face_numeric_weight (value) >= 0)
2865 to[LFACE_WEIGHT_INDEX] = value; 2862 to[LFACE_WEIGHT_INDEX] = value;
2866 else 2863 else
2867 display_message (f, "Illegal face weight", value, Qnil); 2864 add_to_log (f, "Illegal face weight", value, Qnil);
2868 } 2865 }
2869 else if (EQ (keyword, QCslant)) 2866 else if (EQ (keyword, QCslant))
2870 { 2867 {
@@ -2872,7 +2869,7 @@ merge_face_vector_with_property (f, to, prop)
2872 && face_numeric_slant (value) >= 0) 2869 && face_numeric_slant (value) >= 0)
2873 to[LFACE_SLANT_INDEX] = value; 2870 to[LFACE_SLANT_INDEX] = value;
2874 else 2871 else
2875 display_message (f, "Illegal face slant", value, Qnil); 2872 add_to_log (f, "Illegal face slant", value, Qnil);
2876 } 2873 }
2877 else if (EQ (keyword, QCunderline)) 2874 else if (EQ (keyword, QCunderline))
2878 { 2875 {
@@ -2881,7 +2878,7 @@ merge_face_vector_with_property (f, to, prop)
2881 || STRINGP (value)) 2878 || STRINGP (value))
2882 to[LFACE_UNDERLINE_INDEX] = value; 2879 to[LFACE_UNDERLINE_INDEX] = value;
2883 else 2880 else
2884 display_message (f, "Illegal face underline", value, Qnil); 2881 add_to_log (f, "Illegal face underline", value, Qnil);
2885 } 2882 }
2886 else if (EQ (keyword, QCoverline)) 2883 else if (EQ (keyword, QCoverline))
2887 { 2884 {
@@ -2890,7 +2887,7 @@ merge_face_vector_with_property (f, to, prop)
2890 || STRINGP (value)) 2887 || STRINGP (value))
2891 to[LFACE_OVERLINE_INDEX] = value; 2888 to[LFACE_OVERLINE_INDEX] = value;
2892 else 2889 else
2893 display_message (f, "Illegal face overline", value, Qnil); 2890 add_to_log (f, "Illegal face overline", value, Qnil);
2894 } 2891 }
2895 else if (EQ (keyword, QCstrike_through)) 2892 else if (EQ (keyword, QCstrike_through))
2896 { 2893 {
@@ -2899,8 +2896,7 @@ merge_face_vector_with_property (f, to, prop)
2899 || STRINGP (value)) 2896 || STRINGP (value))
2900 to[LFACE_STRIKE_THROUGH_INDEX] = value; 2897 to[LFACE_STRIKE_THROUGH_INDEX] = value;
2901 else 2898 else
2902 display_message (f, "Illegal face strike-through", 2899 add_to_log (f, "Illegal face strike-through", value, Qnil);
2903 value, Qnil);
2904 } 2900 }
2905 else if (EQ (keyword, QCbox)) 2901 else if (EQ (keyword, QCbox))
2906 { 2902 {
@@ -2912,7 +2908,7 @@ merge_face_vector_with_property (f, to, prop)
2912 || NILP (value)) 2908 || NILP (value))
2913 to[LFACE_BOX_INDEX] = value; 2909 to[LFACE_BOX_INDEX] = value;
2914 else 2910 else
2915 display_message (f, "Illegal face box", value, Qnil); 2911 add_to_log (f, "Illegal face box", value, Qnil);
2916 } 2912 }
2917 else if (EQ (keyword, QCinverse_video) 2913 else if (EQ (keyword, QCinverse_video)
2918 || EQ (keyword, QCreverse_video)) 2914 || EQ (keyword, QCreverse_video))
@@ -2920,24 +2916,21 @@ merge_face_vector_with_property (f, to, prop)
2920 if (EQ (value, Qt) || NILP (value)) 2916 if (EQ (value, Qt) || NILP (value))
2921 to[LFACE_INVERSE_INDEX] = value; 2917 to[LFACE_INVERSE_INDEX] = value;
2922 else 2918 else
2923 display_message (f, "Illegal face inverse-video", 2919 add_to_log (f, "Illegal face inverse-video", value, Qnil);
2924 value, Qnil);
2925 } 2920 }
2926 else if (EQ (keyword, QCforeground)) 2921 else if (EQ (keyword, QCforeground))
2927 { 2922 {
2928 if (STRINGP (value)) 2923 if (STRINGP (value))
2929 to[LFACE_FOREGROUND_INDEX] = value; 2924 to[LFACE_FOREGROUND_INDEX] = value;
2930 else 2925 else
2931 display_message (f, "Illegal face foreground", 2926 add_to_log (f, "Illegal face foreground", value, Qnil);
2932 value, Qnil);
2933 } 2927 }
2934 else if (EQ (keyword, QCbackground)) 2928 else if (EQ (keyword, QCbackground))
2935 { 2929 {
2936 if (STRINGP (value)) 2930 if (STRINGP (value))
2937 to[LFACE_BACKGROUND_INDEX] = value; 2931 to[LFACE_BACKGROUND_INDEX] = value;
2938 else 2932 else
2939 display_message (f, "Illegal face background", 2933 add_to_log (f, "Illegal face background", value, Qnil);
2940 value, Qnil);
2941 } 2934 }
2942 else if (EQ (keyword, QCstipple)) 2935 else if (EQ (keyword, QCstipple))
2943 { 2936 {
@@ -2946,7 +2939,7 @@ merge_face_vector_with_property (f, to, prop)
2946 if (!NILP (pixmap_p)) 2939 if (!NILP (pixmap_p))
2947 to[LFACE_STIPPLE_INDEX] = value; 2940 to[LFACE_STIPPLE_INDEX] = value;
2948 else 2941 else
2949 display_message (f, "Illegal face stipple", value, Qnil); 2942 add_to_log (f, "Illegal face stipple", value, Qnil);
2950#endif 2943#endif
2951 } 2944 }
2952 else if (EQ (keyword, QCwidth)) 2945 else if (EQ (keyword, QCwidth))
@@ -2955,11 +2948,11 @@ merge_face_vector_with_property (f, to, prop)
2955 && face_numeric_swidth (value) >= 0) 2948 && face_numeric_swidth (value) >= 0)
2956 to[LFACE_SWIDTH_INDEX] = value; 2949 to[LFACE_SWIDTH_INDEX] = value;
2957 else 2950 else
2958 display_message (f, "Illegal face width", value, Qnil); 2951 add_to_log (f, "Illegal face width", value, Qnil);
2959 } 2952 }
2960 else 2953 else
2961 display_message (f, "Invalid attribute %s in face property", 2954 add_to_log (f, "Invalid attribute %s in face property",
2962 keyword, Qnil); 2955 keyword, Qnil);
2963 2956
2964 prop = XCDR (XCDR (prop)); 2957 prop = XCDR (XCDR (prop));
2965 } 2958 }
@@ -2981,8 +2974,7 @@ merge_face_vector_with_property (f, to, prop)
2981 /* PROP ought to be a face name. */ 2974 /* PROP ought to be a face name. */
2982 Lisp_Object lface = lface_from_face_name (f, prop, 0); 2975 Lisp_Object lface = lface_from_face_name (f, prop, 0);
2983 if (NILP (lface)) 2976 if (NILP (lface))
2984 display_message (f, "Invalid face text property value: %s", 2977 add_to_log (f, "Invalid face text property value: %s", prop, Qnil);
2985 prop, Qnil);
2986 else 2978 else
2987 merge_face_vectors (XVECTOR (lface)->contents, to); 2979 merge_face_vectors (XVECTOR (lface)->contents, to);
2988 } 2980 }