mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-02 07:30:55 -08:00
Export and extend *tpl-prompt-hook* so that it can be used to completely change the look of the prompt.
This commit is contained in:
parent
a30a214e47
commit
209f96a4d6
1 changed files with 11 additions and 8 deletions
|
|
@ -21,7 +21,7 @@
|
|||
(in-package "SYSTEM")
|
||||
|
||||
(export '(*break-readtable* *break-on-warnings* *break-enable*
|
||||
*tpl-evalhook*))
|
||||
*tpl-evalhook* *tpl-prompt-hook*))
|
||||
|
||||
(defvar *quit-tag* (cons nil nil))
|
||||
(defvar *quit-tags* nil)
|
||||
|
|
@ -405,13 +405,16 @@ under certain conditions; see file 'Copyright' for details.")
|
|||
(break-where)))))
|
||||
|
||||
(defun tpl-prompt ()
|
||||
(fresh-line)
|
||||
(when *tpl-prompt-hook*
|
||||
(funcall *tpl-prompt-hook*))
|
||||
(format t "~A~V,,,'>A "
|
||||
(if (eq *package* (find-package 'user)) "" (package-name *package*))
|
||||
(- *tpl-level* *step-level* -1)
|
||||
""))
|
||||
(typecase *tpl-prompt-hook*
|
||||
(string (format t *tpl-prompt-hook*))
|
||||
(function (funcall *tpl-prompt-hook*))
|
||||
(t (fresh-line)
|
||||
(format t "~A~V,,,'>A "
|
||||
(if (eq *package* (find-package 'user))
|
||||
""
|
||||
(package-name *package*))
|
||||
(- *tpl-level* *step-level* -1)
|
||||
""))))
|
||||
|
||||
(defun tpl-read ()
|
||||
(finish-output)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue