aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/coding.c b/src/coding.c
index 8b54281c0bf..0bea2a0c2bc 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -9023,23 +9023,23 @@ DEFUN ("find-coding-systems-region-internal",
9023 } 9023 }
9024 else 9024 else
9025 { 9025 {
9026 CHECK_FIXNUM_COERCE_MARKER (start); 9026 EMACS_INT s = fix_position (start);
9027 CHECK_FIXNUM_COERCE_MARKER (end); 9027 EMACS_INT e = fix_position (end);
9028 if (XFIXNUM (start) < BEG || XFIXNUM (end) > Z || XFIXNUM (start) > XFIXNUM (end)) 9028 if (! (BEG <= s && s <= e && e <= Z))
9029 args_out_of_range (start, end); 9029 args_out_of_range (start, end);
9030 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 9030 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
9031 return Qt; 9031 return Qt;
9032 start_byte = CHAR_TO_BYTE (XFIXNUM (start)); 9032 start_byte = CHAR_TO_BYTE (s);
9033 end_byte = CHAR_TO_BYTE (XFIXNUM (end)); 9033 end_byte = CHAR_TO_BYTE (e);
9034 if (XFIXNUM (end) - XFIXNUM (start) == end_byte - start_byte) 9034 if (e - s == end_byte - start_byte)
9035 return Qt; 9035 return Qt;
9036 9036
9037 if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT) 9037 if (s < GPT && GPT < e)
9038 { 9038 {
9039 if ((GPT - XFIXNUM (start)) < (XFIXNUM (end) - GPT)) 9039 if (GPT - s < e - GPT)
9040 move_gap_both (XFIXNUM (start), start_byte); 9040 move_gap_both (s, start_byte);
9041 else 9041 else
9042 move_gap_both (XFIXNUM (end), end_byte); 9042 move_gap_both (e, end_byte);
9043 } 9043 }
9044 } 9044 }
9045 9045
@@ -9277,25 +9277,25 @@ is nil. */)
9277 } 9277 }
9278 else 9278 else
9279 { 9279 {
9280 CHECK_FIXNUM_COERCE_MARKER (start); 9280 EMACS_INT s = fix_position (start);
9281 CHECK_FIXNUM_COERCE_MARKER (end); 9281 EMACS_INT e = fix_position (end);
9282 if (XFIXNUM (start) < BEG || XFIXNUM (end) > Z || XFIXNUM (start) > XFIXNUM (end)) 9282 if (! (BEG <= s && s <= e && e <= Z))
9283 args_out_of_range (start, end); 9283 args_out_of_range (start, end);
9284 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 9284 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
9285 return Qnil; 9285 return Qnil;
9286 start_byte = CHAR_TO_BYTE (XFIXNUM (start)); 9286 start_byte = CHAR_TO_BYTE (s);
9287 end_byte = CHAR_TO_BYTE (XFIXNUM (end)); 9287 end_byte = CHAR_TO_BYTE (e);
9288 if (XFIXNUM (end) - XFIXNUM (start) == end_byte - start_byte) 9288 if (e - s == end_byte - start_byte)
9289 return Qnil; 9289 return Qnil;
9290 9290
9291 if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT) 9291 if (s < GPT && GPT < e)
9292 { 9292 {
9293 if ((GPT - XFIXNUM (start)) < (XFIXNUM (end) - GPT)) 9293 if (GPT - s < e - GPT)
9294 move_gap_both (XFIXNUM (start), start_byte); 9294 move_gap_both (s, start_byte);
9295 else 9295 else
9296 move_gap_both (XFIXNUM (end), end_byte); 9296 move_gap_both (e, end_byte);
9297 } 9297 }
9298 pos = XFIXNUM (start); 9298 pos = s;
9299 } 9299 }
9300 9300
9301 list = Qnil; 9301 list = Qnil;