Merge from mainline.
[bpt/emacs.git] / src / xfaces.c
index b09d20c..a26289e 100644 (file)
@@ -273,6 +273,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <X11/Xos.h>
 #define USG
 #define __TIMEVAL__
+#if defined USG || defined __TIMEVAL__ /* Don't warn about unused macros.  */
+#endif
 #else /* not XOS_NEEDS_TIME_H */
 #include <X11/Xos.h>
 #endif /* not XOS_NEEDS_TIME_H */
@@ -317,15 +319,19 @@ static Lisp_Object QCfontset;
 /* Symbols used for attribute values.  */
 
 Lisp_Object Qnormal;
-static Lisp_Object Qbold, Qultra_light, Qextra_light, Qlight;
+Lisp_Object Qbold;
+static Lisp_Object Qultra_light, Qextra_light, Qlight;
 static Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold;
-static Lisp_Object Qoblique, Qitalic, Qreverse_oblique, Qreverse_italic;
-static Lisp_Object Qultra_condensed, Qextra_condensed, Qcondensed;
-static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded;
+static Lisp_Object Qoblique, Qreverse_oblique, Qreverse_italic;
+Lisp_Object Qitalic;
+static Lisp_Object Qultra_condensed, Qextra_condensed;
+Lisp_Object Qcondensed;
+static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qextra_expanded;
+Lisp_Object Qexpanded;
 static Lisp_Object Qultra_expanded;
 static Lisp_Object Qreleased_button, Qpressed_button;
 static Lisp_Object QCstyle, QCcolor, QCline_width;
-static Lisp_Object Qunspecified;
+Lisp_Object Qunspecified;      /* used in dosfns.c */
 static Lisp_Object Qignore_defface;
 
 char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
@@ -564,7 +570,7 @@ unregister_colors (pixels, n)
 }
 
 
-DEFUE ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0,
+DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0,
        doc: /* Dump currently allocated colors to stderr.  */)
   (void)
 {
@@ -883,7 +889,7 @@ clear_face_cache (int clear_fonts_p)
 }
 
 
-DEFUE ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0,
+DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0,
        doc: /* Clear face caches on all frames.
 Optional THOROUGHLY non-nil means try to free unused fonts, too.  */)
   (Lisp_Object thoroughly)
@@ -1842,7 +1848,7 @@ the WIDTH times as wide as FACE on FRAME.  */)
 
 #define LFACEP(LFACE)                                  \
      (VECTORP (LFACE)                                  \
-      && XVECTOR (LFACE)->size == LFACE_VECTOR_SIZE    \
+      && ASIZE (LFACE) == LFACE_VECTOR_SIZE            \
       && EQ (AREF (LFACE, 0), Qface))
 #endif
 
@@ -6179,7 +6185,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
             if we don't have fonts, so we can stop here if not working
             on a window-system frame.  */
          || !FRAME_WINDOW_P (f)
-         || FACE_SUITABLE_FOR_CHAR_P (base_face, 0)))
+         || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face, 0)))
     return base_face->id;
 
   /* Begin with attributes from the base face.  */
@@ -6352,7 +6358,7 @@ dump_realized_face (face)
 }
 
 
-DEFUE ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
+DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
   (Lisp_Object n)
 {
   if (NILP (n))
@@ -6385,7 +6391,7 @@ DEFUE ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
 }
 
 
-DEFUE ("show-face-resources", Fshow_face_resources, Sshow_face_resources,
+DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources,
        0, 0, 0, doc: /* */)
   (void)
 {