Function: lgstring-insert-glyph
lgstring-insert-glyph is a byte-compiled function defined in
composite.el.gz.
Signature
(lgstring-insert-glyph GSTRING IDX GLYPH)
Source Code
;; Defined in /usr/src/emacs/lisp/composite.el.gz
;; Insert GLYPH at the index IDX of GSTRING.
(defun lgstring-insert-glyph (gstring idx glyph)
(let ((nglyphs (lgstring-glyph-len gstring))
(i idx))
(while (and (< i nglyphs) (lgstring-glyph gstring i))
(setq i (1+ i)))
(if (= i nglyphs)
(setq gstring (vconcat gstring (vector glyph)))
(if (< (1+ i) nglyphs)
(lgstring-set-glyph gstring (1+ i) nil)))
(while (> i idx)
(lgstring-set-glyph gstring i (lgstring-glyph gstring (1- i)))
(setq i (1- i)))
(lgstring-set-glyph gstring i glyph)
gstring))