Function: xterm--read-string

xterm--read-string is a byte-compiled function defined in xterm.el.gz.

Signature

(xterm--read-string TERM1 &optional TERM2)

Documentation

Read a string with terminating characters.

This uses xterm--read-event-for-query internally.

Source Code

;; Defined in /usr/src/emacs/lisp/term/xterm.el.gz
(defun xterm--read-string (term1 &optional term2)
  "Read a string with terminating characters.
This uses `xterm--read-event-for-query' internally."
  (let ((str "")
        chr last)
    (while (and (setq last chr
                      chr (xterm--read-event-for-query))
                (if term2
                    (not (and (equal last term1) (equal chr term2)))
                  (not (equal chr term1))))
      (setq str (concat str (string chr))))
    (if term2
        (substring str 0 -1)
      str)))