Add docstring to align-repeat-x commands
Update 'spacemacs|create-align-repeat-x macro to add a docstring to created functions. The docstring refers the user to the macro, providing a link to the source code.
This commit is contained in:
parent
ae51fd7a77
commit
3c67ba94f3
|
@ -933,6 +933,8 @@ Other:
|
|||
spacemacs/window-split-triple-columns
|
||||
spacemacs/window-split-grid)
|
||||
(thanks to Thanh Vuong)
|
||||
- Added a link to =spacemacs|create-align-repeat-x= in the docstring for
|
||||
=align-repeat-= commands (thanks to Troy Pracy)
|
||||
- Fixed:
|
||||
- Fixed ~h~ key binding in compilation and grep buffers
|
||||
(thanks to Sylvain Benner)
|
||||
|
|
|
@ -1132,11 +1132,14 @@ the right."
|
|||
nil))
|
||||
|
||||
(defmacro spacemacs|create-align-repeat-x (name regexp &optional justify-right default-after)
|
||||
(let ((new-func (intern (concat "spacemacs/align-repeat-" name))))
|
||||
`(defun ,new-func (start end switch)
|
||||
(interactive "r\nP")
|
||||
(let ((after (not (eq (if switch t nil) (if ,default-after t nil)))))
|
||||
(spacemacs/align-repeat start end ,regexp ,justify-right after)))))
|
||||
(let* ((new-func (intern (concat "spacemacs/align-repeat-" name)))
|
||||
(new-func-defn
|
||||
`(defun ,new-func (start end switch)
|
||||
(interactive "r\nP")
|
||||
(let ((after (not (eq (if switch t nil) (if ,default-after t nil)))))
|
||||
(spacemacs/align-repeat start end ,regexp ,justify-right after)))))
|
||||
(put new-func 'function-documentation "Created by `spacemacs|create-align-repeat-x'.")
|
||||
new-func-defn))
|
||||
|
||||
(spacemacs|create-align-repeat-x "comma" "," nil t)
|
||||
(spacemacs|create-align-repeat-x "semicolon" ";" nil t)
|
||||
|
|
Loading…
Reference in New Issue