changeset 18083:c361afa561c5

Include frame.h unconditionally. (Fframe_face_alist, Fset_frame_face_alist): Define unconditionally. (Finternal_next_face_id, next_face_id): Likewise. (syms_of_xfaces): Define unconditionally, but conditionalize some of the contents.
author Richard M. Stallman <rms@gnu.org>
date Sun, 01 Jun 1997 00:30:01 +0000
parents 4a796f28f98e
children 6f264bb70b49
files src/xfaces.c
diffstat 1 files changed, 40 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Sat May 31 21:14:57 1997 +0000
+++ b/src/xfaces.c	Sun Jun 01 00:30:01 1997 +0000
@@ -28,6 +28,11 @@
 
 #include "charset.h"
 
+#include "frame.h"
+
+/* The number of face-id's in use (same for all frames).  */
+static int next_face_id;
+
 #ifdef HAVE_FACES
 
 #ifdef HAVE_X_WINDOWS
@@ -39,7 +44,6 @@
 #endif
 #include "buffer.h"
 #include "dispextern.h"
-#include "frame.h"
 #include "blockinput.h"
 #include "window.h"
 #include "intervals.h"
@@ -151,9 +155,6 @@
 
 /* Definitions and declarations.  */
 
-/* The number of face-id's in use (same for all frames).  */
-static int next_face_id;
-
 /* The number of the face to use to indicate the region.  */
 static int region_face;
 
@@ -1116,26 +1117,6 @@
 
 /* Lisp interface. */
 
-DEFUN ("frame-face-alist", Fframe_face_alist, Sframe_face_alist, 1, 1, 0,
-       "")
-     (frame)
-     Lisp_Object frame;
-{
-  CHECK_FRAME (frame, 0);
-  return XFRAME (frame)->face_alist;
-}
-
-DEFUN ("set-frame-face-alist", Fset_frame_face_alist, Sset_frame_face_alist,
-       2, 2, 0, "")
-     (frame, value)
-     Lisp_Object frame, value;
-{
-  CHECK_FRAME (frame, 0);
-  XFRAME (frame)->face_alist = value;
-  return value;
-}
-
-
 DEFUN ("make-face-internal", Fmake_face_internal, Smake_face_internal, 1, 1, 0,
   "Create face number FACE-ID on all frames.")
   (face_id)
@@ -1277,14 +1258,6 @@
 
   return Qnil;
 }
-
-DEFUN ("internal-next-face-id", Finternal_next_face_id, Sinternal_next_face_id,
-  0, 0, 0, "")
-  ()
-{
-  return make_number (next_face_id++);
-}
-
 /* Return the face id for name NAME on frame FRAME.
    (It should be the same for all frames,
    but it's as easy to use the "right" frame to look it up
@@ -1305,12 +1278,42 @@
   CHECK_NUMBER (tem, 0);
   return XINT (tem);
 }
+
+#endif /* HAVE_FACES */
+
+
+DEFUN ("frame-face-alist", Fframe_face_alist, Sframe_face_alist, 1, 1, 0,
+       "")
+     (frame)
+     Lisp_Object frame;
+{
+  CHECK_FRAME (frame, 0);
+  return XFRAME (frame)->face_alist;
+}
+
+DEFUN ("set-frame-face-alist", Fset_frame_face_alist, Sset_frame_face_alist,
+       2, 2, 0, "")
+     (frame, value)
+     Lisp_Object frame, value;
+{
+  CHECK_FRAME (frame, 0);
+  XFRAME (frame)->face_alist = value;
+  return value;
+}
+
+DEFUN ("internal-next-face-id", Finternal_next_face_id, Sinternal_next_face_id,
+  0, 0, 0, "")
+  ()
+{
+  return make_number (next_face_id++);
+}
 
 /* Emacs initialization.  */
 
 void
 syms_of_xfaces ()
 {
+#ifdef HAVE_FACES
   Qface = intern ("face");
   staticpro (&Qface);
   Qmouse_face = intern ("mouse-face");
@@ -1323,14 +1326,15 @@
 The region is highlighted with this face\n\
 when Transient Mark mode is enabled and the mark is active.");
 
+  defsubr (&Smake_face_internal);
+  defsubr (&Sset_face_attribute_internal);
+#endif /* HAVE_FACES */
+
 #ifdef HAVE_X_WINDOWS
   defsubr (&Spixmap_spec_p);
 #endif
+
   defsubr (&Sframe_face_alist);
   defsubr (&Sset_frame_face_alist);
-  defsubr (&Smake_face_internal);
-  defsubr (&Sset_face_attribute_internal);
   defsubr (&Sinternal_next_face_id);
 }
-
-#endif /* HAVE_FACES */