Mercurial > emacs
comparison src/editfns.c @ 22645:e5b201634497
(Fbyte_to_position): New function.
(syms_of_editfns): defsubr it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 29 Jun 1998 18:35:52 +0000 |
parents | edca9002c740 |
children | ea5a8ef23b45 |
comparison
equal
deleted
inserted
replaced
22644:5f67eacb5c04 | 22645:e5b201634497 |
---|---|
494 (position) | 494 (position) |
495 Lisp_Object position; | 495 Lisp_Object position; |
496 { | 496 { |
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 } | |
500 | |
501 DEFUN ("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))); | |
499 } | 508 } |
500 | 509 |
501 DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, | 510 DEFUN ("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\ |
503 At the end of the buffer or accessible region, return 0.\n\ | 512 At the end of the buffer or accessible region, return 0.\n\ |
3115 defsubr (&Spoint_min_marker); | 3124 defsubr (&Spoint_min_marker); |
3116 defsubr (&Spoint_max_marker); | 3125 defsubr (&Spoint_max_marker); |
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); |
3123 defsubr (&Sbolp); | 3133 defsubr (&Sbolp); |
3124 defsubr (&Seolp); | 3134 defsubr (&Seolp); |