1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 01:20:37 -08:00

* src/data.c (Ffset): Don't signal gratuitous errors

This commit is contained in:
Stefan Monnier 2018-11-02 15:00:34 -04:00
parent ea35756ac6
commit ef183b996c

View file

@ -758,7 +758,9 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
register Lisp_Object function;
CHECK_SYMBOL (symbol);
/* Perhaps not quite the right error signal, but seems good enough. */
if (NILP (symbol))
if (NILP (symbol) && !NILP (definition))
/* There are so many other ways to shoot oneself in the foot, I don't
think this one little sanity check is worth its cost, but anyway. */
xsignal1 (Qsetting_constant, symbol);
function = XSYMBOL (symbol)->u.s.function;