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
7927d8e3
Commit
7927d8e3
authored
Feb 12, 2008
by
Stefan Monnier
Browse files
(casify_region): Only call after-change and composition
functions on the part of the region that was changed.
parent
9e5e233a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
src/ChangeLog
src/ChangeLog
+3
-0
src/casefiddle.c
src/casefiddle.c
+12
-10
No files found.
src/ChangeLog
View file @
7927d8e3
2008-02-12 Stefan Monnier <monnier@iro.umontreal.ca>
* casefiddle.c (casify_region): Only call after-change and composition
functions on the part of the region that was changed.
* keyboard.c (read_avail_input):
* frame.c (Fdelete_frame): Call Fdelete_terminal.
...
...
src/casefiddle.c
View file @
7927d8e3
...
...
@@ -179,11 +179,11 @@ casify_region (flag, b, e)
register
int
c
;
register
int
inword
=
flag
==
CASE_DOWN
;
register
int
multibyte
=
!
NILP
(
current_buffer
->
enable_multibyte_characters
);
int
start
,
end
;
int
start_byte
,
end_byte
;
in
t
change
d
=
0
;
int
opoint
=
PT
;
int
opoint_byte
=
PT_BYTE
;
EMACS_INT
start
,
end
;
EMACS_INT
start_byte
,
end_byte
;
EMACS_INT
first
=
-
1
,
last
;
/* Position of first and las
t change
s. */
EMACS_INT
opoint
=
PT
;
EMACS_INT
opoint_byte
=
PT_BYTE
;
if
(
EQ
(
b
,
e
))
/* Not modifying because nothing marked */
...
...
@@ -226,7 +226,10 @@ casify_region (flag, b, e)
inword
=
((
SYNTAX
(
c
)
==
Sword
)
&&
(
inword
||
!
SYNTAX_PREFIX
(
c
)));
if
(
c
!=
c2
)
{
changed
=
1
;
last
=
start
;
if
(
first
<
0
)
first
=
start
;
if
(
!
multibyte
)
{
MAKE_CHAR_UNIBYTE
(
c
);
...
...
@@ -266,11 +269,10 @@ casify_region (flag, b, e)
if
(
PT
!=
opoint
)
TEMP_SET_PT_BOTH
(
opoint
,
opoint_byte
);
if
(
changed
)
if
(
first
>=
0
)
{
start
=
XFASTINT
(
b
);
signal_after_change
(
start
,
end
-
start
,
end
-
start
);
update_compositions
(
start
,
end
,
CHECK_ALL
);
signal_after_change
(
first
,
last
+
1
-
first
,
last
+
1
-
first
);
update_compositions
(
first
,
last
+
1
,
CHECK_ALL
);
}
}
...
...
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