Mercurial > emacs
diff src/eval.c @ 108161:514ebf69b289
Fix wrong-docstring problem introduced with hash-consing.
* eval.c (Fautoload): Set doc to a unique number rather than to 0.
Remove unused var `args'.
* lisp.h (XSETCARFASTINT, XSETCDRFASTINT): Remove.
(LOADHIST_ATTACH): Wrap with do...while to avoid surprises for callers.
* doc.c (store_function_docstring): Use XSETCAR.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 29 Apr 2010 08:42:01 -0400 |
parents | 641672d44942 |
children | 261591829d04 |
line wrap: on
line diff
--- a/src/eval.c Wed Apr 28 18:27:54 2010 -0400 +++ b/src/eval.c Thu Apr 29 08:42:01 2010 -0400 @@ -2134,8 +2134,6 @@ (function, file, docstring, interactive, type) Lisp_Object function, file, docstring, interactive, type; { - Lisp_Object args[4]; - CHECK_SYMBOL (function); CHECK_STRING (file); @@ -2151,8 +2149,11 @@ LOADHIST_ATTACH (Fcons (Qautoload, function)); else /* We don't want the docstring in purespace (instead, - Snarf-documentation should (hopefully) overwrite it). */ - docstring = make_number (0); + Snarf-documentation should (hopefully) overwrite it). + We used to use 0 here, but that leads to accidental sharing in + purecopy's hash-consing, so we use a (hopefully) unique integer + instead. */ + docstring = make_number (XHASH (function)); return Ffset (function, Fpurecopy (list5 (Qautoload, file, docstring, interactive, type)));