aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-29 18:35:52 +0000
committerRichard M. Stallman1998-06-29 18:35:52 +0000
commit3ab0732d83dd23e62d632b1d1c7a0e68a432fed5 (patch)
tree9f0d71cdc23ba958cd6054a4a2c30c8c28e52d58 /src
parent93e7ada98147db1b93e3009278687ef03771bdbe (diff)
downloademacs-3ab0732d83dd23e62d632b1d1c7a0e68a432fed5.tar.gz
emacs-3ab0732d83dd23e62d632b1d1c7a0e68a432fed5.zip
(Fbyte_to_position): New function.
(syms_of_editfns): defsubr it.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/editfns.c b/src/editfns.c
index c6d5a7a52ad..18d643a9c82 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -497,6 +497,15 @@ DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0,
497 CHECK_NUMBER_COERCE_MARKER (position, 1); 497 CHECK_NUMBER_COERCE_MARKER (position, 1);
498 return make_number (CHAR_TO_BYTE (XINT (position))); 498 return make_number (CHAR_TO_BYTE (XINT (position)));
499} 499}
500
501DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0,
502 "Return the character position for byte position BYTEPOS.")
503 (bytepos)
504 Lisp_Object bytepos;
505{
506 CHECK_NUMBER (bytepos, 1);
507 return make_number (BYTE_TO_CHAR (XINT (bytepos)));
508}
500 509
501DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, 510DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0,
502 "Return the character following point, as a number.\n\ 511 "Return the character following point, as a number.\n\
@@ -3117,6 +3126,7 @@ functions if all the text being accessed has this property.");
3117 defsubr (&Sgap_position); 3126 defsubr (&Sgap_position);
3118 defsubr (&Sgap_size); 3127 defsubr (&Sgap_size);
3119 defsubr (&Sposition_bytes); 3128 defsubr (&Sposition_bytes);
3129 defsubr (&Sbyte_to_position);
3120 3130
3121 defsubr (&Sbobp); 3131 defsubr (&Sbobp);
3122 defsubr (&Seobp); 3132 defsubr (&Seobp);