diff options
| author | Stefan Monnier | 2007-11-21 20:59:47 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-11-21 20:59:47 +0000 |
| commit | 64e16c3c22db9f01922a4f3efb936c4265ccec7a (patch) | |
| tree | 62cd4f172cedd91260805d9b9951918141dbbe43 /src/data.c | |
| parent | cb01ce3f055a415bbe4f2be4fbd0e4a7f320d688 (diff) | |
| download | emacs-64e16c3c22db9f01922a4f3efb936c4265ccec7a.tar.gz emacs-64e16c3c22db9f01922a4f3efb936c4265ccec7a.zip | |
* 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.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/data.c b/src/data.c index 2ee84f01a14..4a63eb7d2f5 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -930,7 +930,7 @@ store_symval_forwarding (symbol, valcontents, newval, buf) | |||
| 930 | break; | 930 | break; |
| 931 | 931 | ||
| 932 | case Lisp_Misc_Boolfwd: | 932 | case Lisp_Misc_Boolfwd: |
| 933 | *XBOOLFWD (valcontents)->boolvar = NILP (newval) ? 0 : 1; | 933 | *XBOOLFWD (valcontents)->boolvar = !NILP (newval); |
| 934 | break; | 934 | break; |
| 935 | 935 | ||
| 936 | case Lisp_Misc_Objfwd: | 936 | case Lisp_Misc_Objfwd: |
| @@ -970,12 +970,11 @@ store_symval_forwarding (symbol, valcontents, newval, buf) | |||
| 970 | case Lisp_Misc_Buffer_Objfwd: | 970 | case Lisp_Misc_Buffer_Objfwd: |
| 971 | { | 971 | { |
| 972 | int offset = XBUFFER_OBJFWD (valcontents)->offset; | 972 | int offset = XBUFFER_OBJFWD (valcontents)->offset; |
| 973 | Lisp_Object type; | 973 | Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype; |
| 974 | 974 | ||
| 975 | type = PER_BUFFER_TYPE (offset); | ||
| 976 | if (! NILP (type) && ! NILP (newval) | 975 | if (! NILP (type) && ! NILP (newval) |
| 977 | && XTYPE (newval) != XINT (type)) | 976 | && XTYPE (newval) != XINT (type)) |
| 978 | buffer_slot_type_mismatch (offset); | 977 | buffer_slot_type_mismatch (symbol, XINT (type)); |
| 979 | 978 | ||
| 980 | if (buf == NULL) | 979 | if (buf == NULL) |
| 981 | buf = current_buffer; | 980 | buf = current_buffer; |