diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 0ad6d173e..ba3046437 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -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) diff --git a/layers/+spacemacs/spacemacs-defaults/funcs.el b/layers/+spacemacs/spacemacs-defaults/funcs.el index a2c30bebb..7eac3d057 100644 --- a/layers/+spacemacs/spacemacs-defaults/funcs.el +++ b/layers/+spacemacs/spacemacs-defaults/funcs.el @@ -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)