Mercurial > emacs
comparison src/lisp.h @ 91056:1251cabc40b7
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 890-898)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 122-128)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 257-258)
- Merge from emacs--rel--22
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 19 Oct 2007 00:00:21 +0000 |
parents | a0e466c4d599 35d2f0abc597 |
children | 5e056bb0109f |
comparison
equal
deleted
inserted
replaced
91055:46bc3a01b2fa | 91056:1251cabc40b7 |
---|---|
212 Lisp_Misc_Intfwd, | 212 Lisp_Misc_Intfwd, |
213 Lisp_Misc_Boolfwd, | 213 Lisp_Misc_Boolfwd, |
214 Lisp_Misc_Objfwd, | 214 Lisp_Misc_Objfwd, |
215 Lisp_Misc_Buffer_Objfwd, | 215 Lisp_Misc_Buffer_Objfwd, |
216 Lisp_Misc_Buffer_Local_Value, | 216 Lisp_Misc_Buffer_Local_Value, |
217 Lisp_Misc_Some_Buffer_Local_Value, | |
218 Lisp_Misc_Overlay, | 217 Lisp_Misc_Overlay, |
219 Lisp_Misc_Kboard_Objfwd, | 218 Lisp_Misc_Kboard_Objfwd, |
220 Lisp_Misc_Save_Value, | 219 Lisp_Misc_Save_Value, |
221 /* Currently floats are not a misc type, | 220 /* Currently floats are not a misc type, |
222 but let's define this in case we want to change that. */ | 221 but let's define this in case we want to change that. */ |
510 #define XFLOAT(a) (eassert (FLOATP(a)),(struct Lisp_Float *) XPNTR(a)) | 509 #define XFLOAT(a) (eassert (FLOATP(a)),(struct Lisp_Float *) XPNTR(a)) |
511 | 510 |
512 /* Misc types. */ | 511 /* Misc types. */ |
513 | 512 |
514 #define XMISC(a) ((union Lisp_Misc *) XPNTR(a)) | 513 #define XMISC(a) ((union Lisp_Misc *) XPNTR(a)) |
515 #define XMISCTYPE(a) (XMARKER (a)->type) | 514 #define XMISCANY(a) (eassert (MISCP (a)), &(XMISC(a)->u_any)) |
516 #define XMARKER(a) (&(XMISC(a)->u_marker)) | 515 #define XMISCTYPE(a) (XMISCANY (a)->type) |
517 #define XINTFWD(a) (&(XMISC(a)->u_intfwd)) | 516 #define XMARKER(a) (eassert (MARKERP (a)), &(XMISC(a)->u_marker)) |
518 #define XBOOLFWD(a) (&(XMISC(a)->u_boolfwd)) | 517 #define XINTFWD(a) (eassert (INTFWDP (a)), &(XMISC(a)->u_intfwd)) |
519 #define XOBJFWD(a) (&(XMISC(a)->u_objfwd)) | 518 #define XBOOLFWD(a) (eassert (BOOLFWDP (a)), &(XMISC(a)->u_boolfwd)) |
520 #define XBUFFER_OBJFWD(a) (&(XMISC(a)->u_buffer_objfwd)) | 519 #define XOBJFWD(a) (eassert (OBJFWDP (a)), &(XMISC(a)->u_objfwd)) |
521 #define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value)) | 520 #define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC(a)->u_overlay)) |
522 #define XOVERLAY(a) (&(XMISC(a)->u_overlay)) | 521 #define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC(a)->u_save_value)) |
523 #define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd)) | 522 #define XBUFFER_OBJFWD(a) \ |
524 #define XSAVE_VALUE(a) (&(XMISC(a)->u_save_value)) | 523 (eassert (BUFFER_OBJFWDP (a)), &(XMISC(a)->u_buffer_objfwd)) |
524 #define XBUFFER_LOCAL_VALUE(a) \ | |
525 (eassert (BUFFER_LOCAL_VALUEP (a)), &(XMISC(a)->u_buffer_local_value)) | |
526 #define XKBOARD_OBJFWD(a) \ | |
527 (eassert (KBOARD_OBJFWDP (a)), &(XMISC(a)->u_kboard_objfwd)) | |
525 | 528 |
526 /* Pseudovector types. */ | 529 /* Pseudovector types. */ |
527 | 530 |
528 #define XPROCESS(a) (eassert (PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) | 531 #define XPROCESS(a) (eassert (PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) |
529 #define XWINDOW(a) (eassert (WINDOWP(a)),(struct window *) XPNTR(a)) | 532 #define XWINDOW(a) (eassert (WINDOWP(a)),(struct window *) XPNTR(a)) |
1105 | 1108 |
1106 #define DEFAULT_REHASH_SIZE 1.5 | 1109 #define DEFAULT_REHASH_SIZE 1.5 |
1107 | 1110 |
1108 | 1111 |
1109 /* These structures are used for various misc types. */ | 1112 /* These structures are used for various misc types. */ |
1113 | |
1114 struct Lisp_Misc_Any /* Supertype of all Misc types. */ | |
1115 { | |
1116 int type : 16; /* = Lisp_Misc_Marker */ | |
1117 unsigned gcmarkbit : 1; | |
1118 int spacer : 15; | |
1119 }; | |
1110 | 1120 |
1111 struct Lisp_Marker | 1121 struct Lisp_Marker |
1112 { | 1122 { |
1113 int type : 16; /* = Lisp_Misc_Marker */ | 1123 int type : 16; /* = Lisp_Misc_Marker */ |
1114 unsigned gcmarkbit : 1; | 1124 unsigned gcmarkbit : 1; |
1206 the current buffer and selected frame, then load it. To load it, | 1216 the current buffer and selected frame, then load it. To load it, |
1207 first unload the previous binding, then copy the value of the new | 1217 first unload the previous binding, then copy the value of the new |
1208 binding into `realvalue' (or through it). Also update | 1218 binding into `realvalue' (or through it). Also update |
1209 LOADED-BINDING to point to the newly loaded binding. | 1219 LOADED-BINDING to point to the newly loaded binding. |
1210 | 1220 |
1211 Lisp_Misc_Buffer_Local_Value and Lisp_Misc_Some_Buffer_Local_Value | 1221 `local_if_set' indicates that merely setting the variable creates a local |
1212 both use this kind of structure. With the former, merely setting | 1222 binding for the current buffer. Otherwise the latter, setting the |
1213 the variable creates a local binding for the current buffer. With | 1223 variable does not do that; only make-local-variable does that. */ |
1214 the latter, setting the variable does not do that; only | |
1215 make-local-variable does that. */ | |
1216 | 1224 |
1217 struct Lisp_Buffer_Local_Value | 1225 struct Lisp_Buffer_Local_Value |
1218 { | 1226 { |
1219 int type : 16; /* = Lisp_Misc_Buffer_Local_Value | 1227 int type : 16; /* = Lisp_Misc_Buffer_Local_Value */ |
1220 or Lisp_Misc_Some_Buffer_Local_Value */ | |
1221 unsigned gcmarkbit : 1; | 1228 unsigned gcmarkbit : 1; |
1222 int spacer : 12; | 1229 int spacer : 11; |
1223 | 1230 |
1231 /* 1 means that merely setting the variable creates a local | |
1232 binding for the current buffer */ | |
1233 unsigned int local_if_set : 1; | |
1224 /* 1 means this variable is allowed to have frame-local bindings, | 1234 /* 1 means this variable is allowed to have frame-local bindings, |
1225 so check for them when looking for the proper binding. */ | 1235 so check for them when looking for the proper binding. */ |
1226 unsigned int check_frame : 1; | 1236 unsigned int check_frame : 1; |
1227 /* 1 means that the binding now loaded was found | 1237 /* 1 means that the binding now loaded was found |
1228 as a local binding for the buffer in the `buffer' slot. */ | 1238 as a local binding for the buffer in the `buffer' slot. */ |
1308 /* To get the type field of a union Lisp_Misc, use XMISCTYPE. | 1318 /* To get the type field of a union Lisp_Misc, use XMISCTYPE. |
1309 It uses one of these struct subtypes to get the type field. */ | 1319 It uses one of these struct subtypes to get the type field. */ |
1310 | 1320 |
1311 union Lisp_Misc | 1321 union Lisp_Misc |
1312 { | 1322 { |
1313 struct Lisp_Free u_free; | 1323 struct Lisp_Misc_Any u_any; /* Supertype of all Misc types. */ |
1324 struct Lisp_Free u_free; /* Includes padding to force alignment. */ | |
1314 struct Lisp_Marker u_marker; | 1325 struct Lisp_Marker u_marker; |
1315 struct Lisp_Intfwd u_intfwd; | 1326 struct Lisp_Intfwd u_intfwd; |
1316 struct Lisp_Boolfwd u_boolfwd; | 1327 struct Lisp_Boolfwd u_boolfwd; |
1317 struct Lisp_Objfwd u_objfwd; | 1328 struct Lisp_Objfwd u_objfwd; |
1318 struct Lisp_Buffer_Objfwd u_buffer_objfwd; | 1329 struct Lisp_Buffer_Objfwd u_buffer_objfwd; |
1450 #define INTFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Intfwd) | 1461 #define INTFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Intfwd) |
1451 #define BOOLFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Boolfwd) | 1462 #define BOOLFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Boolfwd) |
1452 #define OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Objfwd) | 1463 #define OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Objfwd) |
1453 #define BUFFER_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Objfwd) | 1464 #define BUFFER_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Objfwd) |
1454 #define BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value) | 1465 #define BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value) |
1466 <<<<<<< TREE | |
1455 #define SOME_BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Some_Buffer_Local_Value) | 1467 #define SOME_BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Some_Buffer_Local_Value) |
1468 ======= | |
1469 #define GC_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value) | |
1470 >>>>>>> MERGE-SOURCE | |
1456 #define KBOARD_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd) | 1471 #define KBOARD_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd) |
1472 <<<<<<< TREE | |
1473 ======= | |
1474 #define GC_KBOARD_OBJFWDP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd) | |
1475 #define SAVE_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value) | |
1476 >>>>>>> MERGE-SOURCE | |
1457 | 1477 |
1458 | 1478 |
1459 /* True if object X is a pseudovector whose code is CODE. */ | 1479 /* True if object X is a pseudovector whose code is CODE. */ |
1460 #define PSEUDOVECTORP(x, code) \ | 1480 #define PSEUDOVECTORP(x, code) \ |
1461 (VECTORLIKEP (x) \ | 1481 (VECTORLIKEP (x) \ |