all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Structuring minor mode into subgroups
@ 2021-01-26 19:25 wael-zwaiter
  2021-01-26 21:04 ` [External] : " Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: wael-zwaiter @ 2021-01-26 19:25 UTC (permalink / raw)
  To: Help Gnu Emacs

Can someone show me how I may structure the customisations of a minor mode
into subgroups?






^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [External] : Structuring minor mode into subgroups
  2021-01-26 19:25 Structuring minor mode into subgroups wael-zwaiter
@ 2021-01-26 21:04 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2021-01-26 21:04 UTC (permalink / raw)
  To: wael-zwaiter@gmx.com, Help Gnu Emacs

> Can someone show me how I may structure the customisations of a minor mode
> into subgroups?

Not sure what you mean, but maybe this will help.

If you do `M-x customize-group Icicles' you see this:

,----
| Parent groups: dabbrev recentf convenience minibuffer
|                completion matching apropos help
| 
| Icicles group: 
|        State : visible group members are all at standard values.
|    Minibuffer input completion and cycling of completion candidates.
|    See also Doc-Part1, Doc-Part2, Description, Download,
|        Other Libraries by Drew, and Send Bug Report.
|
| Subgroups:
| Icicles-Buffers              Preferences related to buffers.
| Icicles-Completions-Display  Preferences related to display of
|                              completion candidates.
| Icicles-Files                Preferences related to files.
| Icicles-Key-Bindings         Preferences related to key bindings.
| Icicles-Key-Completion       Preferences related to key completion.
| Icicles-Matching             Preferences related to matching input
|                              for completion.
| Icicles-Minibuffer-Display   Preferences related to minibuffer
|                              display during completion.
| Icicles-Miscellaneous        Miscellaneous preferences.
| Icicles-Searching            Preferences related to searching.
`----

You can define a subgroup by specifying the group
you want to be its parent as one of _its_ groups.

E.g., the `defgroup' of `Icicles-Matching' has
`:group 'Icicles', which means it's a subgroup
of group `Icicles'.

(defgroup Icicles-Matching nil
  "Icicles preferences related to matching input for completion."
  :prefix "icicle-" :group 'Icicles)

Then, a particular `defcustom' or `defface' can
specify which groups apply to it.  E.g.:

(defcustom icicle-file-sort nil
  "*A sort function for file names, or nil.
Examples of sort functions are `icicle-dirs-first-p',
`icicle-latest-access-first-p', and
`icicle-latest-modification-first-p'.
If nil, then file names are not sorted."
  :type '(choice
          (const :tag "None" nil)
          (function :value icicle-dirs-first-p))
  :group 'Icicles-Files :group 'Icicles-Completions-Display)
  ^^^^^^                ^^^^^^

The groups are defined in file `icicles-face.el'.
https://www.emacswiki.org/emacs/download/icicles-face.el


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-26 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 19:25 Structuring minor mode into subgroups wael-zwaiter
2021-01-26 21:04 ` [External] : " Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.