(symbol, definition)
register Lisp_Object symbol, definition;
{
- CHECK_SYMBOL (symbol, 0);
- if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound))
- Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function),
- Vautoload_queue);
- XSYMBOL (symbol)->function = definition;
- /* Handle automatic advice activation */
- if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info)))
- {
- call2 (Qad_activate, symbol, Qnil);
- definition = XSYMBOL (symbol)->function;
- }
+ definition = Ffset (symbol, definition);
LOADHIST_ATTACH (symbol);
return definition;
}
register int idx = XBUFFER_OBJFWD (valcontents)->offset;
register int mask = XINT (*((Lisp_Object *)
(idx + (char *)&buffer_local_flags)));
- if (mask > 0)
+ if (mask > 0 && ! bindflag)
current_buffer->local_var_flags |= mask;
}
error ("Attempt to change byte length of a string");
/* We can't accept a change causing byte combining. */
- if ((idxval > 0 && !CHAR_HEAD_P (*str)
- && (prev_byte = string_char_to_byte (array, idxval - 1),
- (prev_byte + 1 < idxval_byte
- || (p[-1] >= 0x80 && p[-1] < 0xA0))))
- || (idxval < XSTRING (array)->size - 1
- && (*str >=0x80 && *str < 0xA0)
- && !CHAR_HEAD_P (p[actual_len])))
+ if (!ASCII_BYTE_P (*str)
+ && ((idxval > 0 && !CHAR_HEAD_P (*str)
+ && (prev_byte = string_char_to_byte (array, idxval - 1),
+ BYTES_BY_CHAR_HEAD (XSTRING (array)->data[prev_byte])
+ > idxval_byte - prev_byte))
+ || (idxval < XSTRING (array)->size - 1
+ && !CHAR_HEAD_P (p[actual_len])
+ && new_len < BYTES_BY_CHAR_HEAD (*str))))
error ("Attempt to change char length of a string");
while (new_len--)
*p++ = *str++;