aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-10-05 11:04:34 +0300
committerEli Zaretskii2025-10-05 11:04:34 +0300
commitcd400326b2f9991cbca527caaa61649e48cf790b (patch)
tree57304e9672a36dec6dd5aeaccbef7d74c43f1540
parent0aa44112b68fe672a86673e38292eeee0eabf74c (diff)
downloademacs-cd400326b2f9991cbca527caaa61649e48cf790b.tar.gz
emacs-cd400326b2f9991cbca527caaa61649e48cf790b.zip
; Improve documentation of 'string-glyph-split'
* doc/lispref/display.texi (Size of Displayed Text): * lisp/emacs-lisp/subr-x.el (string-glyph-split): Document a caveat (bug#79576).
-rw-r--r--doc/lispref/display.texi4
-rw-r--r--lisp/emacs-lisp/subr-x.el5
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index f363b044203..6abbefff7a5 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2459,6 +2459,10 @@ you can say:
2459@example 2459@example
2460(apply #'insert (cdr (string-glyph-split string)))) 2460(apply #'insert (cdr (string-glyph-split string))))
2461@end example 2461@end example
2462
2463Caveat: for this function to recognize and process character
2464compositions, @code{auto-composition-mode} must be enabled, and the
2465current buffer must be displayed in some window.
2462@end defun 2466@end defun
2463 2467
2464When a buffer is displayed with line numbers (@pxref{Display Custom,,, 2468When a buffer is displayed with line numbers (@pxref{Display Custom,,,
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 2fa0652bc5c..aa8ef0d4ecc 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -365,7 +365,10 @@ substring that does not include newlines."
365This takes into account combining characters and grapheme clusters: 365This takes into account combining characters and grapheme clusters:
366if compositions are enabled, each sequence of characters composed 366if compositions are enabled, each sequence of characters composed
367on display into a single grapheme cluster is treated as a single 367on display into a single grapheme cluster is treated as a single
368indivisible unit." 368indivisible unit.
369Caveat: for this function to recognize characters compositions, the
370automatic compositions should be enabled (see `auto-composition-mode')
371and the current buffer must be displayed in some window."
369 (declare (side-effect-free t)) 372 (declare (side-effect-free t))
370 (let ((result nil) 373 (let ((result nil)
371 (start 0) 374 (start 0)