diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c index 975204da017..dcd48cb7250 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1876,26 +1876,19 @@ this does nothing and returns nil. */) | |||
| 1876 | CHECK_STRING (file); | 1876 | CHECK_STRING (file); |
| 1877 | 1877 | ||
| 1878 | /* If function is defined and not as an autoload, don't override. */ | 1878 | /* If function is defined and not as an autoload, don't override. */ |
| 1879 | if ((CONSP (XSYMBOL (function)->function) | 1879 | if (!EQ (XSYMBOL (function)->function, Qunbound) |
| 1880 | && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) | 1880 | && !AUTOLOADP (XSYMBOL (function)->function)) |
| 1881 | /* Remember that the function was already an autoload. */ | ||
| 1882 | LOADHIST_ATTACH (Fcons (Qt, function)); | ||
| 1883 | else if (!EQ (XSYMBOL (function)->function, Qunbound)) | ||
| 1884 | return Qnil; | 1881 | return Qnil; |
| 1885 | 1882 | ||
| 1886 | if (NILP (Vpurify_flag)) | 1883 | if (!NILP (Vpurify_flag) && EQ (docstring, make_number (0))) |
| 1887 | /* Only add entries after dumping, because the ones before are | ||
| 1888 | not useful and else we get loads of them from the loaddefs.el. */ | ||
| 1889 | LOADHIST_ATTACH (Fcons (Qautoload, function)); | ||
| 1890 | else if (EQ (docstring, make_number (0))) | ||
| 1891 | /* `read1' in lread.c has found the docstring starting with "\ | 1884 | /* `read1' in lread.c has found the docstring starting with "\ |
| 1892 | and assumed the docstring will be provided by Snarf-documentation, so it | 1885 | and assumed the docstring will be provided by Snarf-documentation, so it |
| 1893 | passed us 0 instead. But that leads to accidental sharing in purecopy's | 1886 | passed us 0 instead. But that leads to accidental sharing in purecopy's |
| 1894 | hash-consing, so we use a (hopefully) unique integer instead. */ | 1887 | hash-consing, so we use a (hopefully) unique integer instead. */ |
| 1895 | docstring = make_number (XUNTAG (function, Lisp_Symbol)); | 1888 | docstring = make_number (XHASH (function)); |
| 1896 | return Ffset (function, | 1889 | return Fdefalias (function, |
| 1897 | Fpurecopy (list5 (Qautoload, file, docstring, | 1890 | list5 (Qautoload, file, docstring, interactive, type), |
| 1898 | interactive, type))); | 1891 | Qnil); |
| 1899 | } | 1892 | } |
| 1900 | 1893 | ||
| 1901 | Lisp_Object | 1894 | Lisp_Object |