diff options
| author | Richard M. Stallman | 1997-06-01 00:30:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-01 00:30:01 +0000 |
| commit | b5c535767f970733a870523b5444ab11e5df05dc (patch) | |
| tree | fe94599c3d4756deff2a71153b9bdd8c4d2655e0 /src | |
| parent | ab6f89780a01ad996693c42c2cf9ad3d5c3665e9 (diff) | |
| download | emacs-b5c535767f970733a870523b5444ab11e5df05dc.tar.gz emacs-b5c535767f970733a870523b5444ab11e5df05dc.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index c033911e1de..bb746bb859b 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -28,6 +28,11 @@ Boston, MA 02111-1307, USA. */ | |||
| 28 | 28 | ||
| 29 | #include "charset.h" | 29 | #include "charset.h" |
| 30 | 30 | ||
| 31 | #include "frame.h" | ||
| 32 | |||
| 33 | /* The number of face-id's in use (same for all frames). */ | ||
| 34 | static int next_face_id; | ||
| 35 | |||
| 31 | #ifdef HAVE_FACES | 36 | #ifdef HAVE_FACES |
| 32 | 37 | ||
| 33 | #ifdef HAVE_X_WINDOWS | 38 | #ifdef HAVE_X_WINDOWS |
| @@ -39,7 +44,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 39 | #endif | 44 | #endif |
| 40 | #include "buffer.h" | 45 | #include "buffer.h" |
| 41 | #include "dispextern.h" | 46 | #include "dispextern.h" |
| 42 | #include "frame.h" | ||
| 43 | #include "blockinput.h" | 47 | #include "blockinput.h" |
| 44 | #include "window.h" | 48 | #include "window.h" |
| 45 | #include "intervals.h" | 49 | #include "intervals.h" |
| @@ -151,9 +155,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 151 | 155 | ||
| 152 | /* Definitions and declarations. */ | 156 | /* Definitions and declarations. */ |
| 153 | 157 | ||
| 154 | /* The number of face-id's in use (same for all frames). */ | ||
| 155 | static int next_face_id; | ||
| 156 | |||
| 157 | /* The number of the face to use to indicate the region. */ | 158 | /* The number of the face to use to indicate the region. */ |
| 158 | static int region_face; | 159 | static int region_face; |
| 159 | 160 | ||
| @@ -1116,26 +1117,6 @@ recompute_basic_faces (f) | |||
| 1116 | 1117 | ||
| 1117 | /* Lisp interface. */ | 1118 | /* Lisp interface. */ |
| 1118 | 1119 | ||
| 1119 | DEFUN ("frame-face-alist", Fframe_face_alist, Sframe_face_alist, 1, 1, 0, | ||
| 1120 | "") | ||
| 1121 | (frame) | ||
| 1122 | Lisp_Object frame; | ||
| 1123 | { | ||
| 1124 | CHECK_FRAME (frame, 0); | ||
| 1125 | return XFRAME (frame)->face_alist; | ||
| 1126 | } | ||
| 1127 | |||
| 1128 | DEFUN ("set-frame-face-alist", Fset_frame_face_alist, Sset_frame_face_alist, | ||
| 1129 | 2, 2, 0, "") | ||
| 1130 | (frame, value) | ||
| 1131 | Lisp_Object frame, value; | ||
| 1132 | { | ||
| 1133 | CHECK_FRAME (frame, 0); | ||
| 1134 | XFRAME (frame)->face_alist = value; | ||
| 1135 | return value; | ||
| 1136 | } | ||
| 1137 | |||
| 1138 | |||
| 1139 | DEFUN ("make-face-internal", Fmake_face_internal, Smake_face_internal, 1, 1, 0, | 1120 | DEFUN ("make-face-internal", Fmake_face_internal, Smake_face_internal, 1, 1, 0, |
| 1140 | "Create face number FACE-ID on all frames.") | 1121 | "Create face number FACE-ID on all frames.") |
| 1141 | (face_id) | 1122 | (face_id) |
| @@ -1277,14 +1258,6 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal, | |||
| 1277 | 1258 | ||
| 1278 | return Qnil; | 1259 | return Qnil; |
| 1279 | } | 1260 | } |
| 1280 | |||
| 1281 | DEFUN ("internal-next-face-id", Finternal_next_face_id, Sinternal_next_face_id, | ||
| 1282 | 0, 0, 0, "") | ||
| 1283 | () | ||
| 1284 | { | ||
| 1285 | return make_number (next_face_id++); | ||
| 1286 | } | ||
| 1287 | |||
| 1288 | /* Return the face id for name NAME on frame FRAME. | 1261 | /* Return the face id for name NAME on frame FRAME. |
| 1289 | (It should be the same for all frames, | 1262 | (It should be the same for all frames, |
| 1290 | but it's as easy to use the "right" frame to look it up | 1263 | but it's as easy to use the "right" frame to look it up |
| @@ -1305,12 +1278,42 @@ face_name_id_number (f, name) | |||
| 1305 | CHECK_NUMBER (tem, 0); | 1278 | CHECK_NUMBER (tem, 0); |
| 1306 | return XINT (tem); | 1279 | return XINT (tem); |
| 1307 | } | 1280 | } |
| 1281 | |||
| 1282 | #endif /* HAVE_FACES */ | ||
| 1283 | |||
| 1284 | |||
| 1285 | DEFUN ("frame-face-alist", Fframe_face_alist, Sframe_face_alist, 1, 1, 0, | ||
| 1286 | "") | ||
| 1287 | (frame) | ||
| 1288 | Lisp_Object frame; | ||
| 1289 | { | ||
| 1290 | CHECK_FRAME (frame, 0); | ||
| 1291 | return XFRAME (frame)->face_alist; | ||
| 1292 | } | ||
| 1293 | |||
| 1294 | DEFUN ("set-frame-face-alist", Fset_frame_face_alist, Sset_frame_face_alist, | ||
| 1295 | 2, 2, 0, "") | ||
| 1296 | (frame, value) | ||
| 1297 | Lisp_Object frame, value; | ||
| 1298 | { | ||
| 1299 | CHECK_FRAME (frame, 0); | ||
| 1300 | XFRAME (frame)->face_alist = value; | ||
| 1301 | return value; | ||
| 1302 | } | ||
| 1303 | |||
| 1304 | DEFUN ("internal-next-face-id", Finternal_next_face_id, Sinternal_next_face_id, | ||
| 1305 | 0, 0, 0, "") | ||
| 1306 | () | ||
| 1307 | { | ||
| 1308 | return make_number (next_face_id++); | ||
| 1309 | } | ||
| 1308 | 1310 | ||
| 1309 | /* Emacs initialization. */ | 1311 | /* Emacs initialization. */ |
| 1310 | 1312 | ||
| 1311 | void | 1313 | void |
| 1312 | syms_of_xfaces () | 1314 | syms_of_xfaces () |
| 1313 | { | 1315 | { |
| 1316 | #ifdef HAVE_FACES | ||
| 1314 | Qface = intern ("face"); | 1317 | Qface = intern ("face"); |
| 1315 | staticpro (&Qface); | 1318 | staticpro (&Qface); |
| 1316 | Qmouse_face = intern ("mouse-face"); | 1319 | Qmouse_face = intern ("mouse-face"); |
| @@ -1323,14 +1326,15 @@ syms_of_xfaces () | |||
| 1323 | The region is highlighted with this face\n\ | 1326 | The region is highlighted with this face\n\ |
| 1324 | when Transient Mark mode is enabled and the mark is active."); | 1327 | when Transient Mark mode is enabled and the mark is active."); |
| 1325 | 1328 | ||
| 1329 | defsubr (&Smake_face_internal); | ||
| 1330 | defsubr (&Sset_face_attribute_internal); | ||
| 1331 | #endif /* HAVE_FACES */ | ||
| 1332 | |||
| 1326 | #ifdef HAVE_X_WINDOWS | 1333 | #ifdef HAVE_X_WINDOWS |
| 1327 | defsubr (&Spixmap_spec_p); | 1334 | defsubr (&Spixmap_spec_p); |
| 1328 | #endif | 1335 | #endif |
| 1336 | |||
| 1329 | defsubr (&Sframe_face_alist); | 1337 | defsubr (&Sframe_face_alist); |
| 1330 | defsubr (&Sset_frame_face_alist); | 1338 | defsubr (&Sset_frame_face_alist); |
| 1331 | defsubr (&Smake_face_internal); | ||
| 1332 | defsubr (&Sset_face_attribute_internal); | ||
| 1333 | defsubr (&Sinternal_next_face_id); | 1339 | defsubr (&Sinternal_next_face_id); |
| 1334 | } | 1340 | } |
| 1335 | |||
| 1336 | #endif /* HAVE_FACES */ | ||