diff options
author | Po Lu <luangruo@yahoo.com> | 2021-11-24 09:39:58 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2021-11-24 09:39:58 +0000 |
commit | 7394c0fe3540d96109034495a50e317b1bceb338 (patch) | |
tree | f90386173a8e26d77583689240a324c2f880d285 /lisp/emacs-lisp | |
parent | 3219518e5c64281237bb604e6c2977f655aff238 (diff) | |
parent | 3a2eee6f7439866ac51d0d4c7b43f7f9f6f88fe2 (diff) | |
download | emacs-7394c0fe3540d96109034495a50e317b1bceb338.tar.gz emacs-7394c0fe3540d96109034495a50e317b1bceb338.tar.bz2 emacs-7394c0fe3540d96109034495a50e317b1bceb338.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index b2dae564c2b..95254b946e5 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -456,7 +456,12 @@ This takes into account combining characters and grapheme clusters." (start 0) comp) (while (< start (length string)) - (if (setq comp (find-composition-internal start nil string nil)) + (if (setq comp (find-composition-internal + start + ;; Don't search backward in the string for the + ;; start of the composition. + (min (length string) (1+ start)) + string nil)) (progn (push (substring string (car comp) (cadr comp)) result) (setq start (cadr comp))) |