changeset 512:b7a1e4e4e7e6

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Tue, 21 Jan 1992 17:21:50 +0000
parents e6c69aa0f536
children 12facf6e03ed
files src/editfns.c
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Tue Jan 21 00:02:58 1992 +0000
+++ b/src/editfns.c	Tue Jan 21 17:21:50 1992 +0000
@@ -377,17 +377,22 @@
   return buildmark (ZV);
 }
 
-DEFUN ("following-char", Ffollchar, Sfollchar, 0, 0, 0,
-  "Return the character following point, as a number.")
+DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0,
+  "Return the character following point, as a number.\n\
+At the end of the buffer or accessible region, return 0.")
   ()
 {
   Lisp_Object temp;
-  XFASTINT (temp) = FETCH_CHAR (point);
+  if (point >= ZV)
+    XFASTINT (temp) = 0;
+  else
+    XFASTINT (temp) = FETCH_CHAR (point);
   return temp;
 }
 
-DEFUN ("preceding-char", Fprevchar, Sprevchar, 0, 0, 0,
-  "Return the character preceding point, as a number.")
+DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0,
+  "Return the character preceding point, as a number.\n\
+At the beginning of the buffer or accessible region, return 0.")
   ()
 {
   Lisp_Object temp;
@@ -1232,8 +1237,8 @@
   defsubr (&Seobp);
   defsubr (&Sbolp);
   defsubr (&Seolp);
-  defsubr (&Sfollchar);
-  defsubr (&Sprevchar);
+  defsubr (&Sfollowing_char);
+  defsubr (&Sprevious_char);
   defsubr (&Schar_after);
   defsubr (&Sinsert);
   defsubr (&Sinsert_before_markers);