I have an Emacs mode. It has a defgroup
and a number of defcustom
s. Let's say:
(defgroup some-group nil
"Some group"
:prefix "prefix-"
:group 'languages)
(defcustom some-option-1 t
"Option 1"
:tag "Option 1?"
:type 'boolean
:group 'some-group)
(defcustom some-option-2 t
"Option 2"
:tag "Option 2?"
:type 'boolean
:group 'some-group)
(defcustom some-option-3 t
"Option 3"
:tag "Option 3?"
:type 'boolean
:group 'some-group)
All works fine, except the order in which these appear in the Customize buffer shown by M-x customize
is not the order the defcustom
s appear in the source, or alphabetically by their identifier, or alphabetically by their :tag
-- or any other pattern I've been able to figure out so far. For example the options above might end up in the UI as 3, 1, 2. But I'd like them to appear as 1, 2, 3.
The same seems true for the order of sub-groups.
Is there a way I can make them appear in an order that I specify, and if so, how?
(This with Emacs 24.3, in case that's relevant.)
on
(the default). But I'm not seeing mine appear in alphabetical order. So I'm puzzled. At least now I know it's supposed to work this way, and I'll investigate more....:tags
that sorted differently. @angus would you like to submit that as an answer I can accept? Or would you like me to self-answer?:tag
if present, else by identifier. I'd like to pick a good identifier name for code, independent of thinking about UI sort order. The existence of:tags
seems to recognize this separation of concerns... just not completely. Anyway, at least now I understand clearly what's happening.