# HG changeset patch # User Jim Blandy # Date 720508728 0 # Node ID ff88f962a9829e5d47cc9474ee4e118207b8267d # Parent 2fd5263590ea62f126cbfddba7de07553daae23d * doc.c: #include keyboard.h. * doc.c (Fsubstitute_command_keys): Ask get_keymap_1 to perform autoloads. Autoloading might GC; we need to GCPRO our local variables now. (Fdocumentation, Fdocumentation_property): Autoloading in Fsubstitute_command_keys might GC; we need to GCPRO our local variables now. diff -r 2fd5263590ea -r ff88f962a982 src/doc.c --- a/src/doc.c Sat Oct 31 05:18:16 1992 +0000 +++ b/src/doc.c Sat Oct 31 05:18:48 1992 +0000 @@ -33,6 +33,7 @@ #include "lisp.h" #include "buffer.h" +#include "keyboard.h" Lisp_Object Vdoc_file_name; @@ -172,7 +173,13 @@ } if (NILP (raw)) - doc = Fsubstitute_command_keys (doc); + { + struct gcpro gcpro1; + + GCPRO1 (doc); + doc = Fsubstitute_command_keys (doc); + UNGCPRO; + } return doc; } @@ -353,17 +360,21 @@ int idx; int bsize; unsigned char *new; - register Lisp_Object tem; + Lisp_Object tem; Lisp_Object keymap; unsigned char *start; int length; - struct gcpro gcpro1; + Lisp_Object name; + struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; if (NILP (str)) return Qnil; CHECK_STRING (str, 0); - GCPRO1 (str); + tem = Qnil; + keymap = Qnil; + name = Qnil; + GCPRO4 (str, tem, keymap, name); keymap = current_buffer->keymap; @@ -419,7 +430,6 @@ else if (strp[0] == '\\' && (strp[1] == '{' || strp[1] == '<')) { struct buffer *oldbuf; - Lisp_Object name; changed = 1; strp += 2; /* skip \{ or \< */ @@ -444,7 +454,7 @@ { tem = Fsymbol_value (name); if (! NILP (tem)) - tem = get_keymap_1 (tem, 0); + tem = get_keymap_1 (tem, 0, 1); } /* Now switch to a temp buffer. */ @@ -487,9 +497,8 @@ tem = make_string (buf, bufp - buf); else tem = str; - UNGCPRO; free (buf); - return tem; + RETURN_UNGCPRO (tem); } syms_of_doc ()