Function: eshell-next-prompt

eshell-next-prompt is an interactive and byte-compiled function defined in em-prompt.el.gz.

Signature

(eshell-next-prompt N)

Documentation

Move to end of Nth next prompt in the buffer.

See eshell-prompt-regexp.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-prompt.el.gz
(defun eshell-next-prompt (n)
  "Move to end of Nth next prompt in the buffer.
See `eshell-prompt-regexp'."
  (interactive "p")
  (if eshell-highlight-prompt
      (progn
        (while (< n 0)
          (while (and (re-search-backward eshell-prompt-regexp nil t)
                      (not (get-text-property (match-beginning 0) 'read-only))))
          (setq n (1+ n)))
        (while (> n 0)
          (while (and (re-search-forward eshell-prompt-regexp nil t)
                      (not (get-text-property (match-beginning 0) 'read-only))))
          (setq n (1- n))))
    (re-search-forward eshell-prompt-regexp nil t n))
  (eshell-skip-prompt))