(Lisp_Object n)
{
ptrdiff_t orig, orig_byte, end;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
specbind (Qinhibit_point_motion_hooks, Qt);
if (NILP (n))
SET_PT_BOTH (orig, orig_byte);
- unbind_to (count, Qnil);
+ dynwind_end ();
/* Return END constrained to the current input field. */
return Fconstrain_to_field (make_number (end), make_number (orig),
(Lisp_Object args)
{
register Lisp_Object val;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
record_unwind_protect (save_excursion_restore, save_excursion_save ());
val = Fprogn (args);
- return unbind_to (count, val);
+ dynwind_end ();
+ return val;
}
DEFUN ("save-current-buffer", Fsave_current_buffer, Ssave_current_buffer, 0, UNEVALLED, 0,
usage: (save-current-buffer &rest BODY) */)
(Lisp_Object args)
{
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
record_unwind_current_buffer ();
- return unbind_to (count, Fprogn (args));
+ Lisp_Object tem0 = Fprogn (args);
+ dynwind_end ();
+ return tem0;
}
\f
DEFUN ("buffer-size", Fbuffer_size, Sbuffer_size, 0, 1, 0,
ptrdiff_t changed = 0;
unsigned char fromstr[MAX_MULTIBYTE_LENGTH], tostr[MAX_MULTIBYTE_LENGTH];
unsigned char *p;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
#define COMBINING_NO 0
#define COMBINING_BEFORE 1
#define COMBINING_AFTER 2
update_compositions (changed, last_changed, CHECK_ALL);
}
- unbind_to (count, Qnil);
+ dynwind_end ();
return Qnil;
}
(Lisp_Object body)
{
register Lisp_Object val;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
record_unwind_protect (save_restriction_restore, save_restriction_save ());
val = Fprogn (body);
- return unbind_to (count, val);
+ dynwind_end ();
+ return val;
}
\f
DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,
Fadd_text_properties (make_number (0),
make_number (SCHARS (string)),
properties, string);
- RETURN_UNGCPRO (string);
+ return string;
}
DEFUN ("format", Fformat, Sformat, 1, MANY, 0,
ptrdiff_t bufsize = sizeof initial_buffer;
ptrdiff_t max_bufsize = STRING_BYTES_BOUND + 1;
char *p;
- ptrdiff_t buf_save_value_index IF_LINT (= 0);
char *format, *end, *format_start;
ptrdiff_t formatlen, nchars;
/* True if the format is multibyte. */
if (buf == initial_buffer)
{
- buf = xmalloc (bufsize);
- sa_must_free = true;
- buf_save_value_index = SPECPDL_INDEX ();
- record_unwind_protect_ptr (xfree, buf);
+ buf = xmalloc_atomic (bufsize);
memcpy (buf, initial_buffer, used);
}
else
{
buf = xrealloc (buf, bufsize);
- set_unwind_protect_ptr (buf_save_value_index, xfree, buf);
}
p = buf + used;
void
syms_of_editfns (void)
{
+#include "editfns.x"
+
DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions");
DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion,
DEFVAR_LISP ("operating-system-release", Voperating_system_release,
doc: /* The release of the operating system Emacs is running on. */);
- defsubr (&Spropertize);
- defsubr (&Schar_equal);
- defsubr (&Sgoto_char);
- defsubr (&Sstring_to_char);
- defsubr (&Schar_to_string);
- defsubr (&Sbyte_to_string);
- defsubr (&Sbuffer_substring);
- defsubr (&Sbuffer_substring_no_properties);
- defsubr (&Sbuffer_string);
- defsubr (&Sget_pos_property);
-
- defsubr (&Spoint_marker);
- defsubr (&Smark_marker);
- defsubr (&Spoint);
- defsubr (&Sregion_beginning);
- defsubr (&Sregion_end);
-
DEFSYM (Qfield, "field");
DEFSYM (Qboundary, "boundary");
- defsubr (&Sfield_beginning);
- defsubr (&Sfield_end);
- defsubr (&Sfield_string);
- defsubr (&Sfield_string_no_properties);
- defsubr (&Sdelete_field);
- defsubr (&Sconstrain_to_field);
-
- defsubr (&Sline_beginning_position);
- defsubr (&Sline_end_position);
-
- defsubr (&Ssave_excursion);
- defsubr (&Ssave_current_buffer);
-
- defsubr (&Sbuffer_size);
- defsubr (&Spoint_max);
- defsubr (&Spoint_min);
- defsubr (&Spoint_min_marker);
- defsubr (&Spoint_max_marker);
- defsubr (&Sgap_position);
- defsubr (&Sgap_size);
- defsubr (&Sposition_bytes);
- defsubr (&Sbyte_to_position);
-
- defsubr (&Sbobp);
- defsubr (&Seobp);
- defsubr (&Sbolp);
- defsubr (&Seolp);
- defsubr (&Sfollowing_char);
- defsubr (&Sprevious_char);
- defsubr (&Schar_after);
- defsubr (&Schar_before);
- defsubr (&Sinsert);
- defsubr (&Sinsert_before_markers);
- defsubr (&Sinsert_and_inherit);
- defsubr (&Sinsert_and_inherit_before_markers);
- defsubr (&Sinsert_char);
- defsubr (&Sinsert_byte);
-
- defsubr (&Suser_login_name);
- defsubr (&Suser_real_login_name);
- defsubr (&Suser_uid);
- defsubr (&Suser_real_uid);
- defsubr (&Sgroup_gid);
- defsubr (&Sgroup_real_gid);
- defsubr (&Suser_full_name);
- defsubr (&Semacs_pid);
- defsubr (&Scurrent_time);
- defsubr (&Sget_internal_run_time);
- defsubr (&Sformat_time_string);
- defsubr (&Sfloat_time);
- defsubr (&Sdecode_time);
- defsubr (&Sencode_time);
- defsubr (&Scurrent_time_string);
- defsubr (&Scurrent_time_zone);
- defsubr (&Sset_time_zone_rule);
- defsubr (&Ssystem_name);
- defsubr (&Smessage);
- defsubr (&Smessage_box);
- defsubr (&Smessage_or_box);
- defsubr (&Scurrent_message);
- defsubr (&Sformat);
-
- defsubr (&Sinsert_buffer_substring);
- defsubr (&Scompare_buffer_substrings);
- defsubr (&Ssubst_char_in_region);
- defsubr (&Stranslate_region_internal);
- defsubr (&Sdelete_region);
- defsubr (&Sdelete_and_extract_region);
- defsubr (&Swiden);
- defsubr (&Snarrow_to_region);
- defsubr (&Ssave_restriction);
- defsubr (&Stranspose_regions);
}