unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces
       [not found] ` <E1ZNIPS-0006dx-Nh@vcs.savannah.gnu.org>
@ 2015-09-05 21:44   ` Johan Bockgård
  2015-09-05 22:09     ` Artur Malabarba
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Bockgård @ 2015-09-05 21:44 UTC (permalink / raw)
  To: emacs-devel; +Cc: Artur Malabarba

Artur Malabarba <bruce.connor.am@gmail.com> writes:

> branch: master
> commit 1be349c628b9fedd6db96dcd5e3d9d1abb60e4d0
> Author: Artur Malabarba <bruce.connor.am@gmail.com>
> Commit: Artur Malabarba <bruce.connor.am@gmail.com>
>
>     * lisp/emacs-lisp/package.el: Define custom faces
>     
>     (package-name-face, package-description-face)
>     (package-status-built-in-face, package-status-external-face)
>     (package-status-available-face, package-status-new-face)
>     (package-status-held-face, package-status-disabled-face)
>     (package-status-installed-face, package-status-dependency-face)
>     (package-status-unsigned-face, package-status-incompat-face)
>     (package-status-avail-obso-face): New faces.
>     (package-menu--print-info-simple): Use them.

The convention is to not end face names with "-face".



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

* Re: master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces
  2015-09-05 21:44   ` master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces Johan Bockgård
@ 2015-09-05 22:09     ` Artur Malabarba
  2015-09-05 22:15       ` Johan Bockgård
  0 siblings, 1 reply; 6+ messages in thread
From: Artur Malabarba @ 2015-09-05 22:09 UTC (permalink / raw)
  To: Johan Bockgård; +Cc: emacs-devel

> The convention is to not end face names with "-face".

Cool. I prefer to not end the names with `-face', but I was just
following the lead of the font-lock faces. For reference, is this
convention stated anywhere? I couldn't find it in (info "(elisp)
Defining Faces").



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

* Re: master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces
  2015-09-05 22:09     ` Artur Malabarba
@ 2015-09-05 22:15       ` Johan Bockgård
  2015-09-06 13:05         ` Artur Malabarba
  2015-09-07  9:48         ` Oleh Krehel
  0 siblings, 2 replies; 6+ messages in thread
From: Johan Bockgård @ 2015-09-05 22:15 UTC (permalink / raw)
  To: emacs-devel

Artur Malabarba <bruce.connor.am@gmail.com> writes:

>> The convention is to not end face names with "-face".
>
> Cool. I prefer to not end the names with `-face', but I was just
> following the lead of the font-lock faces.

The font-lock face are different for historical reasons.

> For reference, is this convention stated anywhere? I couldn't find it
> in (info "(elisp) Defining Faces").

It says right there:

    -- Macro: defface face spec doc [keyword value]…
        This macro declares FACE as a named face whose default face spec is
        given by SPEC.  You should not quote the symbol FACE, and it should
        not end in ‘-face’ (that would be redundant).



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

* Re: master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces
  2015-09-05 22:15       ` Johan Bockgård
@ 2015-09-06 13:05         ` Artur Malabarba
  2015-09-07  9:48         ` Oleh Krehel
  1 sibling, 0 replies; 6+ messages in thread
From: Artur Malabarba @ 2015-09-06 13:05 UTC (permalink / raw)
  To: Johan Bockgård; +Cc: emacs-devel

Clearly I should stop replying to emails past midnight.
Thanks, Johan. I'm fixing that now.



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

* Re: master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces
  2015-09-05 22:15       ` Johan Bockgård
  2015-09-06 13:05         ` Artur Malabarba
@ 2015-09-07  9:48         ` Oleh Krehel
  2015-09-10 11:31           ` Alexis
  1 sibling, 1 reply; 6+ messages in thread
From: Oleh Krehel @ 2015-09-07  9:48 UTC (permalink / raw)
  To: emacs-devel

Johan Bockgård <bojohan@gnu.org> writes:

> Artur Malabarba <bruce.connor.am@gmail.com> writes:
>
>>> The convention is to not end face names with "-face".
>>
>> Cool. I prefer to not end the names with `-face', but I was just
>> following the lead of the font-lock faces.
>
> The font-lock face are different for historical reasons.
>
>> For reference, is this convention stated anywhere? I couldn't find it
>> in (info "(elisp) Defining Faces").
>
> It says right there:
>
>     -- Macro: defface face spec doc [keyword value]…
>         This macro declares FACE as a named face whose default face spec is
>         given by SPEC.  You should not quote the symbol FACE, and it should
>         not end in ‘-face’ (that would be redundant).

Is it actually a good idea not end with "-face"? I do it for all my
packages. And the reason is a very good one: I get completion
(completion-at-point, apropos, git-grep, CEDET tags, whatever) for faces
with "package-prefix.*-face". It's useful to distinguish the face
symbols from the variable symbols.

    Oleh




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

* Re: master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces
  2015-09-07  9:48         ` Oleh Krehel
@ 2015-09-10 11:31           ` Alexis
  0 siblings, 0 replies; 6+ messages in thread
From: Alexis @ 2015-09-10 11:31 UTC (permalink / raw)
  To: emacs-devel


Oleh Krehel <ohwoeowho@gmail.com> writes:

> Is it actually a good idea not end with "-face"? I do it for all 
> my packages. And the reason is a very good one: I get completion 
> (completion-at-point, apropos, git-grep, CEDET tags, whatever) 
> for faces with "package-prefix.*-face". It's useful to 
> distinguish the face symbols from the variable symbols.

Agreed. In my `picolisp-mode` package, i have a defface 
`picolisp-global-variable-face`, i.e. the face used for PicoLisp 
global variables. i feel that dropping '-face' from this wouldn't 
provide any concrete benefits to me or my users, and indeed, would 
prevent the sort of useful actions you describe.


Alexis.



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

end of thread, other threads:[~2015-09-10 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150806102825.25477.3457@vcs.savannah.gnu.org>
     [not found] ` <E1ZNIPS-0006dx-Nh@vcs.savannah.gnu.org>
2015-09-05 21:44   ` master 1be349c 1/2: * lisp/emacs-lisp/package.el: Define custom faces Johan Bockgård
2015-09-05 22:09     ` Artur Malabarba
2015-09-05 22:15       ` Johan Bockgård
2015-09-06 13:05         ` Artur Malabarba
2015-09-07  9:48         ` Oleh Krehel
2015-09-10 11:31           ` Alexis

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).