aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/coding.c b/src/coding.c
index 16dc37a3f20..79f116fc618 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -9091,8 +9091,7 @@ DEFUN ("find-coding-systems-region-internal",
9091 9091
9092DEFUN ("unencodable-char-position", Funencodable_char_position, 9092DEFUN ("unencodable-char-position", Funencodable_char_position,
9093 Sunencodable_char_position, 3, 5, 0, 9093 Sunencodable_char_position, 3, 5, 0,
9094 doc: /* 9094 doc: /* Return position of first un-encodable character in a region.
9095Return position of first un-encodable character in a region.
9096START and END specify the region and CODING-SYSTEM specifies the 9095START and END specify the region and CODING-SYSTEM specifies the
9097encoding to check. Return nil if CODING-SYSTEM does encode the region. 9096encoding to check. Return nil if CODING-SYSTEM does encode the region.
9098 9097
@@ -9102,8 +9101,9 @@ list of positions.
9102 9101
9103If optional 5th argument STRING is non-nil, it is a string to search 9102If optional 5th argument STRING is non-nil, it is a string to search
9104for un-encodable characters. In that case, START and END are indexes 9103for un-encodable characters. In that case, START and END are indexes
9105to the string. */) 9104to the string and treated as in `substring'. */)
9106 (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object count, Lisp_Object string) 9105 (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system,
9106 Lisp_Object count, Lisp_Object string)
9107{ 9107{
9108 EMACS_INT n; 9108 EMACS_INT n;
9109 struct coding_system coding; 9109 struct coding_system coding;
@@ -9140,12 +9140,7 @@ to the string. */)
9140 else 9140 else
9141 { 9141 {
9142 CHECK_STRING (string); 9142 CHECK_STRING (string);
9143 CHECK_NATNUM (start); 9143 validate_subarray (string, start, end, SCHARS (string), &from, &to);
9144 CHECK_NATNUM (end);
9145 if (! (XINT (start) <= XINT (end) && XINT (end) <= SCHARS (string)))
9146 args_out_of_range_3 (string, start, end);
9147 from = XINT (start);
9148 to = XINT (end);
9149 if (! STRING_MULTIBYTE (string)) 9144 if (! STRING_MULTIBYTE (string))
9150 return Qnil; 9145 return Qnil;
9151 p = SDATA (string) + string_char_to_byte (string, from); 9146 p = SDATA (string) + string_char_to_byte (string, from);