-(defun ewoc--create-special-node (data string pos)
- "Insert STRING at POS in current buffer. Remember the start
-position. Create a wrapper containing that start position and the
-element DATA."
- (save-excursion
- ;; Remember the position as a number so that it doesn't move
- ;; when we insert the string.
- (when (markerp pos) (setq pos (marker-position pos)))
- (goto-char pos)
- (let ((inhibit-read-only t))
- ;; Use insert-before-markers so that the marker for the
- ;; next element is updated.
- (insert-before-markers string)
- ;; Always insert a newline. You want invisible elements? You
- ;; lose. (At least in this version). FIXME-someday. (It is
- ;; harder to fix than it might seem. All markers have to point
- ;; to the right place all the time...)
- (insert-before-markers ?\n)
- (ewoc--node-create (copy-marker pos) data))))
-
-