Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance defcustom definitions #37

Merged
merged 1 commit into from
Sep 13, 2021
Merged

Enhance defcustom definitions #37

merged 1 commit into from
Sep 13, 2021

Conversation

bkaestner
Copy link
Contributor

@bkaestner bkaestner commented Feb 1, 2021

While there is a list' type in defcustom, it is meant for a very specific list. '(list string) means that you want a list with exactly one string. '(list string function) means that the customizable variable should take two elements: a string and a function.

However, we want arbitrary many strings, that's what repeat is for, e.g.

(defcustom my-favourite-numbers '()
  "A collection of my favourite numbers"
  :type '(repeat integer))

Note that we could probably use file instead of string in dotfiles-org-files, but I don't know how to make customize's auto-completion recognize the dotfiles-folder as search-folder. To enable auto-completion on the latter, we can use the :type 'directory.

@bkaestner bkaestner changed the title Enhance defcustom defintions Enhance defcustom definitions Feb 1, 2021
While there is a `list' type in `defcustom', it is meant for a very specific list. '(list string) means that you want a list with exactly one string. '(list string function) means that the customizable variable should take two elements: a string and a function.

However, we want arbitrary many strings, that's what `repeat' is for. Note that we could probably use `file' instead of `string', but the auto-completion does not recognize the `dotfiles-folder' as search-folder. Oh well.

For directories there is the special type 'directory'.
@bkaestner
Copy link
Contributor Author

Hi @daviwil, how can I improve this PR to get it merged? Thanks :)

@daviwil
Copy link
Owner

daviwil commented Sep 13, 2021

No improvements needed, thanks for pointing this out! I wish I had got these details right in the video

@daviwil daviwil merged commit 5e1f994 into daviwil:master Sep 13, 2021
@bkaestner bkaestner deleted the patch-1 branch September 14, 2021 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants