diff options
| author | Eli Zaretskii | 2025-10-05 11:04:34 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-10-05 11:04:34 +0300 |
| commit | cd400326b2f9991cbca527caaa61649e48cf790b (patch) | |
| tree | 57304e9672a36dec6dd5aeaccbef7d74c43f1540 | |
| parent | 0aa44112b68fe672a86673e38292eeee0eabf74c (diff) | |
| download | emacs-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.texi | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/subr-x.el | 5 |
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 | |||
| 2463 | Caveat: for this function to recognize and process character | ||
| 2464 | compositions, @code{auto-composition-mode} must be enabled, and the | ||
| 2465 | current buffer must be displayed in some window. | ||
| 2462 | @end defun | 2466 | @end defun |
| 2463 | 2467 | ||
| 2464 | When a buffer is displayed with line numbers (@pxref{Display Custom,,, | 2468 | When 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." | |||
| 365 | This takes into account combining characters and grapheme clusters: | 365 | This takes into account combining characters and grapheme clusters: |
| 366 | if compositions are enabled, each sequence of characters composed | 366 | if compositions are enabled, each sequence of characters composed |
| 367 | on display into a single grapheme cluster is treated as a single | 367 | on display into a single grapheme cluster is treated as a single |
| 368 | indivisible unit." | 368 | indivisible unit. |
| 369 | Caveat: for this function to recognize characters compositions, the | ||
| 370 | automatic compositions should be enabled (see `auto-composition-mode') | ||
| 371 | and 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) |