aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/language/misc-lang.el5
-rw-r--r--src/composite.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index a63c3a21091..cbb581fd19f 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -95,7 +95,10 @@ Customizing the value takes effect when you start Emacs next time."
95 :type '(choice 95 :type '(choice
96 (const :tag "default" nil) 96 (const :tag "default" nil)
97 (const :tag "as space" as-space) 97 (const :tag "as space" as-space)
98 (const :tag "absorb" absorb))) 98 (const :tag "absorb" absorb))
99 :set (lambda (sym val)
100 (set-default sym val)
101 (clear-composition-cache)))
99 102
100;; Record error in arabic-change-gstring. 103;; Record error in arabic-change-gstring.
101(defvar arabic-shape-log nil) 104(defvar arabic-shape-log nil)
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)
686 return HASH_VALUE (h, id); 686 return HASH_VALUE (h, id);
687} 687}
688 688
689DEFUN ("clear-composition-cache", Fclear_composition_cache,
690 Sclear_composition_cache, 0, 0, 0,
691 doc: /* Internal use only.
692Clear composition cache. */)
693 (void)
694{
695 Lisp_Object args[] = {QCtest, Qequal, QCsize, make_number (311)};
696 gstring_hash_table = CALLMANY (Fmake_hash_table, args);
697 /* Fixme: We call Fclear_face_cache to force complete re-building of
698 display glyphs. But, it may be better to call this function from
699 Fclear_face_cache instead. */
700 Fclear_face_cache (Qt);
701}
702
689bool 703bool
690composition_gstring_p (Lisp_Object gstring) 704composition_gstring_p (Lisp_Object gstring)
691{ 705{
@@ -1982,4 +1996,5 @@ See also the documentation of `auto-composition-mode'. */);
1982 defsubr (&Scompose_string_internal); 1996 defsubr (&Scompose_string_internal);
1983 defsubr (&Sfind_composition_internal); 1997 defsubr (&Sfind_composition_internal);
1984 defsubr (&Scomposition_get_gstring); 1998 defsubr (&Scomposition_get_gstring);
1999 defsubr (&Sclear_composition_cache);
1985} 2000}