branch: externals/taxy commit 0cda29accb2c883b25ef48aa02001cd59e4b90ae Author: Adam Porter <a...@alphapapa.net> Commit: Adam Porter <a...@alphapapa.net>
Add: (taxy-magit-section-define-column-definer) Custom-type --- taxy-magit-section.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/taxy-magit-section.el b/taxy-magit-section.el index 4152b90..1c54376 100644 --- a/taxy-magit-section.el +++ b/taxy-magit-section.el @@ -212,7 +212,6 @@ PLIST may be a plist setting the following options: (column-formatters-variable-name (intern (format "%s-column-formatters" prefix))) (column-formatters-variable-docstring (format "Column formatters defined by `%s'." definer-name))) - ;; TODO: Add defined columns to customization type for the columns-variable. `(let ((columns-variable ',columns-variable-name) (column-formatters-variable ',column-formatters-variable-name)) (defcustom ,level-indent-variable-name 2 @@ -266,10 +265,14 @@ PLIST may be a plist setting the following options: #',fn-name) (setf (alist-get 'align (alist-get ,name ,column-formatters-variable nil nil #'equal)) ,(plist-get plist :align)) + ;; Add column to the columns-variable's standard value. (unless (member ,name (get ',columns-variable 'standard-value)) (setf (get ',columns-variable 'standard-value) (append (get ',columns-variable 'standard-value) - (list ,name)))))))))) + (list ,name)))) + ;; Add column to the columns-variable's custom type. + (cl-pushnew ,name (get ',columns-variable 'custom-type) + :test #'equal))))))) ;;;;; Functions