Function: gdb-put-string

gdb-put-string is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb-put-string PUTSTRING POS &optional DPROP &rest SPROPS)

Documentation

Put string PUTSTRING in front of POS in the current buffer.

PUTSTRING is displayed by putting an overlay into the current buffer with a before-string string that has a display property whose value is PUTSTRING.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
;;from put-image
(defun gdb-put-string (putstring pos &optional dprop &rest sprops)
  "Put string PUTSTRING in front of POS in the current buffer.
PUTSTRING is displayed by putting an overlay into the current buffer with a
`before-string' string that has a `display' property whose value is
PUTSTRING."
  (let ((string (make-string 1 ?x))
        (buffer (current-buffer)))
    (setq putstring (copy-sequence putstring))
    (let ((overlay (make-overlay pos pos buffer))
          (prop (or dprop
                    (list (list 'margin 'left-margin) putstring))))
      (put-text-property 0 1 'display prop string)
      (if sprops
          (add-text-properties 0 1 sprops string))
      (overlay-put overlay 'put-break t)
      (overlay-put overlay 'before-string string))))