aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-19 21:46:46 +0000
committerGerd Moellmann1999-09-19 21:46:46 +0000
commit6021f7c517dca05bf332ef6968fc836f245f6539 (patch)
treea65254bb7ec1273289032128f236834836a7ae08 /src
parent6bfc58e91e3a54e1c3e02602e3a75af12a0eed56 (diff)
downloademacs-6021f7c517dca05bf332ef6968fc836f245f6539.tar.gz
emacs-6021f7c517dca05bf332ef6968fc836f245f6539.zip
(copy_text): Removed unused variables.
(count_combining_after, count_combining_after, insert_1_both, insert_from_string_1, insert_from_buffer_1, check_markers): Ditto. (adjust_after_replace, replace_range): Add parentheses to logical expressions. Remove unused variables. (CHECK_BYTE_COMBINING_FOR_INSERT): Add parentheses to logical expression.
Diffstat (limited to 'src')
-rw-r--r--src/insdel.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 83424a019bc..b4f6ac5a5a2 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -81,7 +81,7 @@ static int check_markers_debug_flag;
81void 81void
82check_markers () 82check_markers ()
83{ 83{
84 register Lisp_Object tail, prev, next; 84 register Lisp_Object tail;
85 int multibyte = ! NILP (current_buffer->enable_multibyte_characters); 85 int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
86 86
87 tail = BUF_MARKERS (current_buffer); 87 tail = BUF_MARKERS (current_buffer);
@@ -683,7 +683,7 @@ copy_text (from_addr, to_addr, nbytes,
683 { 683 {
684 int nchars = 0; 684 int nchars = 0;
685 int bytes_left = nbytes; 685 int bytes_left = nbytes;
686 Lisp_Object tbl = Qnil, temp; 686 Lisp_Object tbl = Qnil;
687 687
688 /* We set the variable tbl to the reverse table of 688 /* We set the variable tbl to the reverse table of
689 Vnonascii_translation_table in advance. */ 689 Vnonascii_translation_table in advance. */
@@ -968,9 +968,9 @@ count_combining_after (string, length, pos, pos_byte)
968 int length; 968 int length;
969 int pos, pos_byte; 969 int pos, pos_byte;
970{ 970{
971 int opos = pos, opos_byte = pos_byte; 971 int opos_byte = pos_byte;
972 int i; 972 int i;
973 int c, bytes; 973 int bytes;
974 unsigned char *bufp; 974 unsigned char *bufp;
975 975
976 if (NILP (current_buffer->enable_multibyte_characters)) 976 if (NILP (current_buffer->enable_multibyte_characters))
@@ -1082,8 +1082,8 @@ byte_combining_error ()
1082 region boundary, signal an error. */ 1082 region boundary, signal an error. */
1083#define CHECK_BYTE_COMBINING_FOR_INSERT(pos) \ 1083#define CHECK_BYTE_COMBINING_FOR_INSERT(pos) \
1084 do { \ 1084 do { \
1085 if (combined_before_bytes && pos == BEGV \ 1085 if ((combined_before_bytes && pos == BEGV) \
1086 || combined_after_bytes && pos == ZV) \ 1086 || (combined_after_bytes && pos == ZV)) \
1087 byte_combining_error (); \ 1087 byte_combining_error (); \
1088 } while (0) 1088 } while (0)
1089 1089
@@ -1098,7 +1098,6 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers)
1098 register int nchars, nbytes; 1098 register int nchars, nbytes;
1099 int inherit, prepare, before_markers; 1099 int inherit, prepare, before_markers;
1100{ 1100{
1101 register Lisp_Object temp;
1102 int combined_before_bytes, combined_after_bytes; 1101 int combined_before_bytes, combined_after_bytes;
1103 1102
1104 if (NILP (current_buffer->enable_multibyte_characters)) 1103 if (NILP (current_buffer->enable_multibyte_characters))
@@ -1261,11 +1260,9 @@ insert_from_string_1 (string, pos, pos_byte, nchars, nbytes,
1261 register int pos, pos_byte, nchars, nbytes; 1260 register int pos, pos_byte, nchars, nbytes;
1262 int inherit, before_markers; 1261 int inherit, before_markers;
1263{ 1262{
1264 register Lisp_Object temp;
1265 struct gcpro gcpro1; 1263 struct gcpro gcpro1;
1266 int outgoing_nbytes = nbytes; 1264 int outgoing_nbytes = nbytes;
1267 int combined_before_bytes, combined_after_bytes; 1265 int combined_before_bytes, combined_after_bytes;
1268 int adjusted_nchars;
1269 INTERVAL intervals; 1266 INTERVAL intervals;
1270 1267
1271 /* Make OUTGOING_NBYTES describe the text 1268 /* Make OUTGOING_NBYTES describe the text
@@ -1437,7 +1434,6 @@ insert_from_buffer_1 (buf, from, nchars, inherit)
1437 int incoming_nbytes = to_byte - from_byte; 1434 int incoming_nbytes = to_byte - from_byte;
1438 int outgoing_nbytes = incoming_nbytes; 1435 int outgoing_nbytes = incoming_nbytes;
1439 int combined_before_bytes, combined_after_bytes; 1436 int combined_before_bytes, combined_after_bytes;
1440 int adjusted_nchars;
1441 INTERVAL intervals; 1437 INTERVAL intervals;
1442 1438
1443 /* Make OUTGOING_NBYTES describe the text 1439 /* Make OUTGOING_NBYTES describe the text
@@ -1669,8 +1665,8 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte)
1669 nbytes_del = STRING_BYTES (XSTRING (prev_text)); 1665 nbytes_del = STRING_BYTES (XSTRING (prev_text));
1670 } 1666 }
1671 1667
1672 if (combine_before && from == BEGV 1668 if ((combine_before && from == BEGV)
1673 || combined_after_bytes && from == ZV) 1669 || (combined_after_bytes && from == ZV))
1674 { 1670 {
1675 /* We can't combine bytes nor signal an error here. So, let's 1671 /* We can't combine bytes nor signal an error here. So, let's
1676 pretend that the new text is just a single space. */ 1672 pretend that the new text is just a single space. */
@@ -1699,7 +1695,7 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte)
1699 } 1695 }
1700 1696
1701 if (combined_before_bytes 1697 if (combined_before_bytes
1702 || len_byte == 0 && combined_after_bytes > 0) 1698 || (len_byte == 0 && combined_after_bytes > 0))
1703 { 1699 {
1704 Lisp_Object deletion; 1700 Lisp_Object deletion;
1705 deletion = Qnil; 1701 deletion = Qnil;
@@ -1750,8 +1746,6 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte)
1750#endif 1746#endif
1751 1747
1752 { 1748 {
1753 int pos = PT, pos_byte = PT_BYTE;
1754
1755 if (from < PT) 1749 if (from < PT)
1756 adjust_point (len - nchars_del, len_byte - nbytes_del); 1750 adjust_point (len - nchars_del, len_byte - nbytes_del);
1757 1751
@@ -1823,7 +1817,6 @@ replace_range (from, to, new, prepare, inherit, markers)
1823 register Lisp_Object temp; 1817 register Lisp_Object temp;
1824 struct gcpro gcpro1; 1818 struct gcpro gcpro1;
1825 int combined_before_bytes, combined_after_bytes; 1819 int combined_before_bytes, combined_after_bytes;
1826 int adjusted_inschars;
1827 INTERVAL intervals; 1820 INTERVAL intervals;
1828 int outgoing_insbytes = insbytes; 1821 int outgoing_insbytes = insbytes;
1829 Lisp_Object deletion; 1822 Lisp_Object deletion;
@@ -1927,8 +1920,8 @@ replace_range (from, to, new, prepare, inherit, markers)
1927 combined_after_bytes 1920 combined_after_bytes
1928 = count_combining_after (GPT_ADDR, outgoing_insbytes, from, from_byte); 1921 = count_combining_after (GPT_ADDR, outgoing_insbytes, from, from_byte);
1929 1922
1930 if (combined_before_bytes && from == BEGV 1923 if ((combined_before_bytes && from == BEGV)
1931 || combined_after_bytes && from == ZV) 1924 || (combined_after_bytes && from == ZV))
1932 { 1925 {
1933 /* Bytes are being combined across the region boundary. We 1926 /* Bytes are being combined across the region boundary. We
1934 should avoid it. We recover the original contents before 1927 should avoid it. We recover the original contents before