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)))
      (add-text-properties
       0 (length prompt)
       (if eshell-highlight-prompt
           '( read-only t
              field prompt
              font-lock-face eshell-prompt
              front-sticky (read-only field font-lock-face)
              rear-nonsticky (read-only field font-lock-face))
         '( field prompt
            front-sticky (field)
            rear-nonsticky (field)))
       prompt)
      (eshell-interactive-filter nil prompt)))
  (run-hooks 'eshell-after-prompt-hook))