Function: term-skip-prompt

term-skip-prompt is a byte-compiled function defined in term.el.gz.

Signature

(term-skip-prompt)

Documentation

Skip past the text matching regexp term-prompt-regexp.

If this takes us past the end of the current line, don't skip at all.

Source Code

;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-skip-prompt ()
  "Skip past the text matching regexp `term-prompt-regexp'.
If this takes us past the end of the current line, don't skip at all."
  (let ((eol (line-end-position)))
    (when (and (looking-at term-prompt-regexp)
	       (<= (match-end 0) eol))
      (goto-char (match-end 0)))))