Mercurial > emacs
comparison src/lisp.h @ 89943:4c90ffeb71c5
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-15
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-218
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-220
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-221
Restore deleted tagline in etc/TUTORIAL.ru
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-222
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-228
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-229
Remove TeX output files from the archive
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248
src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-256
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-258
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-263
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-264
Update from CVS: lispref/display.texi: emacs -> Emacs.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-265
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275
Update from CVS: man/makefile.w32-in: Revert last change
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296
Allow restarting an existing debugger session that's exited
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328
Update from CVS: src/.gdbinit (xsymbol): Fix last change.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-344
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-345
Tweak source regexps so that building in place won't cause problems
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-346
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-351
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-352
Update from CVS: lisp/flymake.el: New file.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-353
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-361
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-362
Support " [...]" style defaults in minibuffer-electric-default-mode
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-363
(read-number): Use canonical format for default in prompt.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-364
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-367
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-368
Improve display-supports-face-attributes-p on non-ttys
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-369
Rewrite face-differs-from-default-p
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-370
Move `display-supports-face-attributes-p' entirely into C code
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-371
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-372
Simplify face-differs-from-default-p; don't consider :stipple.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-373
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-374
(tty_supports_face_attributes_p): Ensure attributes differ from default
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-375
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-376
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377
(Fdisplay_supports_face_attributes_p): Work around bootstrapping problem
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-378
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-380
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-381
Face merging cleanups
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-382
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-384
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-385
src/xfaces.c (push_named_merge_point): Return 0 if a cycle is detected
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-386
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-395
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-396
Tweak arch tagging to make build/install-in-place less annoying
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Work around vc-arch problems when building eshell
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-398
Tweak permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-399
Tweak directory permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-400
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-401
More build-in-place tweaking of arch tagging
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-402
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-403
Yet more build-in-place tweaking of arch tagging
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-404
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410
Make sure image types are initialized for lookup too
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 28 Jun 2004 07:56:49 +0000 |
parents | 68c22ea6027c 16da17b0941a |
children | 59dcbfe97385 |
comparison
equal
deleted
inserted
replaced
89942:9cb747ae49af | 89943:4c90ffeb71c5 |
---|---|
277 #endif | 277 #endif |
278 }; | 278 }; |
279 | 279 |
280 /* For convenience, we also store the number of elements in these bits. */ | 280 /* For convenience, we also store the number of elements in these bits. */ |
281 #define PSEUDOVECTOR_SIZE_MASK 0x1ff | 281 #define PSEUDOVECTOR_SIZE_MASK 0x1ff |
282 | |
283 /* Number of bits to put in each character in the internal representation | |
284 of bool vectors. This should not vary across implementations. */ | |
285 #define BOOL_VECTOR_BITS_PER_CHAR 8 | |
282 | 286 |
283 /***** Select the tagging scheme. *****/ | 287 /***** Select the tagging scheme. *****/ |
288 /* There are basically two options that control the tagging scheme: | |
289 - NO_UNION_TYPE says that Lisp_Object should be an integer instead | |
290 of a union. | |
291 - USE_LSB_TAG means that we can assume the least 3 bits of pointers are | |
292 always 0, and we can thus use them to hold tag bits, without | |
293 restricting our addressing space. | |
294 | |
295 If USE_LSB_TAG is not set, then we use the top 3 bits for tagging, thus | |
296 restricting our possible address range. Currently USE_LSB_TAG is not | |
297 allowed together with a union. This is not due to any fundamental | |
298 technical (or political ;-) problem: nobody wrote the code to do it yet. | |
299 | |
300 USE_LSB_TAG not only requires the least 3 bits of pointers returned by | |
301 malloc to be 0 but also needs to be able to impose a mult-of-8 alignment | |
302 on the few static Lisp_Objects used: all the defsubr as well | |
303 as the two special buffers buffer_defaults and buffer_local_symbols. */ | |
284 | 304 |
285 /* First, try and define DECL_ALIGN(type,var) which declares a static | 305 /* First, try and define DECL_ALIGN(type,var) which declares a static |
286 variable VAR of type TYPE with the added requirement that it be | 306 variable VAR of type TYPE with the added requirement that it be |
287 TYPEBITS-aligned. */ | 307 TYPEBITS-aligned. */ |
288 #if defined USE_LSB_TAG && !defined DECL_ALIGN | 308 #ifndef DECL_ALIGN |
289 /* What compiler directive should we use for non-gcc compilers? -stef */ | 309 /* What compiler directive should we use for non-gcc compilers? -stef */ |
290 # if defined (__GNUC__) | 310 # if defined (__GNUC__) |
291 # define DECL_ALIGN(type, var) \ | 311 # define DECL_ALIGN(type, var) \ |
292 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var | 312 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var |
293 # else | 313 # endif |
314 #endif | |
315 | |
316 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ | |
317 #if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined MAC_OSX | |
318 /* We also need to be able to specify mult-of-8 alignment on static vars. */ | |
319 # if defined DECL_ALIGN | |
320 /* We currently do not support USE_LSB_TAG with a union Lisp_Object. */ | |
321 # if defined NO_UNION_TYPE | |
322 # define USE_LSB_TAG | |
323 # endif | |
324 # endif | |
325 #endif | |
326 | |
327 /* Just remove the alignment annotation if we don't use it. */ | |
328 #ifndef DECL_ALIGN | |
329 # ifdef USE_LSB_TAG | |
294 # error "USE_LSB_TAG used without defining DECL_ALIGN" | 330 # error "USE_LSB_TAG used without defining DECL_ALIGN" |
295 # endif | 331 # endif |
296 #endif | 332 # define DECL_ALIGN(type, var) type var |
297 | |
298 #ifndef USE_LSB_TAG | |
299 /* Just remove the alignment annotation if we don't use it. */ | |
300 #undef DECL_ALIGN | |
301 #define DECL_ALIGN(type, var) type var | |
302 #endif | 333 #endif |
303 | 334 |
304 | 335 |
305 /* These macros extract various sorts of values from a Lisp_Object. | 336 /* These macros extract various sorts of values from a Lisp_Object. |
306 For example, if tem is a Lisp_Object whose type is Lisp_Cons, | 337 For example, if tem is a Lisp_Object whose type is Lisp_Cons, |
381 #define XFASTINT(a) ((a).i + 0) | 412 #define XFASTINT(a) ((a).i + 0) |
382 #define XSETFASTINT(a, b) ((a).i = (b)) | 413 #define XSETFASTINT(a, b) ((a).i = (b)) |
383 | 414 |
384 #ifdef EXPLICIT_SIGN_EXTEND | 415 #ifdef EXPLICIT_SIGN_EXTEND |
385 /* Make sure we sign-extend; compilers have been known to fail to do so. */ | 416 /* Make sure we sign-extend; compilers have been known to fail to do so. */ |
386 #define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \ | 417 #define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \ |
387 >> (BITS_PER_EMACS_INT - VALBITS)) | 418 >> (BITS_PER_EMACS_INT - VALBITS)) |
388 #else | 419 #else |
389 #define XINT(a) ((a).s.val) | 420 #define XINT(a) ((a).s.val) |
390 #endif /* EXPLICIT_SIGN_EXTEND */ | 421 #endif /* EXPLICIT_SIGN_EXTEND */ |
391 | 422 |
399 (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; })) | 430 (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; })) |
400 #else | 431 #else |
401 extern Lisp_Object make_number (); | 432 extern Lisp_Object make_number (); |
402 #endif | 433 #endif |
403 | 434 |
404 #define EQ(x, y) ((x).s.val == (y).s.val) | 435 #define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type) |
405 | 436 |
406 #endif /* NO_UNION_TYPE */ | 437 #endif /* NO_UNION_TYPE */ |
407 | 438 |
408 /* During garbage collection, XGCTYPE must be used for extracting types | 439 /* During garbage collection, XGCTYPE must be used for extracting types |
409 so that the mark bit is ignored. XMARKBIT accesses the markbit. | 440 so that the mark bit is ignored. XMARKBIT accesses the markbit. |
2406 | 2437 |
2407 void set_frame_cursor_types P_ ((struct frame *, Lisp_Object)); | 2438 void set_frame_cursor_types P_ ((struct frame *, Lisp_Object)); |
2408 extern void syms_of_xdisp P_ ((void)); | 2439 extern void syms_of_xdisp P_ ((void)); |
2409 extern void init_xdisp P_ ((void)); | 2440 extern void init_xdisp P_ ((void)); |
2410 extern Lisp_Object safe_eval P_ ((Lisp_Object)); | 2441 extern Lisp_Object safe_eval P_ ((Lisp_Object)); |
2411 extern int pos_visible_p P_ ((struct window *, int, int *, int)); | 2442 extern int pos_visible_p P_ ((struct window *, int, int *, |
2443 int *, int *, int)); | |
2412 | 2444 |
2413 /* Defined in vm-limit.c. */ | 2445 /* Defined in vm-limit.c. */ |
2414 extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ())); | 2446 extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ())); |
2415 | 2447 |
2416 /* Defined in alloc.c */ | 2448 /* Defined in alloc.c */ |
2777 extern int internal_delete_file P_ ((Lisp_Object)); | 2809 extern int internal_delete_file P_ ((Lisp_Object)); |
2778 extern void syms_of_fileio P_ ((void)); | 2810 extern void syms_of_fileio P_ ((void)); |
2779 EXFUN (Fmake_temp_name, 1); | 2811 EXFUN (Fmake_temp_name, 1); |
2780 extern void init_fileio_once P_ ((void)); | 2812 extern void init_fileio_once P_ ((void)); |
2781 extern Lisp_Object make_temp_name P_ ((Lisp_Object, int)); | 2813 extern Lisp_Object make_temp_name P_ ((Lisp_Object, int)); |
2814 EXFUN (Fmake_symbolic_link, 3); | |
2782 | 2815 |
2783 /* Defined in abbrev.c */ | 2816 /* Defined in abbrev.c */ |
2784 | 2817 |
2785 extern void syms_of_abbrev P_ ((void)); | 2818 extern void syms_of_abbrev P_ ((void)); |
2786 | 2819 |
2890 extern void invalidate_current_column P_ ((void)); | 2923 extern void invalidate_current_column P_ ((void)); |
2891 extern int indented_beyond_p P_ ((int, int, double)); | 2924 extern int indented_beyond_p P_ ((int, int, double)); |
2892 extern void syms_of_indent P_ ((void)); | 2925 extern void syms_of_indent P_ ((void)); |
2893 | 2926 |
2894 /* defined in frame.c */ | 2927 /* defined in frame.c */ |
2928 #ifdef HAVE_WINDOW_SYSTEM | |
2929 extern Lisp_Object Vx_resource_name; | |
2930 extern Lisp_Object Vx_resource_class; | |
2931 #endif /* HAVE_WINDOW_SYSTEM */ | |
2895 extern Lisp_Object Qvisible; | 2932 extern Lisp_Object Qvisible; |
2896 extern void store_frame_param P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 2933 extern void store_frame_param P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
2897 extern void store_in_alist P_ ((Lisp_Object *, Lisp_Object, Lisp_Object)); | 2934 extern void store_in_alist P_ ((Lisp_Object *, Lisp_Object, Lisp_Object)); |
2898 extern Lisp_Object do_switch_frame P_ ((Lisp_Object, int, int)); | 2935 extern Lisp_Object do_switch_frame P_ ((Lisp_Object, int, int)); |
2899 extern Lisp_Object get_frame_param P_ ((struct frame *, Lisp_Object)); | 2936 extern Lisp_Object get_frame_param P_ ((struct frame *, Lisp_Object)); |
3011 extern void syms_of_macros P_ ((void)); | 3048 extern void syms_of_macros P_ ((void)); |
3012 | 3049 |
3013 /* defined in undo.c */ | 3050 /* defined in undo.c */ |
3014 extern Lisp_Object Qinhibit_read_only; | 3051 extern Lisp_Object Qinhibit_read_only; |
3015 EXFUN (Fundo_boundary, 0); | 3052 EXFUN (Fundo_boundary, 0); |
3016 extern Lisp_Object truncate_undo_list P_ ((Lisp_Object, int, int)); | 3053 extern Lisp_Object truncate_undo_list P_ ((Lisp_Object, int, int, int)); |
3017 extern void record_marker_adjustment P_ ((Lisp_Object, int)); | 3054 extern void record_marker_adjustment P_ ((Lisp_Object, int)); |
3018 extern void record_insert P_ ((int, int)); | 3055 extern void record_insert P_ ((int, int)); |
3019 extern void record_delete P_ ((int, Lisp_Object)); | 3056 extern void record_delete P_ ((int, Lisp_Object)); |
3020 extern void record_first_change P_ ((void)); | 3057 extern void record_first_change P_ ((void)); |
3021 extern void record_change P_ ((int, int)); | 3058 extern void record_change P_ ((int, int)); |
3113 extern int getloadavg P_ ((double *, int)); | 3150 extern int getloadavg P_ ((double *, int)); |
3114 | 3151 |
3115 #ifdef HAVE_X_WINDOWS | 3152 #ifdef HAVE_X_WINDOWS |
3116 /* Defined in xfns.c */ | 3153 /* Defined in xfns.c */ |
3117 extern void syms_of_xfns P_ ((void)); | 3154 extern void syms_of_xfns P_ ((void)); |
3118 extern Lisp_Object Vx_resource_name; | 3155 #endif /* HAVE_X_WINDOWS */ |
3119 extern Lisp_Object Vx_resource_class; | 3156 #ifdef HAVE_WINDOW_SYSTEM |
3157 /* Defined in xfns.c, w32fns.c, or macfns.c */ | |
3120 EXFUN (Fxw_display_color_p, 1); | 3158 EXFUN (Fxw_display_color_p, 1); |
3121 EXFUN (Fx_file_dialog, 4); | 3159 EXFUN (Fx_file_dialog, 4); |
3122 #endif /* HAVE_X_WINDOWS */ | 3160 #endif /* HAVE_WINDOW_SYSTEM */ |
3123 | 3161 |
3124 /* Defined in xsmfns.c */ | 3162 /* Defined in xsmfns.c */ |
3125 extern void syms_of_xsmfns P_ ((void)); | 3163 extern void syms_of_xsmfns P_ ((void)); |
3126 | 3164 |
3127 /* Defined in xselect.c */ | 3165 /* Defined in xselect.c */ |
3143 extern POINTER_TYPE *xrealloc P_ ((POINTER_TYPE *, size_t)); | 3181 extern POINTER_TYPE *xrealloc P_ ((POINTER_TYPE *, size_t)); |
3144 extern void xfree P_ ((POINTER_TYPE *)); | 3182 extern void xfree P_ ((POINTER_TYPE *)); |
3145 | 3183 |
3146 extern char *xstrdup P_ ((const char *)); | 3184 extern char *xstrdup P_ ((const char *)); |
3147 | 3185 |
3148 #ifndef USE_CRT_DLL | |
3149 extern char *egetenv P_ ((char *)); | 3186 extern char *egetenv P_ ((char *)); |
3150 #endif | |
3151 | 3187 |
3152 /* Set up the name of the machine we're running on. */ | 3188 /* Set up the name of the machine we're running on. */ |
3153 extern void init_system_name P_ ((void)); | 3189 extern void init_system_name P_ ((void)); |
3154 | 3190 |
3155 /* Some systems (e.g., NT) use a different path separator than Unix, | 3191 /* Some systems (e.g., NT) use a different path separator than Unix, |
3226 #define make_fixnum_or_float(val) \ | 3262 #define make_fixnum_or_float(val) \ |
3227 (FIXNUM_OVERFLOW_P (val) \ | 3263 (FIXNUM_OVERFLOW_P (val) \ |
3228 ? make_float (val) \ | 3264 ? make_float (val) \ |
3229 : make_number ((EMACS_INT)(val))) | 3265 : make_number ((EMACS_INT)(val))) |
3230 | 3266 |
3267 | |
3268 /* Checks the `cycle check' variable CHECK to see if it indicates that | |
3269 EL is part of a cycle; CHECK must be either Qnil or a value returned | |
3270 by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of | |
3271 elements after which a cycle might be suspected; after that many | |
3272 elements, this macro begins consing in order to keep more precise | |
3273 track of elements. | |
3274 | |
3275 Returns nil if a cycle was detected, otherwise a new value for CHECK | |
3276 that includes EL. | |
3277 | |
3278 CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so | |
3279 the caller should make sure that's ok. */ | |
3280 | |
3281 #define CYCLE_CHECK(check, el, suspicious) \ | |
3282 (NILP (check) \ | |
3283 ? make_number (0) \ | |
3284 : (INTEGERP (check) \ | |
3285 ? (XFASTINT (check) < (suspicious) \ | |
3286 ? make_number (XFASTINT (check) + 1) \ | |
3287 : Fcons (el, Qnil)) \ | |
3288 : (!NILP (Fmemq ((el), (check))) \ | |
3289 ? Qnil \ | |
3290 : Fcons ((el), (check))))) | |
3291 | |
3292 | |
3231 #endif /* EMACS_LISP_H */ | 3293 #endif /* EMACS_LISP_H */ |
3232 | 3294 |
3233 /* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e | 3295 /* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e |
3234 (do not change this comment) */ | 3296 (do not change this comment) */ |