static Lisp_Object move_point (Lisp_Object n, bool forward) { EMACS_INT new_point; if (NILP (n)) XSETFASTINT (n, 1); new_point = PT + (forward ? XINT(n) : - XINT(n)); if (new_point < BEGV) { SET_PT (BEGV); //xsignal0 } if (new_point > ZV) { SET_PT (ZV); //xsignal0 } SET_PT (new_point); return Qnil; }
static void unwind_decompress (void *ddata) { struct decompress_unwind_data *data = ddata; fn_inflateEnd (data->stream); /* Delete any uncompressed data already inserted on error. */ if (data->start) del_range (data->start, PT); /* Put point where it was, or if the buffer has shrunk because the compressed data is bigger than the uncompressed, at point-max. */ SET_PT (min (data->old_point, ZV)); }
static void unwind_decompress (void *ddata) { struct decompress_unwind_data *data = ddata; inflateEnd (data->stream); /* Delete any uncompressed data already inserted on error, but without calling the change hooks. */ if (data->start) { del_range_2 (data->start, data->start, /* byte, char offsets the same */ data->start + data->nbytes, data->start + data->nbytes, 0); update_compositions (data->start, data->start, CHECK_HEAD); /* "Balance" the before-change-functions call, which would otherwise be left "hanging". */ signal_after_change (data->orig, data->start - data->orig, data->start - data->orig); } /* Put point where it was, or if the buffer has shrunk because the compressed data is bigger than the uncompressed, at point-max. */ SET_PT (min (data->old_point, ZV)); }