Add toggle key docs to docstring and which-key mouseover

Added spacemacs|add-toggle key binding documentation strings:
- To the toggle keys function docstring
- And to it's which-key mouseover minibuffer text
This commit is contained in:
duianto 2019-08-04 18:55:29 +02:00 committed by smile13241324
parent ac641c4a08
commit fba9447cfe
1 changed files with 3 additions and 1 deletions

View File

@ -103,7 +103,9 @@ used."
(push (cons ',name properties) spacemacs-toggles)))
;; toggle function
(defun ,wrapper-func ,(if prefix-arg-var (list prefix-arg-var) ())
,(format "Toggle %s on and off." (symbol-name name))
,(format "Toggle %s on and off.%s"
(symbol-name name)
(if doc (concat "\n\n" doc) ""))
,(if prefix-arg-var '(interactive "P") '(interactive))
(if ,condition-eval
;; check if current buffer major mode supports the toggle