First of all, the type for integer is integer
, not int
, so your specific example will not work with Customize.
The :type
determines the edit control used, and provides completion and type checking when saving customization:
Edit control
M-x customize-variable
picks an edit control which is best suited to enter a value for the expected type. For instance, a boolean
type becomes a toggle button, simple types as integer
or string
get a line edit, choice
becomes a value menu, set
a list of checkboxes, etc.
Completion
Within certain edit controls, Customize provides completion. For instance, when you press M-Tab
in a line edit for a function
type (as used for hook variables), Customize automatically completes function names. If there is more than one matching name, you'll see a pop up buffer with all completion candidates. Likewise, a color
widget provides you with completion for all known color names.
Type checking
For all edit controls, Customize checks the type of the current value before saving, and refuses to apply any customization with a non-matching type.
For instance, if you enter a non-numeric into an integer
widget, and try to apply or save the customization, Customize will refuse to do so and signal a “This field should contain an integer” error.