1.2.0 permalink Arrow_down_16x16

set-repl-name

clojure.contrib.repl-ln

  • (set-repl-name)
  • (set-repl-name name-fmt)
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"

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/repl_ln.clj:157 top

(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))
Vars in clojure.contrib.repl-ln/set-repl-name: defn let loop name var-set
Used in 0 other vars

Comments top

No comments for set-repl-name. Log in to add a comment.