diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index 4d200fbc2bd..975204da017 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1876,9 +1876,11 @@ this does nothing and returns nil. */) CHECK_STRING (file); /* If function is defined and not as an autoload, don't override. */ - if (!EQ (XSYMBOL (function)->function, Qunbound) - && !(CONSP (XSYMBOL (function)->function) - && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) + if ((CONSP (XSYMBOL (function)->function) + && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) + /* Remember that the function was already an autoload. */ + LOADHIST_ATTACH (Fcons (Qt, function)); + else if (!EQ (XSYMBOL (function)->function, Qunbound)) return Qnil; if (NILP (Vpurify_flag)) |
