From c86212b98bbe9ecd358899cb4b136b3133dbcc5b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 29 Apr 1998 01:00:01 +0000 Subject: [PATCH] (Fgap_position, Fgap_size): New functions. (syms_of_editfns): defsubr them. --- src/editfns.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/editfns.c b/src/editfns.c index 32224866a5c..b3e744b3477 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -469,6 +469,26 @@ is in effect, in which case it is less.") return buildmark (ZV, ZV_BYTE); } +DEFUN ("gap-position", Fgap_position, Sgap_position, 0, 0, 0, + "Return the position of the gap, in the current buffer.\n\ +See also `gap-size'.") + () +{ + Lisp_Object temp; + XSETFASTINT (temp, GPT); + return temp; +} + +DEFUN ("gap-size", Fgap_size, Sgap_size, 0, 0, 0, + "Return the size of the current buffer's gap.\n\ +See also `gap-position'.") + () +{ + Lisp_Object temp; + XSETFASTINT (temp, GAP_SIZE); + return temp; +} + DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, "Return the byte position for character position POSITION.") (position) @@ -3074,6 +3094,8 @@ functions if all the text being accessed has this property."); defsubr (&Spoint_min); defsubr (&Spoint_min_marker); defsubr (&Spoint_max_marker); + defsubr (&Sgap_position); + defsubr (&Sgap_size); defsubr (&Sposition_bytes); defsubr (&Sbobp); -- 2.39.2