I am currently working on cleaning up VM's use of defcustom. One of the
things I've noticed is some inconsistency in where defcustom definitions
are put and wanted to know what people thought would be the best
approach.
Currently, most of the user customizable variable definitions are in the
vm-vars.el file. However, in some cases, they are in the file that uses
them and in a couple of cases, some are in vm-vars.el and some are in
the file that mainly uses them.
I have no particular preference, but feel it should be consistent. So
I'd like some feedback from others on what they feel would be best. I
think there are three options -
1. All defgroup and defcustom definitions go into vm-vars.el. For a long
time, the vm-vars.el has been the primary file where most people go to
see what things can be customized/changed. Having it all in one file
could be quite convenient, especially if you someone who prefers using
..vm over using customize. However, this file is becoming quite large
(6017 lines at present).
2. Have the variables and groups defined in the file where they are
used. This has the advantage that all related things are kept together.
It has the disadvantage that you would have to look in multiple files
for customizable variables etc. Not an issue if you use custom, but
could be a pain for those who like to customize everythig in their .vm
file. In some cases, it would be difficult to decide the best 'owner'
file as some variables are used in multiple places etc.
3. Put related defgroup/defcustom definitions into their own files and
have vm-vars.el require those files. This would make vm-vars.el smaller
and probably make it easier to find specific defcustom variable
definitions etc.
I personally don't have a preference, but if pushed, would probably go
with option 1. This will probably be what I do if nobody else has any
opinion. It would also appear to be the option with least potential
impact.
Tim