aboutsummaryrefslogtreecommitdiff
path: root/compat.texi
diff options
context:
space:
mode:
authorMartin Edström <meedstrom91@gmail.com>2025-11-04 15:25:07 +0100
committerGitHub <noreply@github.com>2025-11-04 15:25:07 +0100
commit393c6b02fe1f5bcd02d7f419ff4b08a6087c032a (patch)
tree66d9fd6036aa459d9a2b9abe57d6907931064ffa /compat.texi
parentcccd41f549fa88031a32deb26253b462021d7e12 (diff)
compat-29: Add string-glyph-compose and string-glyph-decompose (#76)
Diffstat (limited to 'compat.texi')
-rw-r--r--compat.texi21
1 files changed, 21 insertions, 0 deletions
diff --git a/compat.texi b/compat.texi
index 0a455aa..79f5608 100644
--- a/compat.texi
+++ b/compat.texi
@@ -2683,6 +2683,27 @@ you can say:
@xref{Size of Displayed Text,,,elisp}.
@end defun
+@c copied from lisp/international/ucs-normalize.el
+@defun string-glyph-compose string
+Compose @var{string} according to the Unicode NFC.
+This returns a new string obtained by canonical decomposition
+of @var{string} (see @code{ucs-normalize-NFC-string}) followed by
+canonical composition, a.k.a. the \"Unicode Normalization Form C\"
+of @var{string}. For instance:
+
+ @code{(string-glyph-compose \"Å\") => \"Å\"}
+@end defun
+
+@c copied from lisp/international/ucs-normalize.el
+@defun string-glyph-decompose string
+Decompose @var{string} according to the Unicode NFD.
+This returns a new string that is the canonical decomposition
+of @var{string}, a.k.a. the \"Unicode Normalization Form D\"
+of @var{string}. For instance:
+
+ @code{(ucs-normalize-NFD-string \"Å\") => \"Å\""}
+@end defun
+
@c based on lisp/emacs-lisp/subr-x.el
@defmac with-buffer-unmodified-if-unchanged &rest body@dots{}
Evaluate @var{body} like @code{progn}, but change buffer-modified