diff options
author | Jim Blandy <jimb@redhat.com> | 1992-01-21 17:21:50 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-01-21 17:21:50 +0000 |
commit | 6d1bb2a74201aa65282b7f3c874773b38ed7e5b0 (patch) | |
tree | 97817e9eaf2c9a29a67c15f16387514f7b761ce5 | |
parent | 58ca97306f1b7b99faec420422e1028e8d2e5b84 (diff) | |
download | emacs-6d1bb2a74201aa65282b7f3c874773b38ed7e5b0.tar.gz |
*** empty log message ***
-rw-r--r-- | src/editfns.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/editfns.c b/src/editfns.c index 0f059079f1f..2d75d105a44 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -377,17 +377,22 @@ in which case it is less.") 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 @@ syms_of_editfns () 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); |