Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e077cc80
Commit
e077cc80
authored
Jul 19, 2000
by
Kenichi Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(code_convert_region): Delete text properties before shrinking the
conversion region.
parent
670acd62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
src/coding.c
src/coding.c
+9
-11
No files found.
src/coding.c
View file @
e077cc80
...
...
@@ -4718,6 +4718,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace)
if
(
replace
)
{
int
saved_from
=
from
;
int
saved_inhibit_modification_hooks
;
prepare_to_modify_buffer
(
from
,
to
,
&
from
);
if
(
saved_from
!=
from
)
...
...
@@ -4726,6 +4727,14 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace)
from_byte
=
CHAR_TO_BYTE
(
from
),
to_byte
=
CHAR_TO_BYTE
(
to
);
len_byte
=
to_byte
-
from_byte
;
}
/* The code conversion routine can not preserve text properties
for now. So, we must remove all text properties in the
region. Here, we must suppress all modification hooks. */
saved_inhibit_modification_hooks
=
inhibit_modification_hooks
;
inhibit_modification_hooks
=
1
;
Fset_text_properties
(
make_number
(
from
),
make_number
(
to
),
Qnil
,
Qnil
);
inhibit_modification_hooks
=
saved_inhibit_modification_hooks
;
}
if
(
!
encodep
&&
CODING_REQUIRE_DETECTION
(
coding
))
...
...
@@ -4842,17 +4851,6 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace)
len
-=
total_skip
;
len_byte
-=
total_skip
;
}
/* The code conversion routine can not preserve text properties for
now. So, we must remove all text properties in the region.
Here, we must suppress all modification hooks. */
if
(
replace
)
{
int
saved_inhibit_modification_hooks
=
inhibit_modification_hooks
;
inhibit_modification_hooks
=
1
;
Fset_text_properties
(
make_number
(
from
),
make_number
(
to
),
Qnil
,
Qnil
);
inhibit_modification_hooks
=
saved_inhibit_modification_hooks
;
}
/* For converion, we must put the gap before the text in addition to
making the gap larger for efficient decoding. The required gap
size starts from 2000 which is the magic number used in make_gap.
...
...
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