summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorK. Handa <handa@gnu.org>2017-10-15 23:15:47 +0900
committerK. Handa <handa@gnu.org>2017-10-15 23:15:47 +0900
commitf95cd5cd7006d2801948b75f7a270ea66d5579bf (patch)
tree4abe0c333f5d08115b9a27de149d306133725b55 /src/composite.c
parenta7f154688d2de911c995be9b640cee36bec66673 (diff)
downloademacs-f95cd5cd7006d2801948b75f7a270ea66d5579bf.tar.gz
Improve customization of arabic-shaper-ZWNJ-handling.
Make the effect of customizing arabic-shaper-ZWNJ-handling appear immediately. * lisp/language/misc-lang.el (arabic-shaper-ZWNJ-handling): Add :set value. * src/composite.c (Fclear_composition_cache): New function. (syms_of_composite): Defsubr it.
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/composite.c b/src/composite.c
index c01e2e3b95c..1a348ddf234 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -686,6 +686,20 @@ composition_gstring_from_id (ptrdiff_t id)
return HASH_VALUE (h, id);
}
+DEFUN ("clear-composition-cache", Fclear_composition_cache,
+ Sclear_composition_cache, 0, 0, 0,
+ doc: /* Internal use only.
+Clear composition cache. */)
+ (void)
+{
+ Lisp_Object args[] = {QCtest, Qequal, QCsize, make_number (311)};
+ gstring_hash_table = CALLMANY (Fmake_hash_table, args);
+ /* Fixme: We call Fclear_face_cache to force complete re-building of
+ display glyphs. But, it may be better to call this function from
+ Fclear_face_cache instead. */
+ Fclear_face_cache (Qt);
+}
+
bool
composition_gstring_p (Lisp_Object gstring)
{
@@ -1982,4 +1996,5 @@ See also the documentation of `auto-composition-mode'. */);
defsubr (&Scompose_string_internal);
defsubr (&Sfind_composition_internal);
defsubr (&Scomposition_get_gstring);
+ defsubr (&Sclear_composition_cache);
}