* Omitting :group [was: master 7936c8a: * lisp/mb-depth.el (minibuffer-depth-indicator): New face.]
@ 2021-01-07 15:41 Drew Adams
2021-01-07 15:54 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2021-01-07 15:41 UTC (permalink / raw)
To: Eli Zaretskii, Gabriel do Nascimento Ribeiro; +Cc: Juri Linkov, emacs-devel
> This change causes a byte-compilation warning:
> In toplevel form:
> mb-depth.el:38:1: Warning: defface for
> `minibuffer-depth-indicator' fails to specify
> containing group
IMHO, we should adopt and promote a guideline
that it's a good, not a bad, idea to always
include an explicit `:group'.
I think that Stefan is quite opposed to this,
and he even goes to the trouble of removing
"unnecessary" `:group's. Why?
AFAIK, the only advantage to omitting `:group'
is a little less verbose code.
The advantages to _not_ omitting `:group' are:
1. Local clarity - no need to look elsewhere.
2. Ability to move the thing elsewhere - its
behavior/meaning wrt :group won't depend on
its location.
To me, those advantages to not omitting `:group'
far outweigh the disadvantage. But please point
out any advantage of omitting `:group' that I
may have missed.
It's good that `:group' is optional. But it's
also good to get in the habit of not omitting
it, IMO, and that's a good practice to encourage.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Omitting :group [was: master 7936c8a: * lisp/mb-depth.el (minibuffer-depth-indicator): New face.]
2021-01-07 15:41 Drew Adams
@ 2021-01-07 15:54 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2021-01-07 15:54 UTC (permalink / raw)
To: Drew Adams; +Cc: gabriel376, emacs-devel, juri
> Date: Thu, 7 Jan 2021 15:41:28 +0000 (UTC)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: Juri Linkov <juri@linkov.net>, emacs-devel@gnu.org
>
> > This change causes a byte-compilation warning:
> > In toplevel form:
> > mb-depth.el:38:1: Warning: defface for
> > `minibuffer-depth-indicator' fails to specify
> > containing group
>
> IMHO, we should adopt and promote a guideline
> that it's a good, not a bad, idea to always
> include an explicit `:group'.
Aren't you confusing :group in defcustom with :group in defface?
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Omitting :group [was: master 7936c8a: * lisp/mb-depth.el (minibuffer-depth-indicator): New face.]
[not found] ` <<838s94lp35.fsf@gnu.org>
@ 2021-01-07 16:18 ` Drew Adams
0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2021-01-07 16:18 UTC (permalink / raw)
To: Eli Zaretskii, Drew Adams; +Cc: gabriel376, emacs-devel, juri
> > > This change causes a byte-compilation warning:
> > > In toplevel form:
> > > mb-depth.el:38:1: Warning: defface for
> > > `minibuffer-depth-indicator' fails to specify
> > > containing group
> >
> > IMHO, we should adopt and promote a guideline
> > that it's a good, not a bad, idea to always
> > include an explicit `:group'.
>
> Aren't you confusing :group in defcustom with :group in defface?
Perhaps I am (am I)? What's the difference?
(elisp) `Common Keywords' suggests that its
description of :group applies to "the next few
sections-'defcustom', 'defgroup', etc."
And node `Group Definitions' suggests that a
group defined by `defgroup' applies to all of
the group's members, and that such members are
declared using `:group'.
`:group' is specified for use in many constructs,
in many nodes of the Elisp manual. Shouldn't its
behavior (and usage guidelines) be the same
everywhere?
FWIW, I don't see any special description of
`:group' in the doc about `defface'. I do see,
in other nodes, cross-references to nodes that
introduce/define customization groups - but I
don't see any such xref in the node for `defface'.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-07 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <<86c3f5d3-b2be-4573-a7a5-0c8d94c0d193@default>
[not found] ` <<838s94lp35.fsf@gnu.org>
2021-01-07 16:18 ` Omitting :group [was: master 7936c8a: * lisp/mb-depth.el (minibuffer-depth-indicator): New face.] Drew Adams
2021-01-07 15:41 Drew Adams
2021-01-07 15:54 ` Eli Zaretskii
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.