Mercurial > emacs
diff src/buffer.h @ 86285:59344cb482f3
* lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field.
* data.c (store_symval_forwarding): Get type from buffer_objfwd.
Update call to buffer_slot_type_mismatch.
* buffer.h (buffer_local_types, PER_BUFFER_TYPE): Remove.
(buffer_slot_type_mismatch): Update.
* buffer.c (buffer_local_types): Remove.
(buffer_slot_type_mismatch): Get the symbol and type as arguments.
(defvar_per_buffer): Set the type in the buffer_objfwd.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Wed, 21 Nov 2007 20:59:47 +0000 |
| parents | e509314f0d59 |
| children | 107ccd98fa12 53108e6cea98 |
line wrap: on
line diff
--- a/src/buffer.h Wed Nov 21 20:37:22 2007 +0000 +++ b/src/buffer.h Wed Nov 21 20:59:47 2007 +0000 @@ -818,18 +818,6 @@ that don't have such names. */ extern struct buffer buffer_local_symbols; - -/* This structure holds the required types for the values in the - buffer-local slots. If a slot contains Qnil, then the - corresponding buffer slot may contain a value of any type. If a - slot contains an integer, then prospective values' tags must be - equal to that integer (except nil is always allowed). - When a tag does not match, the function - buffer_slot_type_mismatch will signal an error. - - If a slot here contains -1, the corresponding variable is read-only. */ - -extern struct buffer buffer_local_types; extern void delete_all_overlays P_ ((struct buffer *)); extern void reset_buffer P_ ((struct buffer *)); @@ -843,7 +831,7 @@ extern void set_buffer_internal_1 P_ ((struct buffer *)); extern void set_buffer_temp P_ ((struct buffer *)); extern void record_buffer P_ ((Lisp_Object)); -extern void buffer_slot_type_mismatch P_ ((int)) NO_RETURN; +extern void buffer_slot_type_mismatch P_ ((Lisp_Object, int)) NO_RETURN; extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT)); extern void mmap_set_vars P_ ((int)); @@ -995,11 +983,5 @@ #define PER_BUFFER_SYMBOL(OFFSET) \ (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_symbols)) -/* Return the type of the per-buffer variable at offset OFFSET in the - buffer structure. */ - -#define PER_BUFFER_TYPE(OFFSET) \ - (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_types)) - /* arch-tag: 679305dd-d41c-4a50-b170-3caf5c97b2d1 (do not change this comment) */
