Function: eshell-emit-prompt

eshell-emit-prompt is a byte-compiled function defined in em-prompt.el.gz.

Signature

(eshell-emit-prompt)

Documentation

Emit a prompt if eshell is being used interactively.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-prompt.el.gz
(defun eshell-emit-prompt ()
  "Emit a prompt if eshell is being used interactively."
  (when (boundp 'ansi-color-context-region)
    (setq ansi-color-context-region nil))
  (run-hooks 'eshell-before-prompt-hook)
  (if (not eshell-prompt-function)
      (set-marker eshell-last-output-end (point))
    (let ((prompt (funcall eshell-prompt-function)))
      (and eshell-highlight-prompt
	   (add-text-properties 0 (length prompt)
				'(read-only t
				  font-lock-face eshell-prompt
				  front-sticky (font-lock-face read-only)
				  rear-nonsticky (font-lock-face read-only))
				prompt))
      (eshell-interactive-print prompt)))
  (run-hooks 'eshell-after-prompt-hook))