Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
87f0532f
Commit
87f0532f
authored
Jul 28, 1999
by
Kenichi Handa
Browse files
(concat): Fix previous change.
parent
2d6115c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
src/fns.c
src/fns.c
+17
-17
No files found.
src/fns.c
View file @
87f0532f
...
...
@@ -540,7 +540,7 @@ count_combining (str, len, i)
/* This structure holds information of an argument of `concat' that is
a string and has text properties to be copied. */
struct
textpro
c
_rec
struct
textpro
p
_rec
{
int
argnum
;
/* refer to ARGS (arguments of `concat') */
int
from
;
/* refer to ARGS[argnum] (argument string) */
...
...
@@ -570,9 +570,9 @@ concat (nargs, args, target_type, last_special)
string can't be decided until we finish the whole concatination.
So, we record strings that have text properties to be copied
here, and copy the text properties after the concatination. */
struct
textpro
c
_rec
*
textpro
c
s
;
/* Number of elments in textpro
c
s. */
int
num_textpro
c
s
=
0
;
struct
textpro
p
_rec
*
textpro
p
s
;
/* Number of elments in textpro
p
s. */
int
num_textpro
p
s
=
0
;
/* In append, the last arg isn't treated like the others */
if
(
last_special
&&
nargs
>
0
)
...
...
@@ -682,8 +682,8 @@ concat (nargs, args, target_type, last_special)
prev
=
Qnil
;
if
(
STRINGP
(
val
))
textpro
c
s
=
(
struct
textpro
c
_rec
*
)
alloca
(
sizeof
(
struct
textpro
c
_rec
)
*
nargs
);
textpro
p
s
=
(
struct
textpro
p
_rec
*
)
alloca
(
sizeof
(
struct
textpro
p
_rec
)
*
nargs
);
for
(
argnum
=
0
;
argnum
<
nargs
;
argnum
++
)
{
...
...
@@ -712,10 +712,10 @@ concat (nargs, args, target_type, last_special)
:
0
);
if
(
!
NULL_INTERVAL_P
(
XSTRING
(
this
)
->
intervals
))
{
textpro
c
s
[
num_textpro
c
s
].
argnum
=
argnum
;
textpro
p
s
[
num_textpro
p
s
].
argnum
=
argnum
;
/* We ignore text properties on characters being combined. */
textpro
c
s
[
num_textpro
c
s
].
from
=
combined
;
textpro
c
s
[
num_textpro
c
s
++
].
to
=
toindex
;
textpro
p
s
[
num_textpro
p
s
].
from
=
combined
;
textpro
p
s
[
num_textpro
p
s
++
].
to
=
toindex
;
}
toindex_byte
+=
thislen_byte
;
toindex
+=
thisleni
-
combined
;
...
...
@@ -726,9 +726,9 @@ concat (nargs, args, target_type, last_special)
{
if
(
!
NULL_INTERVAL_P
(
XSTRING
(
this
)
->
intervals
))
{
textpro
c
s
[
num_textpro
c
s
].
argnum
=
argnum
;
textpro
c
s
[
num_textpro
c
s
].
from
=
0
;
textpro
c
s
[
num_textpro
c
s
++
].
to
=
toindex
;
textpro
p
s
[
num_textpro
p
s
].
argnum
=
argnum
;
textpro
p
s
[
num_textpro
p
s
].
from
=
0
;
textpro
p
s
[
num_textpro
p
s
++
].
to
=
toindex
;
}
toindex_byte
+=
copy_text
(
XSTRING
(
this
)
->
data
,
XSTRING
(
val
)
->
data
+
toindex_byte
,
...
...
@@ -829,14 +829,14 @@ concat (nargs, args, target_type, last_special)
if
(
!
NILP
(
prev
))
XCONS
(
prev
)
->
cdr
=
last_tail
;
if
(
num_textpro
c
s
>
0
)
if
(
num_textpro
p
s
>
0
)
{
for
(
argnum
=
0
;
argnum
<
num_textpro
c
s
;
argnum
++
)
for
(
argnum
=
0
;
argnum
<
num_textpro
p
s
;
argnum
++
)
{
this
=
args
[
textpro
c
s
[
argnum
].
argnum
];
copy_text_properties
(
make_number
(
textpro
c
s
[
argnum
].
from
),
this
=
args
[
textpro
p
s
[
argnum
].
argnum
];
copy_text_properties
(
make_number
(
textpro
p
s
[
argnum
].
from
),
XSTRING
(
this
)
->
size
,
this
,
make_number
(
textpro
c
s
[
argnum
].
to
),
val
,
Qnil
);
make_number
(
textpro
p
s
[
argnum
].
to
),
val
,
Qnil
);
}
}
return
val
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment