int offset;
EMACS_INT position;
Lisp_Object file, tem, pos;
- ptrdiff_t count;
USE_SAFE_ALLOCA;
if (INTEGERP (filepos))
file, build_string ("\"\n"));
}
}
- count = SPECPDL_INDEX ();
+ dynwind_begin ();
record_unwind_protect_int (close_file_unwind, fd);
/* Seek only to beginning of disk block. */
}
p += nread;
}
- unbind_to (count, Qnil);
+ dynwind_end ();
SAFE_FREE ();
/* Sanity checking. */
docstring, since we've found a docstring for it. */
if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_DOC_STRING)
ASET (fun, COMPILED_DOC_STRING, make_number (offset));
+ else
+ message ("No docstring slot for %s",
+ SYMBOLP (obj) ? SSDATA (SYMBOL_NAME (obj)) : "<anonymous>");
}
}
{
#include "buildobj.h"
};
- int i = sizeof buildobj / sizeof *buildobj;
+ int i = ARRAYELTS (buildobj);
while (0 <= --i)
Vbuild_files = Fcons (build_string (buildobj[i]), Vbuild_files);
Vbuild_files = Fpurecopy (Vbuild_files);
report_file_errno ("Opening doc string file", build_string (name),
open_errno);
}
- count = SPECPDL_INDEX ();
+ dynwind_begin ();
record_unwind_protect_int (close_file_unwind, fd);
Vdoc_file_name = filename;
filled = 0;
filled -= end - buf;
memmove (buf, end, filled);
}
- return unbind_to (count, Qnil);
+ dynwind_end ();
+ return Qnil;
}
\f
DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ into the output.
Return the original STRING if no substitutions are made.
-Otherwise, return a new string, without any text properties. */)
+Otherwise, return a new string. */)
(Lisp_Object string)
{
char *buf;
keymap = Voverriding_local_map;
bsize = SBYTES (string);
- bufp = buf = xmalloc (bsize);
+ bufp = buf = xmalloc_atomic (bsize);
strp = SDATA (string);
while (strp < SDATA (string) + SBYTES (string))
else
tem = string;
xfree (buf);
- RETURN_UNGCPRO (tem);
+ return tem;
}
\f
void
syms_of_doc (void)
{
+#include "doc.x"
+
DEFSYM (Qfunction_documentation, "function-documentation");
DEFVAR_LISP ("internal-doc-file-name", Vdoc_file_name,
DEFVAR_LISP ("build-files", Vbuild_files,
doc: /* A list of files used to build this Emacs binary. */);
Vbuild_files = Qnil;
-
- defsubr (&Sdocumentation);
- defsubr (&Sdocumentation_property);
- defsubr (&Ssnarf_documentation);
- defsubr (&Ssubstitute_command_keys);
}