     Evaluate SEXP when leaving the transient state.
 `:doc STRING or SEXP'
     A docstring supported by `defhydra'.
+`:additional-docs cons cells (VARIABLE . STRING)'
+    Additional docstrings to format and store in the corresponding VARIABLE.
+    This can be used to dynamically change the docstring.
 `:title STRING'
-   Provide a title in the header of the transient state
+    Provide a title in the header of the transient state
 `:columns INTEGER'
     Automatically generate :doc with this many number of columns.
 `:hint BOOLEAN'

  "Return the name of the transient state function."
  (intern (format "spacemacs/%S-transient-state/body" name)))

(defun spacemacs//transient-state-adjust-bindings (bindings to-remove to-add)
  (append
   (cl-remove-if

                           "\n" ,hint-var
                           (when dotspacemacs-show-transient-state-color-guide
                             (concat "\n" guide))))))
           (dolist (add-doc ',additional-docs)
             (unless (boundp (car add-doc))
               (set (car add-doc)
                    (spacemacs//transient-state-make-doc
                     ',name (cdr add-doc) '(,(car entry-binding)
                                            ,(cadr entry-binding)
                                            :hint ,hint
                                            :columns ,columns
                                            :foreign-keys ,foreign-keys
                                            :body-pre ,entry-sexp
                                            :before-exit ,exit-sexp)))))
           ,@bindkeys)))))

(provide 'core-transient-state)
