aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/data.c b/src/data.c
index 50dc188684f..6622088b648 100644
--- a/src/data.c
+++ b/src/data.c
@@ -914,13 +914,11 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva
914 case Lisp_Fwd_Buffer_Obj: 914 case Lisp_Fwd_Buffer_Obj:
915 { 915 {
916 int offset = XBUFFER_OBJFWD (valcontents)->offset; 916 int offset = XBUFFER_OBJFWD (valcontents)->offset;
917 Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype; 917 Lisp_Object predicate = XBUFFER_OBJFWD (valcontents)->predicate;
918 918
919 if (!(NILP (type) || NILP (newval) 919 if (!NILP (predicate) && !NILP (newval)
920 || (XINT (type) == Lisp_Int0 920 && NILP (call1 (predicate, newval)))
921 ? INTEGERP (newval) 921 wrong_type_argument (predicate, newval);
922 : XTYPE (newval) == XINT (type))))
923 buffer_slot_type_mismatch (newval, XINT (type));
924 922
925 if (buf == NULL) 923 if (buf == NULL)
926 buf = current_buffer; 924 buf = current_buffer;