aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1999-07-28 02:37:17 +0000
committerKenichi Handa1999-07-28 02:37:17 +0000
commit87f0532f1139f933caefa84bc950c086d226db81 (patch)
treedde10ff3bacd9a49674dd1fbe932aa5ccfdbd069 /src
parent2d6115c83512590cda68e4a7911a82f30bf431e1 (diff)
downloademacs-87f0532f1139f933caefa84bc950c086d226db81.tar.gz
emacs-87f0532f1139f933caefa84bc950c086d226db81.zip
(concat): Fix previous change.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/fns.c b/src/fns.c
index a1926e78e88..ad55fdd699e 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -540,7 +540,7 @@ count_combining (str, len, i)
540 540
541/* This structure holds information of an argument of `concat' that is 541/* This structure holds information of an argument of `concat' that is
542 a string and has text properties to be copied. */ 542 a string and has text properties to be copied. */
543struct textproc_rec 543struct textprop_rec
544{ 544{
545 int argnum; /* refer to ARGS (arguments of `concat') */ 545 int argnum; /* refer to ARGS (arguments of `concat') */
546 int from; /* refer to ARGS[argnum] (argument string) */ 546 int from; /* refer to ARGS[argnum] (argument string) */
@@ -570,9 +570,9 @@ concat (nargs, args, target_type, last_special)
570 string can't be decided until we finish the whole concatination. 570 string can't be decided until we finish the whole concatination.
571 So, we record strings that have text properties to be copied 571 So, we record strings that have text properties to be copied
572 here, and copy the text properties after the concatination. */ 572 here, and copy the text properties after the concatination. */
573 struct textproc_rec *textprocs; 573 struct textprop_rec *textprops;
574 /* Number of elments in textprocs. */ 574 /* Number of elments in textprops. */
575 int num_textprocs = 0; 575 int num_textprops = 0;
576 576
577 /* In append, the last arg isn't treated like the others */ 577 /* In append, the last arg isn't treated like the others */
578 if (last_special && nargs > 0) 578 if (last_special && nargs > 0)
@@ -682,8 +682,8 @@ concat (nargs, args, target_type, last_special)
682 682
683 prev = Qnil; 683 prev = Qnil;
684 if (STRINGP (val)) 684 if (STRINGP (val))
685 textprocs 685 textprops
686 = (struct textproc_rec *) alloca (sizeof (struct textproc_rec) * nargs); 686 = (struct textprop_rec *) alloca (sizeof (struct textprop_rec) * nargs);
687 687
688 for (argnum = 0; argnum < nargs; argnum++) 688 for (argnum = 0; argnum < nargs; argnum++)
689 { 689 {
@@ -712,10 +712,10 @@ concat (nargs, args, target_type, last_special)
712 : 0); 712 : 0);
713 if (! NULL_INTERVAL_P (XSTRING (this)->intervals)) 713 if (! NULL_INTERVAL_P (XSTRING (this)->intervals))
714 { 714 {
715 textprocs[num_textprocs].argnum = argnum; 715 textprops[num_textprops].argnum = argnum;
716 /* We ignore text properties on characters being combined. */ 716 /* We ignore text properties on characters being combined. */
717 textprocs[num_textprocs].from = combined; 717 textprops[num_textprops].from = combined;
718 textprocs[num_textprocs++].to = toindex; 718 textprops[num_textprops++].to = toindex;
719 } 719 }
720 toindex_byte += thislen_byte; 720 toindex_byte += thislen_byte;
721 toindex += thisleni - combined; 721 toindex += thisleni - combined;
@@ -726,9 +726,9 @@ concat (nargs, args, target_type, last_special)
726 { 726 {
727 if (! NULL_INTERVAL_P (XSTRING (this)->intervals)) 727 if (! NULL_INTERVAL_P (XSTRING (this)->intervals))
728 { 728 {
729 textprocs[num_textprocs].argnum = argnum; 729 textprops[num_textprops].argnum = argnum;
730 textprocs[num_textprocs].from = 0; 730 textprops[num_textprops].from = 0;
731 textprocs[num_textprocs++].to = toindex; 731 textprops[num_textprops++].to = toindex;
732 } 732 }
733 toindex_byte += copy_text (XSTRING (this)->data, 733 toindex_byte += copy_text (XSTRING (this)->data,
734 XSTRING (val)->data + toindex_byte, 734 XSTRING (val)->data + toindex_byte,
@@ -829,14 +829,14 @@ concat (nargs, args, target_type, last_special)
829 if (!NILP (prev)) 829 if (!NILP (prev))
830 XCONS (prev)->cdr = last_tail; 830 XCONS (prev)->cdr = last_tail;
831 831
832 if (num_textprocs > 0) 832 if (num_textprops > 0)
833 { 833 {
834 for (argnum = 0; argnum < num_textprocs; argnum++) 834 for (argnum = 0; argnum < num_textprops; argnum++)
835 { 835 {
836 this = args[textprocs[argnum].argnum]; 836 this = args[textprops[argnum].argnum];
837 copy_text_properties (make_number (textprocs[argnum].from), 837 copy_text_properties (make_number (textprops[argnum].from),
838 XSTRING (this)->size, this, 838 XSTRING (this)->size, this,
839 make_number (textprocs[argnum].to), val, Qnil); 839 make_number (textprops[argnum].to), val, Qnil);
840 } 840 }
841 } 841 }
842 return val; 842 return val;