(defn set-repl-name
"Sets the repl name format to the string name-fmt. Include the following
codes in the name to make the corresponding dynamic values part of it:
%S - repl serial number
%T - thread id
%D - nesting depth in this thread
With no arguments, resets the repl name to its default: \"repl-%S\""
([]
(set-repl-name (+info-defaults+ :name-fmt)))
([name-fmt]
(update *info* :name-fmt name-fmt)
(loop [[[code fmt] & more] (seq +name-formats+)
name-fmt name-fmt]
(if code
(recur more (.replace name-fmt code fmt))
(update *private* :name-fmt name-fmt)))
(let [name (repl-name)]
(update *info* :name name)
(var-set Compiler/SOURCE name))
nil))
Used in 0 other vars
Comments top
No comments for set-repl-name. Log in to add a comment.