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
f6aa6ec6
Commit
f6aa6ec6
authored
Aug 25, 2010
by
Kenichi Handa
Browse files
Allow composition striding over PT.
parent
e8748006
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
34 deletions
+15
-34
src/ChangeLog
src/ChangeLog
+9
-0
src/composite.c
src/composite.c
+6
-34
No files found.
src/ChangeLog
View file @
f6aa6ec6
2010-08-25 Kenichi Handa <handa@m17n.org>
* composite.c (composition_compute_stop_pos): Don't break
composition at PT.
(composition_reseat_it): Likewise. Fix calculation of character
position starting a composition.
(Fcomposition_get_gstring): Don't limit the number of components
for automatic composition.
2010-08-25 Kenichi Handa <handa@m17n.org>
* composite.c (composition_compute_stop_pos): In forward search,
...
...
src/composite.c
View file @
f6aa6ec6
...
...
@@ -969,7 +969,9 @@ autocmp_chars (Lisp_Object rule, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT
static
Lisp_Object
_work_val
;
static
int
_work_char
;
/* 1 iff the character C is composable. */
/* 1 iff the character C is composable. Characters of general
category Z? or C? are not composable except for ZWNJ and ZWJ. */
#define CHAR_COMPOSABLE_P(C) \
((C) == 0x200C || (C) == 0x200D \
|| (_work_val = CHAR_TABLE_REF (Vunicode_category_table, (C)), \
...
...
@@ -1028,19 +1030,6 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos,
cmp_it
->
stop_pos
=
endpos
=
start
;
cmp_it
->
ch
=
-
1
;
}
if
(
NILP
(
string
))
{
/* A composition never strides over PT. */
if
(
PT
>
charpos
)
{
if
(
PT
<
endpos
)
cmp_it
->
stop_pos
=
endpos
=
PT
;
}
else
if
(
PT
<
charpos
&&
PT
>
endpos
)
{
cmp_it
->
stop_pos
=
endpos
=
PT
-
1
;
}
}
if
(
NILP
(
current_buffer
->
enable_multibyte_characters
)
||
NILP
(
Vauto_composition_mode
))
return
;
...
...
@@ -1233,23 +1222,8 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos,
int
composition_reseat_it
(
struct
composition_it
*
cmp_it
,
EMACS_INT
charpos
,
EMACS_INT
bytepos
,
EMACS_INT
endpos
,
struct
window
*
w
,
struct
face
*
face
,
Lisp_Object
string
)
{
if
(
endpos
<=
charpos
)
{
if
(
NILP
(
string
))
{
if
(
endpos
<
0
)
endpos
=
BEGV
;
if
(
endpos
<
PT
&&
PT
<
charpos
)
endpos
=
PT
;
}
else
if
(
endpos
<
0
)
endpos
=
0
;
}
else
{
if
(
NILP
(
string
)
&&
charpos
<
PT
&&
PT
<
endpos
)
endpos
=
PT
;
}
if
(
endpos
<
0
)
endpos
=
NILP
(
string
)
?
BEGV
:
0
;
if
(
cmp_it
->
ch
==
-
2
)
{
...
...
@@ -1311,7 +1285,7 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I
elt
=
XCAR
(
val
);
if
(
cmp_it
->
lookback
>
0
)
{
cpos
-
=
cmp_it
->
lookback
;
cpos
=
charpos
-
cmp_it
->
lookback
;
if
(
STRINGP
(
string
))
bpos
=
string_char_to_byte
(
string
,
cpos
);
else
...
...
@@ -1773,8 +1747,6 @@ should be ignored. */)
CHECK_NATNUM
(
from
);
CHECK_NATNUM
(
to
);
if
(
XINT
(
to
)
>
XINT
(
from
)
+
MAX_COMPOSITION_COMPONENTS
)
to
=
make_number
(
XINT
(
from
)
+
MAX_COMPOSITION_COMPONENTS
);
if
(
!
FONT_OBJECT_P
(
font_object
))
{
struct
coding_system
*
coding
;
...
...
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