* 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.
+2010-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ 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.
+
2010-04-28 Glenn Morris <rgm@gnu.org>
* Makefile.in (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT): New variables.
1993-11-01 Richard Stallman (rms@mole.gnu.ai.mit.edu)
- * s/sunos4-1-3.h (HAVE_TERMIOS): Defined.
+ * s/sunos4-1-3.h (HAVE_TERMIOS): Define.
1993-10-25 Brian J. Fox (bfox@albert.gnu.ai.mit.edu)
* Makefile.in: File removed. It is now generated by ../configure.
- * Makefile.in.in (LIBES): Add $(GNULIB_VAR) again at end. This
- change to ymakefile was mysteriously lost. Were any others lost
- too?
+ * Makefile.in.in (LIBES): Add $(GNULIB_VAR) again at end.
+ This change to ymakefile was mysteriously lost.
+ Were any others lost too?
1993-10-02 Brian J. Fox (bfox@ai.mit.edu)
1993-09-24 Brian J. Fox (bfox@ai.mit.edu)
- * textprop.c (validate_plist): Add declaration for `list'
- argument.
+ * textprop.c (validate_plist): Add declaration for `list' argument.
* frame.c (Fhandle_switch_frame): Doc fix.
* doc.c (Fsubstitute_command_keys): Pass new arg.
* abbrev.c (Funexpand_abbrev, Fexpand_abbrev): Pass new arg.
- * s/aix3-2.h (AIX3_2): Defined.
+ * s/aix3-2.h (AIX3_2): Define.
* m/ibmrs6000.h (LIBS_MACHINE): Include -lrts, -liconv only if AIX3_2.
* xterm.h (HAVE_X11R4): If AIX, do not define HAVE_X11R4.
* xfns.c (XScreenNumberOfScreen): New function.
- * m/tek4300.h (C_DEBUG_SWITCH, SYSTEM_MALLOC): Defined.
+ * m/tek4300.h (C_DEBUG_SWITCH, SYSTEM_MALLOC): Define.
* m/iris4d.h (START_FILES, LIB_STANDARD): Don't define if USG5_4.
(DEFAULT_ENTRY_ADDRESS): Likewise.
(UNEXEC): Use unexelfsgi.o if USG5_4.
- * s/irix5-0.h (C_SWITCH_MACHINE): Deleted.
+ * s/irix5-0.h (C_SWITCH_MACHINE): Delete.
1993-08-13 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
* m/dpx2.h (HAVE_TCATTR): Macro #defined.
(HAVE_CLOSEDIR): #undef to allow use of closedir in sysdep.c.
- (SIGTSTP): Commented #undef to allow use of ^Z in shell-mode.
+ (SIGTSTP): Comment #undef to allow use of ^Z in shell-mode.
(SIGNALS_VIA_CHARACTERS): #defined.
1993-08-09 Paul Eggert (eggert@twinsun.com)
and calculate position properly.
* s/bsd4-2.h, s/bsd4-3.h, s/umax.h, s/rtu.h, s/dgux.h (HAVE_VFORK):
- Defined.
+ Define.
* ymakefile (alloc.o): Don't use DEBUG_MOLE.
- (DEBUG_MOLE): Deleted.
+ (DEBUG_MOLE): Delete.
* gnu-hp300: File deleted.
* .gdbinit: Don't put -q in args.
(main): Call init_buffer, init_callproc and init_cmdargs
before init_lread.
(syms_of_emacs): Install the function, and protect the variable.
- * lisp.h (Vinvocation_directory): Declared.
+ * lisp.h (Vinvocation_directory): Declare.
* lread.c (init_lread): Normally put Vinvocation_directory
at end of Vload_path, if not present already.
{
tem = Fcdr (Fcdr (fun));
if (CONSP (tem) && INTEGERP (XCAR (tem)))
- XSETCARFASTINT (tem, offset);
+ XSETCAR (tem, make_number (offset));
}
else if (EQ (tem, Qmacro))
store_function_docstring (XCDR (fun), offset);
(function, file, docstring, interactive, type)
Lisp_Object function, file, docstring, interactive, type;
{
- Lisp_Object args[4];
-
CHECK_SYMBOL (function);
CHECK_STRING (file);
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)));
#define XSETCAR(c,n) (XCAR_AS_LVALUE(c) = (n))
#define XSETCDR(c,n) (XCDR_AS_LVALUE(c) = (n))
-/* For performance: Fast storage of positive integers into the
- fields of a cons cell. See above caveats. */
-#define XSETCARFASTINT(c,n) XSETFASTINT(XCAR_AS_LVALUE(c),(n))
-#define XSETCDRFASTINT(c,n) XSETFASTINT(XCDR_AS_LVALUE(c),(n))
-
/* Take the car or cdr of something whose type is not known. */
#define CAR(c) \
(CONSP ((c)) ? XCAR ((c)) \
extern Lisp_Object make_symbol P_ ((char *));
extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int));
#define LOADHIST_ATTACH(x) \
- if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list)
+ do { \
+ if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); \
+ } while (0)
extern Lisp_Object Vcurrent_load_list;
extern Lisp_Object Vload_history, Vload_suffixes, Vload_file_rep_suffixes;
extern int openp P_ ((Lisp_Object, Lisp_Object, Lisp_Object,