]> code.delx.au - gnu-emacs/blobdiff - src/data.c
Merge from emacs-24; up to 2012-12-22T02:59:08Z!cyd@gnu.org
[gnu-emacs] / src / data.c
index 50dc188684f5a9b55086782d036cab12d751a4b7..6622088b648f09b50da8e64a0ee3d0a3fb3a721e 100644 (file)
@@ -914,13 +914,11 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva
     case Lisp_Fwd_Buffer_Obj:
       {
        int offset = XBUFFER_OBJFWD (valcontents)->offset;
-       Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype;
+       Lisp_Object predicate = XBUFFER_OBJFWD (valcontents)->predicate;
 
-       if (!(NILP (type) || NILP (newval)
-             || (XINT (type) == Lisp_Int0
-                 ? INTEGERP (newval)
-                 : XTYPE (newval) == XINT (type))))
-         buffer_slot_type_mismatch (newval, XINT (type));
+       if (!NILP (predicate) && !NILP (newval)
+           && NILP (call1 (predicate, newval)))
+         wrong_type_argument (predicate, newval);
 
        if (buf == NULL)
          buf = current_buffer;